ffmpeg:UDP到RTMP流-PES问题/超出范围/宏块损坏
我正在尝试使用ffmpeg将UDP多播传输流视频转换为RTMP视频流 该流由Teracue ENC-300硬件编码器生成。编码器将流作为TS/UDP数据包发送到多播IP 239.252.20.100:4444。 ffmpeg可以转换流,但只能以非常低的比特率和/或存在大量错误 我的ffmpeg命令如下所示:ffmpeg:UDP到RTMP流-PES问题/超出范围/宏块损坏,ffmpeg,udp,rtmp,Ffmpeg,Udp,Rtmp,我正在尝试使用ffmpeg将UDP多播传输流视频转换为RTMP视频流 该流由Teracue ENC-300硬件编码器生成。编码器将流作为TS/UDP数据包发送到多播IP 239.252.20.100:4444。 ffmpeg可以转换流,但只能以非常低的比特率和/或存在大量错误 我的ffmpeg命令如下所示: ffmpeg -re -i udp://@239.252.20.100:4444?buffer_size=32000k -b:v 900k -maxrate 1000k -bufsize
ffmpeg -re -i udp://@239.252.20.100:4444?buffer_size=32000k
-b:v 900k -maxrate 1000k -bufsize 32000k -f flv
"rtmp://127.0.0.1/live/live1" -loglevel debug
我已经尝试过一些easyer代码:
ffmpeg -re -i udp://@239.252.20.100:4444 -f flv
"rtmp://127.0.0.1/live/live1" -loglevel debug
Teracue以1500kbps的比特率生成流。我还尝试了一些更高或更低的比特率。但是ffmpeg的输出只有大约400kbps的最大比特率。如果我使用
-b:v 900k
或者有时候,当没有设置输出比特率时,我会收到很多错误消息,尤其是
PES packet size mismatch
error while decoding MB X X
corrupted macroblock X X
以下是错误代码:
>[h264 @ 000002883adfe800] nal_unit_type: 6(SEI), nal_ref_idc: 0
>[h264 @ 000002883adfe800] nal_unit_type: 1(Coded slice of a non-IDR picture), >nal_ref_idc: 3
>[h264 @ 000002883adfe800] ct_type:1 pic_struct:0
>[mpegts @ 000002883a329340] Continuity check failed for pid 192 expected 4 >got 7
>[mpegts @ 000002883a329340] pid=c0 pes_code=0x1c0
> Last message repeated 1 times
>[mpegts @ 000002883a329340] pid=2c pes_code=0x1e0
>[NULL @ 000002883a33f7c0] ct_type:1 pic_struct:0
>udp://@239.252.20.100:4444?buffer_size=32000k: corrupt decoded frame in
>stream 1
>[h264 @ 000002883a35a240] nal_unit_type: 9(AUD), nal_ref_idc: 0
>[h264 @ 000002883a35a240] nal_unit_type: 6(SEI), nal_ref_idc: 0
>[h264 @ 000002883a35a240] nal_unit_type: 1(Coded slice of a non-IDR picture),
>nal_ref_idc: 3
>[h264 @ 000002883a35a240] ct_type:1 pic_struct:0
>[h264 @ 000002883a35a240] out of range intra chroma pred mode
>[h264 @ 000002883a35a240] error while decoding MB 14 8
>[mpegts @ 000002883a329340] Continuity check failed for pid 44 expected 2 got
>9
>[mpegts @ 000002883a329340] PES packet size mismatch
>[mpegts @ 000002883a329340] pid=2c pes_code=0x1e0
>[NULL @ 000002883a33f7c0] ct_type:1 pic_struct:0
>[h264 @ 000002883a35a240] concealing 845 DC, 845 AC, 845 MV errors in P frame
>[h264 @ 000002883a38f6c0] nal_unit_type: 9(AUD), nal_ref_idc: 0
>[h264 @ 000002883a38f6c0] nal_unit_type: 6(SEI), nal_ref_idc: 0
>[h264 @ 000002883a38f6c0] nal_unit_type: 1(Coded slice of a non-IDR picture), >nal_ref_idc: 3
>[h264 @ 000002883a38f6c0] ct_type:1 pic_struct:0
>[h264 @ 000002883a38f6c0] Frame num gap 28 26
>[mpegts @ 000002883a329340] Continuity check failed for pid 192 expected 9 >got 12
>[mpegts @ 000002883a329340] pid=c0 pes_code=0x1c0
>[mpegts @ 000002883a329340] Continuity check failed for pid 44 expected 1 got >15
>[mpegts @ 000002883a329340] PES packet size mismatch
>[mpegts @ 000002883a329340] pid=2c pes_code=0x1e0
>[NULL @ 000002883a33f7c0] ct_type:1 pic_struct:0
>udp://@239.252.20.100:4444?buffer_size=32000k: corrupt decoded frame in
>stream 1
>[h264 @ 000002883adf1980] nal_unit_type: 9(AUD), nal_ref_idc: 0
>[h264 @ 000002883adf1980] nal_unit_type: 6(SEI), nal_ref_idc: 0
>[h264 @ 000002883adf1980] nal_unit_type: 1(Coded slice of a non-IDR picture),
>nal_ref_idc: 3
>[h264 @ 000002883adf1980] ct_type:1 pic_struct:0
>[h264 @ 000002883adf1980] mb_type 41 in P slice too large at 18 9
>[h264 @ 000002883adf1980] error while decoding MB 18 9
>[h264 @ 000002883adf1980] concealing 796 DC, 796 AC, 796 MV errors in P frame
>[mpegts @ 000002883a329340] pid=c0 pes_code=0x1c0
>[NULL @ 000002883a33f7c0] ct_type:1 pic_struct:0
>[h264 @ 000002883adf20c0] nal_unit_type: 9(AUD), nal_ref_idc: 0
>[h264 @ 000002883adf20c0] nal_unit_type: 7(SPS), nal_ref_idc: 3
>[h264 @ 000002883adf20c0] nal_unit_type: 8(PPS), nal_ref_idc: 3
>[h264 @ 000002883adf20c0] nal_unit_type: 6(SEI), nal_ref_idc: 0
>[h264 @ 000002883adf20c0] nal_unit_type: 5(IDR), nal_ref_idc: 3
>[h264 @ 000002883adf20c0] ct_type:1 pic_struct:0
>[h264 @ 000002883adf20c0] corrupted macroblock 3 0 (total_coeff=-1)
>114.0kbits/s speed= 1x
>[h264 @ 000002883adf20c0] error while decoding MB 3 0
>[mpegts @ 000002883a329340] pid=c0 pes_code=0x1c0
有什么解决办法吗