Skip to content
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

CD Graphics video [lavc:cdgraphics] skips forward, gets off-sync with Karaoke track #3027

Closed
clintonthegeek opened this issue Apr 6, 2016 · 12 comments

Comments

@clintonthegeek
Copy link

When playing a .cdg file (graphic file displaying lyrics for karaoke music) and accompanying audio track the seekbar skips forward immediately to the next animation in the file instead of pausing for the appropriate duration. This results in the lyrics getting off-sync with the audio track, and mpv skipping over intros, instrumental sections, or any part of a song where the graphics should be paused.

@richardpl
Copy link
Contributor

Please provide files.

@ghost ghost removed the meta:info-needed label Apr 6, 2016
@ghost
Copy link

ghost commented Apr 6, 2016

So a frame can "Freeze" for a few seconds. The playback core can't know if it's a discontinuity or not. (If there's a jump, should it wait for a few seconds? Or consider it as a discontinuity?)

@richardpl
Copy link
Contributor

Packet duration?

@ghost
Copy link

ghost commented Apr 7, 2016

@richardpl:

[PACKET]
codec_type=video
stream_index=0
pts=528
pts_time=1.760000
dts=528
dts_time=1.760000
duration=1
duration_time=0.003333
convergence_duration=N/A
convergence_duration_time=N/A
size=24
pos=12672
flags=_
[/PACKET]
[PACKET]
codec_type=video
stream_index=0
pts=1129
pts_time=3.763333
dts=1129
dts_time=3.763333
duration=1
duration_time=0.003333
convergence_duration=N/A
convergence_duration_time=N/A
size=24
pos=27096
flags=K
[/PACKET]

Completely useless, as usual.

@richardpl
Copy link
Contributor

Will look is this bug in demuxer...

@ghost
Copy link

ghost commented Apr 7, 2016

Even then, many external decoders I have to deal with will not pass through pkt_duration or even know a correct value of it, so this is not a general solution.

@ghost
Copy link

ghost commented Apr 7, 2016

PS: also, mpv does this after filters, and filters are unlikely to pass this through.

@ghost
Copy link

ghost commented Apr 7, 2016

I per-packet/frame discontinuity flag would be a good concept, because the demuxer knows best whether something is a timestamp reset or not. A decoder could also set it if frames are dropped/packets are invalid. But unfortunately it doesn't exist in ffmpeg, and even if it were introduced, wouldn't be consistent.

@tmm1
Copy link
Contributor

tmm1 commented May 18, 2018

@clintonthegeek can you provide a sample file so I can test it with #5792

@clintonthegeek
Copy link
Author

SC8322-01 - Moody Blues, The - I'm Just A Singer In A Rock And Roll Band.zip

This file had the problem when I initially reported the bug.

@tmm1
Copy link
Contributor

tmm1 commented May 19, 2018

Interesting, I've never seen cdg before. How do you play the files together with mpv?

@clintonthegeek
Copy link
Author

Once you open the .cdg any .mp3 (or, perhaps, other audio format?) is sideloaded as long as it shares the same filename and is in the same folder. :)

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants