无法使用linux中的ffmpeg从网络摄像头中复用两个实时流

时间:2013-10-21 11:26:00

标签: ffmpeg http-live-streaming multiplexing

我们正尝试使用linux中的ffmpeg将两个来自网络摄像头的实时流复制到输出文件中,如下所示,

fmpeg -i "http://10.41.2.57:8090/webcam.asf" -i "http://10.41.2.49:8090/webcam.asf" -map 0:0 -map 1:0 -t 60 "/home/../MuxLiveStream1.flv" 

ffmpeg在一段时间后停止响应并且控制台显示以下输出

FFmpeg version SVN-r0.5.9-4:0.5.9-0ubuntu0.10.04.3, Copyright (c) 2000-2009 Fabrice Bellard, et al.
  configuration: --extra-version=4:0.5.9-0ubuntu0.10.04.3 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --disable-stripping --disable-vhook --enable-runtime-cpudetect --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --enable-shared --disable-static
  libavutil     49.15. 0 / 49.15. 0
  libavcodec    52.20. 1 / 52.20. 1
  libavformat   52.31. 0 / 52.31. 0
  libavdevice   52. 1. 0 / 52. 1. 0
  libavfilter    0. 4. 0 /  0. 4. 0
  libswscale     0. 7. 1 /  0. 7. 1
  libpostproc   51. 2. 0 / 51. 2. 0
  built on Jan 24 2013 19:42:59, gcc: 4.4.3

Seems stream 0 codec frame rate differs from container frame rate: 1000.00 (1000/1) -> 2.00 (2/1)
Input #0, flv, from 'http:10.41.2.154:8090/webcam.flv':
  Duration: 00:00:00.00, start: 1587016.579000, bitrate: 200 kb/s
    Stream #0.0: Video: flv, yuv420p, 320x240, 200 kb/s, 2 tbr, 1k tbn, 1k tbc

Seems stream 0 codec frame rate differs from container frame rate: 1000.00 (1000/1) -> 2.00 (2/1)
Input #1, flv, from 'http:10.41.2.57:8090/webcam.flv':
  Duration: 00:00:00.00, start: 1587230.806000, bitrate: 200 kb/s
    Stream #1.0: Video: flv, yuv420p, 320x240, 200 kb/s, 2 tbr, 1k tbn, 1k tbc
Number of stream maps must match number of output streams

命令中是否有错误或者还有其他需要做的事情吗?

1 个答案:

答案 0 :(得分:0)

最近的构建显示:

[flv @ 0x28e4d40] at most one video stream is supported in flv

尝试更灵活的输出容器,例如Matroska(.mkv)并使用最近的构建,因为0.5.9是古老的。您可以download a Linux build of ffmpeg或者您可以关注step-by-step guide to compile ffmpeg