[FFmpeg-user] First 10 seconds don't work well

Carl Eugen Hoyos ceffmpeg at gmail.com
Fri Mar 27 15:38:36 EET 2020

Am Fr., 27. März 2020 um 13:00 Uhr schrieb Resh via ffmpeg-user
<ffmpeg-user at ffmpeg.org>:

> I noticed an "error" on ffmpeg.
> When I use it to cut movies, or to extract parts of a movie, the video of the cut
> piece reproduces the first 10 seconds only audio, after which part audio and
> video synchronized. I did several tests on different types of files.

You should have added that this depends on the player, ffplay should
work better than MPlayer for this specific case.

> I give an example to be more precise:
> ffmpeg -i input.mp4 -ss 60 -to 600 -c copy output.mp4.
> output.mp4 first 10 seconds is not visible, but the audio yes. After about 10

"Not visible" is of course the ideal outcome, I would say it gets problematic
only if the player starts playing audio and video and some time passes until
A/V sync is restored.
(Theoretically, there should be a player that skips the first seconds of audio.)

> seconds of output.mp4, both are present. It's not dependent of output.mp4
> lenght or duration.

> How do you solve this problem?

By re-encoding or choosing a value for -ss that closely aligns with a keyframe.

Carl Eugen

More information about the ffmpeg-user mailing list