0

我们正在尝试在 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

命令中是否有错误,或者还有什么需要做的吗?

4

1 回答 1

0

最近的构建显示:

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

尝试更灵活的输出容器,例如 Matroska (.mkv) 并使用最近的构建,因为 0.5.9 是古老的。您可以简单地下载 ffmpeg 的 Linux 版本,也可以按照分步指南编译 ffmpeg

于 2013-10-23T23:17:53.487 回答