Grey Frames for Seconds 0-1 of Video


The problem:

I have been struggling with this problem for more than a few days now, so hopefully I can post here to get some ideas.

I am streaming a video from rtsp server created from this link:

The pipeline for this stream is: filesrc location=buck_bunny.mp4 ! qtdemux ! h264parse ! decodebin ! avenc_mpeg4 ! rtpmp4vpay name=pay0 pt=96

I am streaming to a mobile app using the flutter_vlc_player package to play the video.

I tested with an example link that isn’t from my server and the app was able to play the video with good quality, therefore I think the issue is not with my app but the server.

Whenever I begin to stream from the server, the first second is greyed out frames with incomplete images. Also, the framerate is slow. I would like to address both of these issues if I can, but preferably the greyed out frames first.

What I’ve Tried:

I’ve tried different file types and got different results. For H264 file type I don’t get grey frames but I do drop frames. For MP4 filetype, I get grey frames and slow framerate but the whole video plays without dropping frames.

I’ve tried gstreamer plugins like videorate and videoscale but that hasn’t worked. Also tried different options for each of the plugins, but the issue still persists.

Any ideas would be welcome.

I don’t think I need to post any code here, but if there is any more insight anyone needs I can provide.

Thank you!

We would suggest encode to h264/h265 stream via hardware encoder for a try. Please refer to steps in Jetson Nano FAQ
Q: Is there any example of running RTSP streaming?

And the gstreamer version is 1.14.5, so please use test-launch of 1.14.5.

Thank you.

I need to see if there are gstreamer commands supporting hardware encoding on the raspberry pi 3b+. I am using it as a server and the nano is used for camera. I will update if I get any more progress.

I do have a spare nano laying around and could replace that as a server, but I would think 3b+ is sufficient for this application.

On Jetson Nano, please try the command and check if you can stream is well decoded:

gst-launch-1.0 rtspsrc location="__RTSP_PATH__" latency=500 ! rtph264depay ! h264parse ! nvv4l2decoder ! nvoverlaysink
1 Like

I can try this. If this info helps, I was able to see the same issue on vlc media player using iphone app.

Used different video player package for app. Works a lot better with my server.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.