尝试在ubuntu中执行以下ffmpeg命令。
* ffmpeg -i "rtmp://IP/live/1234 live=1" -f flv rtmp://IP/live/1234_56
*
ffmpeg version 2.2.git Copyright (c) 2000-2014 the FFmpeg developers
built on Apr 8 2014 13:15:21 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
configuration: --prefix=/home/encoder/ffmpeg_build --extra-cflags=-I/home/encoder/ffmpeg_build/include --extra-ldflags=-L/home/encoder/ffmpeg_build/lib --bindir=/home/encoder/bin --extra-libs=-ldl --enable-gpl --enable-libass --enable-libfdk-aac --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --enable-x11grab
libavutil 52. 74.100 / 52. 74.100
libavcodec 55. 58.102 / 55. 58.102
libavformat 55. 36.102 / 55. 36.102
libavdevice 55. 11.100 / 55. 11.100
libavfilter 4. 3.100 / 4. 3.100
libswscale 2. 6.100 / 2. 6.100
libswresample 0. 18.100 / 0. 18.100
libpostproc 52. 3.100 / 52. 3.100
[rtmp @ 0x3c5a140] Detected librtmp style URL parameters, these aren't supported by the libavformat internal RTMP handler currently enabled. See the documentation for the correct way to pass parameters.
^C[flv @ 0x3c59b00] Could not find codec parameters for stream 0 (Video: none): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[flv @ 0x3c59b00] Could not find codec parameters for stream 1 (Audio: none, 0 channels): unspecified sample format
Consider increasing the value for the 'analyzeduration' and 'probesize' options
rtmp://IP/live/1234 live=1: could not find codec parameters
Received signal 2: terminating.
我之前已经为ffmpeg安装了avserver(Libav)。建议任何替代live = 1或提供suggstion。
答案 0 :(得分:0)
这适用于ffmpeg版本N-71741-ge2877bd:
ffmpeg -rtmp_live live -i "rtmp://IP/live/1234" -f flv rtmp://IP/live/1234_56