UltraStar-Deluxe / USDX

The free and open source karaoke singing game UltraStar Deluxe, inspired by Sony SingStarâ„¢
https://usdx.eu
GNU General Public License v2.0
832 stars 160 forks source link

In 1.3 there are some videos jitter and stutter - but those were playing okay in 1.1 #118

Closed diver66 closed 7 years ago

diver66 commented 8 years ago

I noticed that some videos stutter and jitter in the preview and also when they being reproduced. In the old version 1.1 they were playing okay. Is there a way I could upload one of his jittery movies, so you guys can have a look at it ?

basisbit commented 8 years ago

what file ending does the video file have? By jitter, do you mean that the video stutters (frames out of order) or that the video is like maybe 200ms late?

diver66 commented 8 years ago

thanks for the quick reply, the videos actually shake, jitter and stutter. The file ending is always MP4.

basisbit commented 8 years ago

Please try if renaming the file ending to something else and then adjusting the filename in the .txt solves the issue.

diver66 commented 8 years ago

Yes, now it works, just by renaming the filename extension to *.abc should I go ahead and do this to all the mp4s in question, or is there an easier way or might this be working in a future version of ultrastar ?

basisbit commented 8 years ago

We will fix that issue within the next months because this is quite a critical issue.

basisbit commented 7 years ago

@s09bQ5 could you maybe help us and try to fix this issue? When setting fCodecContext^.flags := CODEC_FLAG_LOW_DELAY; in UVideo::TVIDEO_FFmpeg.Open , then AVI encoded videos do stutter (video frames are played out of order). The CODEC_FLAG_LOW_DELAY flag is currently required to have video and audio in sync. This problem appeared when we switched from ffmpeg 2.6 to ffmpeg 2.8.

s09bQ5 commented 7 years ago

I can't seen to be able to reproduce this with my videos. Can someone upload a test video somewhere (Google Drive, Dropbox, WeTransfer, ...)? Or are there ffmpeg encoding parameters that definitely create an affected video?

According to #160 we have a video delay if we don't use CODEC_FLAG_LOW_DELAY and according to this issue frames might be returned by the decoder in the wrong order if we do use CODEC_FLAG_LOW_DELAY. Sounds to me like we should not use the flag and instead try to find the correct pts.

basisbit commented 7 years ago

here some example file with video frames out of order when CODEC_FLAG_LOW_DELAY is set (just comment out the if avi check in TVIDEO_FFmpeg.Open.

basisbit commented 7 years ago

verified that this pr fixes playback of the mentioned videos