I found a rtp h264 stream with payload type 98, it can be directly play without sdp file by run ffplay -v trace -i udp://127.0.0.1:9880, but it's a rtp stream.
I built a stream by run
ffmpeg -re -framerate 10 -loop 1 -i ./raw.jpeg -vcodec libx264 -bf 0 -g 24 -payload_type 98 -f rtp rtp://127.0.0.1:9880
then,run ffplay -v trace -i udp://127.0.0.1:9880
output:
Initialized opengl renderer.
[NULL @ 0x7f58d4000b80] Opening 'udp://127.0.0.1:9880' for reading
[udp @ 0x7f58d4001680] No default whitelist set
[udp @ 0x7f58d4001680] end receive buffer size reported is 131072
Probing mp3 score:1 size:2048q= 0KB vq= 0KB sq= 0B f=0/0
Probing mp3 score:1 size:4096
Probing mp3 score:1 size:8192
Probing mp3 score:1 size:16384
nan : 0.000 fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0
[AVIOContext @ 0x7f58d4021ea0] Statistics: 1049843 bytes read, 0 seeks
udp://127.0.0.1:9880: Invalid data found when processing input
ffplay can not probe the format
I captured the udp packet,and compared,then found out that stream's every NAL is 0,and my stream's ,some NAL is 0,some NAL is not.
[ NAL is 0 in every rtp packet] [1]: https://i.sstatic.net/Jm0Pq.png
[ NAL is not 0 ] [2]: https://i.sstatic.net/GT0Im.png
How to build a rtp h264 stream with every NAL is 0?
Why that rtp stream can be play without sdp file? Thanks