-
Notifications
You must be signed in to change notification settings - Fork 141
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
Audio/video desync as time passes #51
Comments
|
Hiya, @mbattista !
Best, |
|
Okay I briefly tested this but it doesn't seem player is better at this (furthermore, it does seem to stop sometimes for no reason but it may be due to my poor configuration). Theoretically I can duplicate my tabs to hear the desync even clearer but then let's say one tab would get behind it would blur the results, so I won't make assumptions. However video is clearly "behind" the audio after a few minutes. Of course I am happy to test/send anything to help. Best, |
Improving the demo player is something I wanted to do. But since calling the Video stream works so flawlessly I never prioritised it. Can you call the stream ( I opened a Bug Report for chromium 86 last year because the ffmpeg which was shipped with this version threw a demuxer error. ( https://bugs.chromium.org/p/chromium/issues/detail?id=1147209#c6 ). So perhaps chromium 96 has a out of sync bug this time? |
Sure, this may be the case also, I can also try other browsers. But I was thinking you guys can first verify it's not only for me? (cause it may be my misconfigured stream still, then stream-m is okay and it's my fault) |
Hi, thanks for all the info you guys collected, I'm trying to reproduce this issue and have one candidate. In my case OBS encodes a 48k audio stream, but in the metadata is reports 44k. This can cause timing issues because I re-calculate the timestamps (instead of trusting the client - which in this case would be better). I found this issue by looking at a Wireshark dump (using 1935 as Now I want to parse sample rate out of the AudioDecoderConfig section. I'm not saying this is the same issue manifesting in your system, but cleaning up the timing code could not hurt. |
A quick update: timing looks OK, I tried two different methods, both have the same effect. Although I am experiencing a different audio-issue from what @Matgoeth describes (audio starts stuttering for me after some time, maybe the same issue just my slightly older i5-4590 manifests it differently). Now I'm looking into mp4 generation, there are a lot of combination of mp4 features you can use or not use. MPEG-DASH defines some of these, but as I see nobody truly implements it. - So now I'll fire up ISOViewer and check out a few chunks youtube is sending, and maybe I can come up with an mp4 that Chrome likes. |
Thanks @vbence ! Do you think it's chrome that generates an issue then? Ofc I am happy to help if there's something not too deep with streaming/encoding (therefore my knowledge will be sufficient :) ) |
Hi I created a new branch, The first, I added a second one, I would ask you to help with two experiments; first you can do everything as you did in the original report, the two questions:
And in the second scenario I'd like you to try to reproduce the issue but using a "Media Source" in OBS (instead of capturing audio/video). As media file you can use the same one I am testing with: https://download.blender.org/demo/movies/BBB/bbb_sunflower_1080p_30fps_normal.mp4
Edit: small |
Hi @vbence , good work here! Sorry for not replying for some time, it's not easy to find some time between years end and another beginning right now. I didn't have the chance to gather more people so I was not able to test it out properly in the same manner but in order not to stop issue I've recompiled branch you've mentioned and simply streamed for about 20 mins to my other device (android smartphone) and...
As for now I am looking for a chance to test it out a little more (and hopefully with wider audience). Anyone else willing to try, please do so. |
I've managed to gather someone else on stream too and... here are logs Generally:
Basically I don't know what the problem is unfortunately :( |
Hello, vbence! First of all: thanks for this project, even though it's prototype it certainly works wonders!
However, once I start streaming after some time audio and video does desync: I believe audio gets behind the video, but I may need to test this a bit more. As for now I'd like to highlight this issue with somewhat vague info, but I am happy to help if there's need for any specific info (I glanced through the code myself but it seemed like "pieces" of videos [MovieFragments in your class nomenclature] do contain all the data and they are not separated streams but I didn't spend too much time on this).
Anyway:
Receiving end were PCs/laptops with Google Chrome v 96.0.4664.110 (yeah, I didn't check other browsers, just me and my "testers/watchers") - for most of the time refreshing the stream resolved problem for them for next 10 minutes or so.I verified this is also the case for me and refreshing did seem to help.
I was streaming using OBS using rtmp protocol, CBR 5000kbps 1080p with 30 frames (keyframe interval was set to 2, PC is rather hi-end with i9-9900k, so fully capable of streaming such content with very rare frame drops). I was streaming to localhost (so basically there's no latency between OBS sender and stream-m receiver) and I was having 3 people watching which shouldn't be an issue having 20mbps upload (saying "shouldn't", I didn't do any fancy stats.
Of course I am happy to help/log anything more if it's needed: I do have quite good java knowledge, just almost zero knowledge when it comes to encoding/streaming (I mostly do around other types of apps)
Once again, thanks a lot for your app!
The text was updated successfully, but these errors were encountered: