[FFmpeg-user] multiple live rtmp inputs latency

Madovsky infos at madovsky.org
Sun Feb 3 18:21:49 CET 2013


I tried to convert 2 rtmp live ipnut
into one output file (mp4 or mkv)
resulting in any case about 2.4 second delay between when I use filter_complex with amerge or/and overlay
the first live rtmp and the second one

ffmpeg -i "rtmp://server/app/live live=1" -itsoffset 2.437 -i "rtmp://server/app/live2  live=1" --filter_complex "[0:1]pan=stereo:c0=c0+c1; [1:1]pan=stereo:c0=c0+c1; [0:0]pad=682:450:21:105[left];[left][1:0]overlay=341:105" -ac 1 -acodec libspeex -ar 16000 -vcodec flv -tune zerolatency -shortest -y output.flv
ffmpeg version N-49519-g99eedfc Copyright (c) 2000-2013 the FFmpeg developers
  built on Feb  1 2013 16:33:20 with gcc 4.3.2 (GCC) 20081105 (Red Hat 4.3.2-7)
  configuration: --enable-static --enable-gpl --enable-nonfree --enable-libfaac --enable-libx264 --enable-pthreads --enable-postproc --enable-libspeex --enable-librtmp --enable-runtime-cpudetect --enable-libfreetype
  libavutil      52. 17.100 / 52. 17.100
  libavcodec     54. 91.100 / 54. 91.100
  libavformat    54. 61.104 / 54. 61.104
  libavdevice    54.  3.103 / 54.  3.103
  libavfilter     3. 35.100 /  3. 35.100
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
rtmp server sent error
[flv @ 0x2ad0640] Estimating duration from bitrate, this may be inaccurate
Input #0, flv, from 'rtmp://server/app/live':
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: flv1, yuv420p, 320x240, 16.58 tbr, 1k tbn, 1k tbc
    Stream #0:1: Audio: speex, 16000 Hz, mono, s16
rtmp server sent error
[flv @ 0x2b6caa0] Estimating duration from bitrate, this may be inaccurate
Input #1, flv, from server/app/live2:
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #1:0: Video: flv1, yuv420p, 320x240, 1k tbr, 1k tbn, 1k tbc
    Stream #1:1: Audio: speex, 16000 Hz, mono, s16
Input #2, image2, from 'neterviewBack.png':
  Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
    Stream #2:0: Video: png, rgb24, 80x20, 25 tbr, 25 tbn, 25 tbc
Output #0, flv, to 'output.flv':
  Metadata:
    encoder         : Lavf54.61.104
    Stream #0:0: Audio: speex ([11][0][0][0] / 0x000B), 16000 Hz, mono, s16, 27 kb/s
    Stream #0:1: Audio: speex ([11][0][0][0] / 0x000B), 16000 Hz, mono, s16, 27
    Stream #0:2: Video: flv1 ([2][0][0][0] / 0x0002), yuv420p, 682x450, q=2-31,
Stream mapping:
  Stream #0:0 (flv) -> pad
  Stream #0:1 (libspeex) -> pan
  Stream #1:0 (flv) -> overlay:overlay
  Stream #1:1 (libspeex) -> pan
  Stream #2:0 (png) -> overlay:overlay
  pan -> Stream #0:0 (libspeex)
  pan -> Stream #0:1 (libspeex)
  drawtext -> Stream #0:2 (flv)
Press [q] to stop, [?] for help
[flv @ 0x2b2c340] Warning: Speex stream has more than 8 frames per packet. Adobe
Warning: Speex stream has more than 8 frames per packet. Adobe Flash Player cann
[flv @ 0x2b2c340] Warning: Speex stream has more than 8 frames per packet. Adobe
    Last message repeated 1 times
Warning: Speex stream has more than 8 frames per packet. Adobe Flash Player cann
Warning: Speex stream has more than 8 frames per packet. Adobe Flash Player cann
frame=  169 fps= 17 q=12.1 Lsize=     607kB time=00:00:18.15 bitrate= 273.9kbits
video:497kB audio:87kB subtitle:0 global headers:0kB muxing overhead 3.899482%
[libspeex @ 0x2b2a9e0] 1 frames left in the queue on closing
[libspeex @ 0x2b38700] 1 frames left in the queue on closing
Received signal 2: terminating.


thanks

Franck



More information about the ffmpeg-user mailing list