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
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.