我正在尝试使用以下命令将 RTMP 流实时转码为另一个 RTMP HLS 流:
ffmpeg -re -i rtmp://localhost/videochat/testing -c:v libx264 -c:a:0 libfaac -b:a:0 480k -f flv rtmp://localhost:12345/hls/mystream;
但是我收到以下错误并且转码从未开始:
ffmpeg version git-2014-02-06-474db7a Copyright (c) 2000-2014 the FFmpeg developers
built on Feb 6 2014 22:20:14 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
configuration: --enable-gpl --enable-libass --enable-libfaac --enable-libfdk-aac -- enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-libtheora --enable-libvorbis --enable-libvpx --enable-x11grab --enable-libx264 --enable-nonfree --enable-version3
libavutil 52. 63.100 / 52. 63.100
libavcodec 55. 49.101 / 55. 49.101
libavformat 55. 30.100 / 55. 30.100
libavdevice 55. 7.100 / 55. 7.100
libavfilter 4. 1.102 / 4. 1.102
libswscale 2. 5.101 / 2. 5.101
libswresample 0. 17.104 / 0. 17.104
libpostproc 52. 3.100 / 52. 3.100
Metadata:
description Chat using VideoChat example.
[flv @ 0x1ec89e0] Stream discovered after head already parsed
^C[flv @ 0x1ec89e0] Could not find codec parameters for stream 0 (Video: none): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, flv, from 'rtmp://localhost/videochat/testing':
Metadata:
description : Chat using VideoChat ex ?5P
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0: Video: none, 1k tbr, 1k tbn, 1k tbc
Stream #0:1: Data: none
Codec AVOption b (set bitrate (in bits/s)) specified for output file #0 (rtmp://localhost:12345/hls/mystream) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.
Output #0, flv, to 'rtmp://localhost:12345/hls/mystream':
如果以前有人处理过/解决过这个问题,请分享一下,因为我已经尝试解决这个问题两天了,但无济于事!