运行多个FFmpeg实例来编码udp流会产生错误

时间:2014-03-24 07:23:54

标签: ffmpeg

请有人帮我解决下面的问题

我正在尝试以HLS格式编码多个udp流。我在系统上逐个运行编码实例(进程)。该应用程序工作正常,我能够使用在STB(机顶盒)上运行的播放器编码,接收和播放流。编码没问题,直到运行第5个实例。当我开始在系统上运行第6个编码实例时,流输出在所有6个编码输出中开始冻结。

我使用的是基于Intel Xeon的服务器,具有24核和32GB RAM。

这是我的ffmpeg构建信息。

  

的ffmpeg   ffmpeg版本N-61057-gec6d043版权所有(c)2000-2014 FFmpeg开发人员   建于2014年3月4日05:33:48与gcc 4.6(Debian 4.6.3-1)   配置: - prefix = / root / ffmpeg-static / 64bit --extra-cflags =' - I / root / ffmpeg-static / 64bit / include -static'--extra-ldflags =' - L / root / ffmpeg- static / 64bit / lib -static' - extra-libs =' - lxml2 -lexpat -lfreetype' - enable-static --disable-shared --disable-ffserver --disable-doc --enable-bzlib --enable -zlib --enable-postproc --enable-runtime-cpudetect --enable-libx264 --enable-gpl --enable-libtheora --enable-libvorbis --enable-libmp3lame --enable-grey --enable-libass - -enable-libfreetype --enable-libopenjpeg --enable-libspeex --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-version3 --enable-libvpx

我使用以下命令对一个频道进行编码:

ffmpeg -loglevel info -i "udp://@239.1.1.9:1009?fifo_size=1000000&overrun_nonfatal=1" -map 0:p:1:0 -map 0:p:1:1 -vcodec h264 -acodec aac -profile main -preset fast -g 12 -r 23.98 -s 256x144 -aspect 16:9 -b:v 166k -minrate 166k -maxrate 166k -bufsize 166k -vol 512 -b:a 128k -ac 2 -ar 48000 -strict experimental -flags -global_header -f ssegment -segment_time 10 -segment_wrap 30000 -segment_list Food_256x144_main_394.m3u8 -segment_list_flags +live -segment_list_size 6 -segment_format mpegts Food_256x144_main_394-%05d.ts -map 0:p:2:0 -map 0:p:2:1 -vcodec h264 -acodec aac -profile main -preset fast -g 12 -r 23.98 -s 640x360 -aspect 16:9 -b:v 722k -minrate 722k -maxrate 722k -bufsize 722k -vol 512 -b:a 128k -ac 2 -ar 48000 -strict experimental -flags -global_header -f ssegment -segment_time 10 -segment_wrap 30000 -segment_list Food_640x360_main_950.m3u8 -segment_list_flags +live -segment_list_size 6 -segment_format mpegts Food_640x360_main_950-%05d.ts -map 0:p:2:0 -map 0:p:2:1 -vcodec h264 -acodec aac -profile main -preset fast -g 12 -r 23.98 -s 960x540 -aspect 16:9 -b:v 1472k -minrate 1472k -maxrate 1472k -bufsize 1472k -vol 512 -b:a 128k -ac 2 -ar 48000 -strict experimental -flags -global_header -f ssegment -segment_time 10 -segment_wrap 30000 -segment_list Food_960x540_main_1700.m3u8 -segment_list_flags +live -segment_list_size 6 -segment_format mpegts Food_960x540_main_1700-%05d.ts -map 0:p:2:0 -map 0:p:2:1 -vcodec h264 -acodec aac -profile main -preset fast -g 12 -r 23.98 -s 1280x720 -aspect 16:9 -b:v 2772k -minrate 2772k -maxrate 2772k -bufsize 2772k -vol 512 -b:a 128k -ac 2 -ar 48000 -strict experimental -flags -global_header -f ssegment -segment_time 10 -segment_wrap 30000 -segment_list Food_1280x720_main_3000.m3u8 -segment_list_flags +live -segment_list_size 6 -segment_format mpegts Food_1280x720_main_3000-%05d.ts

我在添加第6个编码实例后得到的示例错误消息如下所示(由于日志消息太长,我只粘贴了几行错误消息供参考)

  • [列表=] 2563489 [main] DEBUG com.ivz.streamer.FFmpegStreamer - 来自进程的流:[mpeg2video @ 0x24d2100] 00 motion_type at 1 5 2563490 [main] DEBUG com.ivz.streamer.FFmpegStreamer - 来自进程的流:[mpeg2video @ 0x24d2100] 00 motion_type at 10 6 2563490 [main] DEBUG com.ivz.streamer.FFmpegStreamer - 来自进程的流:[mpeg2video @ 0x24d2100] 00 motion_type at 33 7 2563490 [main] DEBUG com.ivz.streamer.FFmpegStreamer - 来自流程的流:[mpeg2video @ 0x24d2100] ac-tex在37 8损坏 2563490 [main] DEBUG com.ivz.streamer.FFmpegStreamer - 流程流:[mpeg2video @ 0x24d2100]切片不匹配 2563490 [main] DEBUG com.ivz.streamer.FFmpegStreamer - 来自流程的流:[mpeg2video @ 0x24d2100] ac-tex在10 10损坏 2563490 [main] DEBUG com.ivz.streamer.FFmpegStreamer - 来自进程的流:[mpeg2video @ 0x24d2100] 00 motion_type at 5 11 2563490 [main] DEBUG com.ivz.streamer.FFmpegStreamer - 来自进程的流:[mpeg2video @ 0x24d2100] 00 motion_type at 2 12 2563490 [main] DEBUG com.ivz.streamer.FFmpegStreamer - 来自进程的流:[mpeg2video @ 0x24d2100] 00 motion_type at 1 13 2563490 [main] DEBUG com.ivz.streamer.FFmpegStreamer - 来自进程的流:[mpeg2video @ 0x24d2100] 00 motion_type at 16 14 2563490 [main] DEBUG com.ivz.streamer.FFmpegStreamer - 来自进程的流:[mpeg2video @ 0x24d2100] 00 motion_type at 4 15 2563490 [main] DEBUG com.ivz.streamer.FFmpegStreamer - 来自进程的流:[mpeg2video @ 0x24d2100] 00 motion_type at 13 16 2563490 [main] DEBUG com.ivz.streamer.FFmpegStreamer - 来自进程的流:[mpeg2video @ 0x24d2100] 00 motion_type at 6 17 2563490 [main] DEBUG com.ivz.streamer.FFmpegStreamer - 来自进程的流:[mpeg2video @ 0x24d2100] 00 motion_type at 24 18 2563490 [main] DEBUG com.ivz.streamer.FFmpegStreamer - 来自进程的流:[mpeg2video @ 0x24d2100] 00 motion_type at 25 19 2563490 [main] DEBUG com.ivz.streamer.FFmpegStreamer - 来自进程的流:[mpeg2video @ 0x24d2100] 00 motion_type at 4 20 2563490 [main] DEBUG com.ivz.streamer.FFmpegStreamer - 来自进程的流:[mpeg2video @ 0x24d2100] 00 motion_type at 28 21 2563491 [main] DEBUG com.ivz.streamer.FFmpegStreamer - 流程流:[mpeg2video @ 0x24d2100]切片不匹配 2563491 [main] DEBUG com.ivz.streamer.FFmpegStreamer - 来自流程的流:[mpeg2video @ 0x24d2100] ac-tex在38 23损坏 2563491 [main] DEBUG com.ivz.streamer.FFmpegStreamer - 流程流:[mpeg2video @ 0x24d2100] 00 motion_type at 14 24

0 个答案:

没有答案