1

I won't take much time from you...

I am streaming a fragmented mp4 from ffmpeg with this command-line

ffmpeg  \
-f video4linux2  \
-video_size 640x480 \
-framerate 60 \
-i /dev/video0 \
-c:v h264_omx \
-b:v 500k \
-movflags frag_keyframe+empty_moov  \
-f mp4 udp://192.168.1.196:1234

Then on my host (the IP from above) I use a simple ffplay command-line

ffplay -fflags nobuffer udp://0.0.0.0:1234

The results are pretty good with a latency of half a second.

The problem is that after, let's say, 30s, the video freezes but everything is still sending frames and receiving frames.

I discovered that at streaming time some frames are being dropped and being FMP4..... frames dropped may cause this?

I would like to know how to prevent this freezing because if I increase the fps to 90 (which reduces the latency to 350ms) the video freezes earlier (frames being dropped before)

Thanks

6
  • When you say "fragmented", do you mean you are streaming a segmented file, or that it may be actually fragmented on your drive? If the latter, have you tried "e4defrag" in Terminal?
    – user1019780
    Commented Apr 12, 2020 at 10:10
  • why have you disabled buffering in the client? it seems like that might help. Commented Apr 12, 2020 at 10:17
  • @FrankThomas nobuffer only skips the buffer used to hold initial frames when the app is probing the input.
    – Gyan
    Commented Apr 12, 2020 at 11:19
  • @Didier Well I am little newbie here on video streaming. I thought that streaming from the pi camera using ffmpeg and enabling the movflag fragkey will convert the output mp4 into a fragmented mp4 Commented Apr 12, 2020 at 11:22
  • @Gyan then ffplay still has buffer after the start? Commented Apr 12, 2020 at 11:22

0

You must log in to answer this question.

Browse other questions tagged .