New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
omxplayer can't catch up properly with an already long running RTSP stream #617
Comments
So, it seems it is an omxplayer bug: I have tested my stream with VLC on iPad, and, it could catch up with the stream at any time seamlessly. I'm compiling omxplayer to test latest version |
I've compiled omxplayer from sources and tried again: problem still occurs... |
So, I've made a packet capture of an RTP session with a VLC client on a mac (which works flawlessly) Here are some information about the streams and sessions. Do you see something that could explain omxplayer's behavior? Best regards, Cyrille SDP:
RTSP SETUP REPLIES:
First RTP payloads:
First Sender reports
|
Hi, I've captured omxplayer's log and RTSP packets for both a properly working and a non-working playback (in this case, only audio was working). Can you figure out what's going wrong (RTSP service is on port 9090)? Best regards omxplayer_bad.log |
Hello, For information, yesterday I made some tests and it seems that lowering (on the encoding size) x264's keyint parameter from (its default of) 250 to 50 solves the issue. I must still validate this solution in the long term, but, yesterday I could restart omxplayer something like 10 times and every time it played both stream properly (while with the default keyint value of 250, omxplayer had something like 30% of success playing both streams succesfully (that's: I needed to restart omxplayer about 3 times in order to be sure omxplayer decodes both streams successfully)) Could it be that ffmpeg's default probesize prevented it to properly detect the streams info (via avformat_find_stream_info?) when a key frame only occurs every 10 seconds? BR |
Hello, I just want to say that the BR |
I'm still having the problem. Anyone could help me troubleshoot? Do you think the weird DTS/PTS behaviour is a good trail? A working workaround at the moment, is to make sure omxplayer is started before the screencasting |
I don't know yet if the bug is in omxplayer or not, but I thought I had enough info to be worth reporting.
I have a VLC streaming server streaming over RTSP:
/usr/bin/vlc -I dummy --quiet screen:// :screen-fps=25 --input-slave=pulse://alsa_output.pci-0000_00_03.0.hdmi-stereo.monitor --sout '#transcode{vcodec=h264,venc=x264{profile=baseline,level=3,preset=ultrafast,tune=zerolatency},vfilter=canvas{width=852,height=480},acodec=aac,ab=128,channels=2,samplerate=44100}:rtp{sdp=rtsp://:9090/kodi.sdp}'
Now, if I connect with omxplayer to this server soon after VLC being started, omxplayer will play the stream just OK.
But, if I wait a few minutes before connecting with omxplayer, omxplayer will always miss either the audio or the video stream and eventualy hangs after a few minutes.
By using the
--stats
option, I can see the Ca or Cv buffer (depending of the missing stream) usage growing until it reaches its maximum (as per the video_queue or audio_queue setting) which is when omxplayer hangs.Looking at the logs, I can that in such cases the DTS/PTS of the audio and video streams are totally unrelated which is what I suspect is the problem.
Does that ring a bell to someone? Is that a bug in omxplayer or a bug in my mpeg-ts stream?
Best regards,
Cyrille
===============
Example when I only get video output:
Example when I only get audio output:
Example when both streams are output (ie: when I connect omxplayer quickly enough):
The text was updated successfully, but these errors were encountered: