Sto provando a testare ffmpeg streaming con RTP
tramite il file SDP locale. Quindi per avviare il flusso che corro
ffmpeg -re -thread_queue_size 4 -i .\bbb_streamable.flv -strict -2 -vcodec copy -an -f rtp rtp://127.0.0.1:6005 -acodec copy -vn -f rtp rtp://127.0.0.1:7005
Questo mi dà il seguente SDP
v=0
o=- 0 0 IN IP4 127.0.0.1
s=Big Buck Bunny, Sunflower version
t=0 0
a=tool:libavformat 58.10.100
m=video 6005 RTP/AVP 96
c=IN IP4 127.0.0.1
b=AS:3500
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1; sprop-parameter-sets=Z2QAKKzZQHgCJ+XARAAAAwAEAAADAPA8YMZY,aOrssiw=; profile-level-id=640028
m=audio 7005 RTP/AVP 97
c=IN IP4 127.0.0.1
b=AS:96
a=rtpmap:97 MPEG4-GENERIC/44100/2
a=fmtp:97 profile-level-id=1;mode=AAC-hbr;sizelength=13;indexlength=3;indexdeltalength=3; config=121056E500
Quindi per registrare lo stream RTP in un'altra finestra eseguo:
ffmpeg -protocol_whitelist "file,rtp,udp" -i .\test.sdp -strict -2 test.flv
Mentre ciò accade, ricevo costantemente messaggi in ffmpeg sui pacchetti persi
[sdp @ 0000020b70f2aa80] max delay reached. need to consume packete=2149.1kbits/s dup=0 drop=1 speed= 1.2x
[sdp @ 0000020b70f2aa80] RTP: missed 230 packets
[h264 @ 0000020b71456ec0] error while decoding MB 20 11, bytestream -45
[h264 @ 0000020b71456ec0] concealing 6869 DC, 6869 AC, 6869 MV errors in I frame
[sdp @ 0000020b70f2aa80] max delay reached. need to consume packete=2119.4kbits/s dup=0 drop=1 speed=1.17x
[sdp @ 0000020b70f2aa80] RTP: missed 208 packets
[h264 @ 0000020b70ff5f80] error while decoding MB 116 12, bytestream -13
[h264 @ 0000020b70ff5f80] concealing 6653 DC, 6653 AC, 6653 MV errors in I frame
[sdp @ 0000020b70f2aa80] max delay reached. need to consume packete=2107.8kbits/s dup=0 drop=1 speed=1.15x
[sdp @ 0000020b70f2aa80] RTP: missed 17 packets
[h264 @ 0000020b70ff5f80] error while decoding MB 22 48, bytestream -7
[h264 @ 0000020b70ff5f80] concealing 2427 DC, 2427 AC, 2427 MV errors in P frames dup=0 drop=1 speed=1.14x
[sdp @ 0000020b70f2aa80] max delay reached. need to consume packet
[sdp @ 0000020b70f2aa80] RTP: missed 210 packets
Quando si visualizza il file FLV generato, ci sono un sacco di artefatti e problemi. Il file sorgente è pulito al 100%.
Perché si sta comportando così male, persino finita 127.0.0.1
?