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
BUG: Fix video on Windows for Pyglet > 1.3 #439
Conversation
Just got a chance to test. The video does play, but it's clearly sped up for me too on Windows (playback time around 1s). For kicks I also tried it on another mp4 file and the same thing happens, with a bunch of dropped frames. Audio cuts out at this shortened video end time as well. |
Okay we should probably fix the timing before bothering to merge this... maybe you should stick with 1.3 + AVBin until this part is solved, since I think the timing might work there...? |
Okay this plus pyglet/pyglet#533 fixes playback speed for me. Feel free to try it @JustinTFleming , hopefully the pyglet devs agree with my fix (or point out a better one!). |
FWIW the "alpha on Windows" bug is fixed by pyglet/pyglet#534, but this PR shouldn't hurt anything in the meantime. @JustinTFleming if you update to latest |
Yes, videos are now the correct duration on Windows as well, and With that working, I tried changing the video file in
|
@JustinTFleming can you look into which video backend is being used / configuring Pyglet, and make sure it's |
Bit of guesswork here, not being very familiar with pyglet, but in
I can try moving the ffmpeg block ahead of wmf and see if that changes anything (for better or worse). |
Ooh, moving up the ffmpeg block makes a huge difference in playback quality -- drastically better. I think you were right @larsoner that it was defaulting to WMF! I currently have no audio, but I'm testing at home without my usual RME setup, so I'll try this in the lab before getting alarmed about that. |
Okay I opened pyglet/pyglet#535, let's see what they say |
We had two problems, I think:
pyglet.clock.tick(poll=True)
to get the video to advance, and(2) has been opened upstream as a Pyglet bug (pyglet/pyglet#531), but the workaround here should be fine.
@JustinTFleming can you test it with latest pyglet (1.5.21) and pyglet-ffmpeg?
FWIW @drammock for me when I play the video it plays way too fast on Linux -- it should take ~6 sec but it takes ~1. But this seems to be the case with newer Pyglet even before these PRs. Do you want to take a look? IIRC you worked on the timing stuff originally...?