Open low-batt opened 2 years ago
on my end with --video-sync=display-resample
at least the glitch is gone. audio still starts late or rather the video starts too early compared to vlc or quicktime.
what i observed vlc and quicktime start the video at a later point of time, mpv on the other hand shows ~3sec more video at the beginning (the reason why the audio is probably missing). which suggests the video is wrongly 'trimmed'/'offset' within mpv internally, eg it might need to ignore those early video frames(?).
vlc isn't completely glitch free here either. it sometimes shows the first frame (the same as on mpv) and sometimes doesn't and is also 'stuck' for a little bit in some cases at the beginning.
to demonstrate what i mean.
i am not sure if this is a decode, demuxer oder metadata problem. this problem should not be mac specific, maybe someone can confirm? i would remove the mac label in that case.
Yeah this happens on linux too.
Anyone know if the MPEG standard has anything to say about how a compliant player should behave given this file?
FFprobe shows the file has several seconds of video before audio starts.
Playing with VLC some more I was able to see a small glitch at startup. Pausing VLC and backing it up shows it does initially show the same frame as mpv, but then quickly skips to the point where audio starts.
Important Information
Provide following Information:
The visual glitch is that shortly after playback starts the video freezes for a while before continuing to play. One aspect of the problem can be seen in this screenshot taken before playback has started by using the
--pause
option. Notice the current playback position timestamp in the on screen controller is negative:Shouldn't this option, which is enabled by default, have insured the start time is 0?:
Reproduction steps
Merely play the linked video in the sample files section below. The video will start playing without audio. Then the video will freeze. At that point the audio will start playing. Eventually video playback will resume.
The origin of this issue is IINA issue https://github.com/iina/iina/issues/3848. The reporter of that issue has been using Quicktime on a Mac to trim videos. The resulting videos play fine using Quicktime or VLC, but exhibit the undesirable behavior when starting playback if played under IINA or mpv.
The playback behavior experienced in this issue matches the behavior reported in issue https://github.com/mpv-player/mpv/issues/8876. However that issue concerns videos cut by FFmpeg running under Linux and as pointed out in that issue there are other ways to cut files using FFmpeg, for example using the
avoid_negative_ts
option. This issue with videos trimmed by Quicktime is more of a problem as Quicktime does not provide Mac users any options on how videos are trimmed.As in https://github.com/mpv-player/mpv/issues/8876 mpv is reporting A/V desynchronization when playing the file created by Quicktime:
To create a video that demonstrates this problem:
How severe the playback glitch is depends upon where the video is cut in relation to I-frames.
Expected behavior
Mac users trimming a file using Quicktime expect the resulting file will play without glitches using IINA, mpv, Quicktime or VLC.
Actual behavior
The video starts playing without audio. Then the video freezes and the audio starts playing. Eventually the video resumes playing.
Log file
https://0x0.st/oQj7.log
The log file was generated by running mpv like so:
Sample files
https://0x0.st/oQjF.mp4
This is the video
low-batt-mpv-quicktime-trim-issue.mp4
created by using the Quicktime trim function.