Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAudio begins to cut out out after 7 minutes on an RTSP live stream #441
Comments
|
I noticed that their is a small increase in both memory and cpu utilization when the problem occurs but it is small like around 2%. |
|
I will give someone $50 to fix this!! |
|
@popcornmix A couple of questions You state in #445
1. Is this done in omxplayer.cpp code line 1670+ ?
2. Is this the reason of the "C"-option in jmeiners issue #305 ? 3. What's the purpose of the first @sbadger Is the wav file a recording of what you hear? Are the "silences" missing audio parts (so really cut-outs?). By the way, omxplayer plays sbadger wav file not completely, due to failing EOS transmittion. Increased the timeout *2 of GetInputBuffer() in the COMXAudio::SubmitEOS() to fix it. |
|
Yes, the wav file is what I am hearing on the system recorded though my phone. Those audio drops are exactly the problem I am trying to address. That is odd on the .wav playback I didn't get that error, but then again I didn't it back using omxplayer either. The file is only about 28 seconds long |
|
Is it a public live stream which I can use to reproduce this issue? |
|
It is not public accessible stream but a quick google showed several sources of public accessible streams. I have tried several different options with gpu_mem which did increase the timeouts by a minute but that was all. Currently it is the stock Rasberian Jesse install that has the latest updates. Pi:~ $ omxplayer -v |
|
Tried some public rtsp streams, but they all run into the dreadful issue ffmpeg ending (premature) EOF the stream. |
|
I will see if I can find one with audio that will work for at least 10 minutes. I believe you can get VLC or ffmpeg to create a RTSP stream from some local media |
|
I found that audio only RTSP streams seem to work fine. |
|
@jehutting , If i upload the 20 minute of a pcap form the stream can you play it back using tcprelay or whatever to test the stream with the player? |
|
OK, if you give me a guidance in how to set up my Linux Mint 17 PC (/use tcprelay) and my RPI (B/B+/2B/3) in order to run the test. I already donloaded and installed a tcprelay on my PC. Have to figure out how it works :-) |
|
@sbadger Installed nginx on my PC, streaming with ffmpeg a rtmp stream. However I can't connect to it outside my PC. VLC running on my PC shows the stream (not great but it works). I'm stuck... |
|
My network capture was a bad idea, I am working on getting a live stream from a camera that is publicly available so you will have something to test against. A developer friend of mine suggested it might be a "ladder queue" issue where the queue is growing to large and the system can't process it properly. i will post a link to the camera once it is installed. |
|
@jehutting I finally have a publicly available stream you can use. It is just some fan noise for now but I will add a radio or something in the next couple of days. you can find it here |
|
@sbadger Already listening 1.5 hour and you just at 13:00 turned to another station. The previous station was better :-) Still listening... |
|
@jehutting LOL, it was but I didn't think I sitting very well and moved it which lost the station. |
|
@sbadger Until I went to bed, it played without noticing any audio drops. I started listening at RPI-time 18:22:23
At your current time 18:05 I see the video randomly incorrect (from a randomly horizontal line (/position) it repeats this last 'correct horizontal line' till the bottom (forming vertical stripes). Audio is playing OK. I go to bed again...ZZZZZzzzzzzzz |
|
@sbadger It is now 22:38 your (streaming) time. It is still running...no audio drops. I got my own streaming running, it was just a matter of making the port open for public (with iptables). BUT I got not such a nice streaming as yours; a lots of video artifacts. Curious about how you set it up. @anyone: Am I the only one looking/listening to this stream? |
|
@jehutting What firmware version are you running? My PI here has the same problem with this stream as my internal cameras. |
|
@sbadger A RPI model B with I see the light is turned back on... From this afternoon on I have a lot of 'connection timed out' and EOF's causing running just for a couple of minutes, whereas before it ran smoothly for hours. Still don't like the radio station which is currently turned on... |
|
@jehutting It is a PI2 with I will see if can get another station |
|
@sbadger My RPI2 runs on Jessie-Lite
My RPI B runs on wheezy
I will update/upgrade this one to see if I get Feb 1, 2016 too. Since I used omxplayer option Thanks for changing the station :-) and greetings back (waving with my hand too). |
|
@sbadger Any improvement with omxplayer option |
|
Hmm... I just saw your omxplayer version is of 02 jan 2016. |
|
Sergio has updated the build on http://omxplayer.sconde.net which now supports lavfpdopts/avdict. |
|
Thanks @popcornmix & @skgsergio! |
|
We've updated the omxplayer in raspberrypi repo, so |
|
I just updated to omxplayer 6c90c75 and used omxplayer -r -b --avdict rtsp_transport:tcp rtsp://$CAMERA/axis-media/media.amp?resolution=1280x720 --live for the command line and still am seeing the same problems. |
|
I was hoping that the rtsp_transport setting fixed it. With this option I am able to listen to your stream. Without it omxplayer starts complaining 'Connection Time Out' or End-Of-File. Using your stream to find out what the limit/condition is for ffmpeg to bail out; I have to dig deeper... |
|
@sbadger I have two RPIs running and the one with the |
|
@jehutting without the --live it is solid for the last 30 minutes. |
|
Finally we are getting somewhere... I think the rtsp_transport: tcp does the job. Without it, the streaming uses UDP and that protocol doesn't guarantee the deliverance of packets. (Ahem...keep in mind I am not a streaming expert :) At this time I suspect that the I appreciate it when you could run without these two options. |
|
@sbadger I had a look at the
but audio 'seems to pause/resume' (no drop-outs) if not being kicked-out with EOF/Connection time out. So don't use |
|
I have tested the latest (as of yesterday) omxplayer (with --live on RTMP and RTSP streams) and found that if there is some packet loss (quickly disconnect network cable) the video recovers but audio disspears. The omxplayer I was using from last year recovers audio and video just fine. |
|
I have been running for a full week now with no audio issues without the --live option |
|
I guess the issue there is that A) Omxplayer does not send the -fflags nobuffer argument to ffmpeg resulting in a large delay (the probed data isnt discarded) B) Playback speed cant be altered to maintain the threshold value. --live worked fine on older builds. |
|
I've been fighting through this issue recently (funny enough my application is for an rtsp stream as well through an axis communications encoder). So eliminating the --live fixed the issue? I was trying to keep the lowest latency possible so I thought I needed it... but at about 10 minutes my audio starts chunking and never corrects. |
|
That was the same problem I was experiencing but at the 7 minute mark with Axis cameras. After the update and without the live option I have not had the issue come back. The latency has been <3 seconds for me which is acceptable for my usage. |
|
I read all the way to the bottom of this thread to see if @jehutting got his $50 bounty? LOL |
|
I reached out to @jehutting to send the money but I never received a response! |
|
@sbadger Damn it! Despite carefully checking my mailbox for years now, I still managed to miss your mail. (@burnbrigther Just kidding, I did that only for two years! LOL.) |
|
How about I donate it to the EFF? |
|
I had more closer things to your community in mind; a food bank, that kind of donation. But do whatever you pleases the most :-). |
|
I already have the local food banks covered, But I will add another 50 on for you this month. |
After about 7 minutes the audio begins to cut in and out.
I have tried multiple options including -p, -w, -z and -r all with the same results. I have used another vlc to look at the same stream on the same Raspberry Pi and it worked fine so it isn't the stream.
An example wav file and the log file are available in my dropbox here
https://www.dropbox.com/sh/ej5cwo0eav76kah/AAC2_kOWvB-WVF-Qr7mKkt5va?dl=0