您的位置:首页 > 其它

在hi3518EV200模组上用ffmpeg实现rtmp推流直播测试

2016-11-19 16:27 2386 查看
CPU: 37.6% usr 19.6% sys  0.0% nic 35.5% idle  4.2% io  0.0% irq  2.8% sirq

Load average: 7.82 7.31 7.05 2/147 1754

  PID  PPID USER     STAT   VSZ %VSZ CPU %CPU COMMAND

 1121  1119 root     S     706m1721.7   0 27.3 /mnt/mtd/ipc/ipc_server

 1722  1721 root     R     5772 13.7   0 26.8 /home/rtmp/ffmpeg -d -i rtsp://127.0.0.1/22 -vcodec copy -

 1316     2 root     SW       0  0.0   0  2.0 [RtmpMlmeTask]

  437     2 root     SW       0  0.0   0  1.9 [mmcqd/1]

 1742 11058 root     R     1404  3.3   0  0.6 top

 1315     2 root     SW       0  0.0   0  0.4 [RtmpTimerTask]

 1222     1 root     S     6212 14.7   0  0.1 /mnt/mtd/ipc/onvif

 1036     1 root     S     1408  3.3   0  0.1 telnetd

 1037     1 root     S     1400  3.3   0  0.1 {sd.sh} /bin/sh /mnt/mtd/ipc/sd.sh

  257     2 root     SW       0  0.0   0  0.1 [kswapd0]

    4     2 root     SW       0  0.0   0  0.1 [kworker/0:0]

 1226  1222 root     S    39172 93.2   0  0.0 /mnt/mtd/ipc/onvif

 1119     1 root     S     7572 18.0   0  0.0 /mnt/mtd/ipc/ipc_server

 1117     1 root     S     1944  4.6   0  0.0 /mnt/mtd/ipc/chksock

11058 11057 root     S     1432  3.4   0  0.0 sh

 1900  1891 root     S     1424  3.3   0  0.0 sh

 1420     1 root     S     1412  3.3   0  0.0 udhcpc -a -b -i eth0 -x hostname IPCAM -s /mnt/mtd/ipc/con

11057  1900 root     S     1412  3.3   0  0.0 sh

 1891  1036 root     S     1408  3.3   0  0.0 -sh

 3743     1 root     S     1408  3.3   0  0.0 /sbin/getty -L ttyS000 115200 vt100

    1     0 root     S     1400  3.3   0  0.0 init

 1721 11058 root     S     1400  3.3   0  0.0 {exe} ash ./rtsp2rtmp.sh

 1754  1037 root     S     1392  3.3   0  0.0 sleep 15

  461     1 root     S <   1072  2.5   0  0.0 udevd --daemon

  514   461 root     S <   1072  2.5   0  0.0 udevd --daemon

  521   461 root     S <   1072  2.5   0  0.0 udevd --daemon



测试过程中发生了一个问题:

问题现象:

Output #0, flv, to 'rtmp://127.0.0.1/live/demo':

  Metadata:

    title           : 11

    encoder         : Lavf55.19.104

    Stream #0:0: Video: h264 (libx264) ([7][0][0][0] / 0x0007), yuvj420p, 640x352, q=-1--1, 1k tbn, 49.75 tbc

    Stream #0:1: Audio: aac (libfdk_aac) ([10][0][0][0] / 0x000A), 32000 Hz, mono, s16, 32 kb/s

Stream mapping:

  Stream #0:0 -> #0:0 (h264 -> libx264)

  Stream #0:1 -> #0:1 (pcm_alaw -> libfdk_aac)

frame=  505 fps= 34 q=28 Lsize=     0KB time=00:00:20.22 bitrate= 0kbits/s

显然这样是没办法看到视频流的,bitrate=0 kbits/s。

原因:

ffmpeg编译时没有添加--enable-encoder=libfdk_aac --enable-decoder=pcm_alaw --enable-muxer=pcm_alaw导致的。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
相关文章推荐