Ошибка потоковой передачи ffmpeg: av_interleaved_write_frame (): сломанный канал - PullRequest
1 голос
/ 18 июня 2020

Я пытаюсь транслировать видео в прямом эфире с помощью ffmpeg, вход из источника UDP. В большинстве случаев он работает нормально, но я мог видеть следующие строки журнала и ffmpeg stop преобразование / подачу pu sh на сервер rtmp. Несколько строк журнала ниже для справки. Связана ли эта проблема с сетью при достижении пункта назначения или источника или с чем-то, что мне нужно изменить в команде ffmpeg?

Wed Jun 17 07:53:22 2020 av_interleaved_write_frame(): Broken pipe
Wed Jun 17 07:53:48 2020     Last message repeated 1 times
Wed Jun 17 07:53:48 2020 av_interleaved_write_frame(): End of file
Wed Jun 17 07:53:49 2020     Last message repeated 1 times
Wed Jun 17 07:53:49 2020 [flv @ 0x40c87c0] Failed to update header with correct duration.
Wed Jun 17 07:53:49 2020 [flv @ 0x40c87c0] Failed to update header with correct filesize.
Wed Jun 17 07:53:49 2020 Error writing trailer of rtmp://ipaddress:1935/rtmp/push/test1: Broken pipe
Wed Jun 17 07:53:49 2020 [flv @ 0x48fe140] Failed to update header with correct duration.
Wed Jun 17 07:53:49 2020 [flv @ 0x48fe140] Failed to update header with correct filesize.
Wed Jun 17 07:53:49 2020 Error writing trailer of rtmp://ipaddress:1935/rtmp/push/test2: Broken pipe
Wed Jun 17 07:53:49 2020 [flv @ 0x4ccb5c0] Failed to update header with correct duration.
Wed Jun 17 07:53:49 2020 [flv @ 0x4ccb5c0] Failed to update header with correct filesize.
Wed Jun 17 07:53:49 2020 Error writing trailer of rtmp://ipaddress:1935/rtmp/push/test3: End of file
Wed Jun 17 07:53:49 2020 [flv @ 0x4725840] Failed to update header with correct duration.
Wed Jun 17 07:53:49 2020 [flv @ 0x4725840] Failed to update header with correct filesize.
Wed Jun 17 07:53:49 2020 Error writing trailer of rtmp://ipaddress:1935/rtmp/push/test4: Broken pipe
Wed Jun 17 07:53:49 2020 video:10594389kB audio:678081kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Wed Jun 17 07:53:49 2020 [libx264 @ 0x410c540] frame I:12400 Avg QP:19.58  size: 11797
Wed Jun 17 07:53:49 2020 [libx264 @ 0x410c540] frame P:359585 Avg QP:23.19  size:  1317

Добавление команды ffmpeg ниже:

ffmpeg -err_detect aggressive -fflags discardcorrupt -i udp://230.1.1.2:11000?fifo_size=5000000&overrun_nonfatal=1 -analyzeduration 25M -probesize 50M -threads 0 -vsync 1 -filter_complex [i:0x202]yadif,setdar=16/9[1out1];[i:0x202]yadif,setdar=16/9[1out2];[i:0x202]yadif,setdar=16/9[1out3];[i:0x202]yadif,setdar=16/9[1out4] -map [1out1] -map i:0x29e -c:v libx264 -x264-params nal-hrd=cbr -b:v 200k -maxrate 200k -bufsize 300k -r 15 -g 30 -profile:v baseline -level 3.0 -pix_fmt yuv420p -c:a libfdk_aac -b:a 32k -ac 2 -ar 48000 -sc_threshold 0 -s 256x144 -tune film -af aresample=async=1:min_hard_comp=0.100000:first_pts=0 -x264opts opencl -f flv rtmp://ipaddress:1935/rtmp/push/test1-map [1out2] -map i:0x29e -c:v libx264 -x264-params nal-hrd=cbr -b:v 500k -maxrate 500k -bufsize 750k -r 25 -g 50 -profile:v baseline -level 3.0 -pix_fmt yuv420p -c:a libfdk_aac -b:a 64k -ac 2 -ar 48000 -sc_threshold 0 -s 512x288 -tune film -af aresample=async=1:min_hard_comp=0.100000:first_pts=0 -x264opts opencl -f flv rtmp://ipaddress:1935/rtmp/push/test2 -map [1out3] -map i:0x29e -c:v libx264 -x264-params nal-hrd=cbr -b:v 1000k -maxrate 1000k -bufsize 1500k -r 25 -g 50 -profile:v main -level 3.0 -pix_fmt yuv420p -c:a libfdk_aac -b:a 64k -ac 2 -ar 48000 -sc_threshold 0 -s 1024x576 -tune film -af aresample=async=1:min_hard_comp=0.100000:first_pts=0 -x264opts opencl -f flv rtmp://ipaddress:1935/rtmp/push/test3 -map [1out4] -map i:0x29e -c:v libx264 -x264-params nal-hrd=cbr -b:v 1800k -maxrate 1800k -bufsize 2700k -r 25 -g 50 -profile:v main -level 3.1 -pix_fmt yuv420p -c:a libfdk_aac -b:a 64k -ac 2 -ar 48000 -sc_threshold 0 -s 1280x720 -tune film -af aresample=async=1:min_hard_comp=0.100000:first_pts=0 -x264opts opencl -f flv rtmp://ipaddress:1935/rtmp/push/test4
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...