Trying to stream a webcam through rtp with a raspberry pi.
Cating the SDP file on my desktop, and launching ffplay:
then streaming out this way:
ffmpeg -i /dev/video0 -c:v h264_omx -f rtp rtp://192.168.0.101:1234
works perfectly. But If I launch ffmpeg first THEN ffplay, ffplay stutters some error message about missing PPS and never displays any frame:
[h264 @ 0x7fd97c0008c0] decode_slice_header error
[h264 @ 0x7fd97c0008c0] no frame!
[h264 @ 0x7fd97c0008c0] non-existing PPS 0 referenced
After looking for a while I understand some intermediary frame might be missing. However, using the
-g option this way does not change anything:
ffmpeg -i /dev/video0 -c:v h264_omx -g 30 -f rtp rtp://192.168.0.101:1234
It is a problem for me because I am using the raspberry as a securiy camera. My desktop can be restarted from time to time and I need ffplay to be able to catch after the streaming is started.
Any help is appreciated.