[FFmpeg-user] When cutting part of video I get a silence part before it

Cecil Westerhof Cecil at decebal.nl
Sat Aug 15 13:49:38 EEST 2020

In the past I had sometimes the following strange problem. When
cutting a part out of a video with:
    ffmpeg -y                                    \
           -ss "${startSeconds}"                 \
           -i  "${INPUT_FILE}"                   \
           -to "$((stopSeconds - startSeconds))" \
           -acodec copy                          \
           -vcodec copy                          \
           -async 1                              \

sometimes before the selected video was put something extra that was
silent and had a negative time index.

At a certain point I found out that it had to do when compressing the
file with:
      ffmpeg -y              \
        -i "${_inputfile}"   \
        -vcodec libx264      \
        -crf 23              \
        -acodec libmp3lame   \
        -preset veryfast     \

The reason that I did this was that the original file was between four
to thirteen times bigger, without me seeing a quality loss.
Most of the times I did not have this problem, but sometimes I did.
When first cutting the video and then compressing it I did not have
this problem.

Sadly the problem emerged again. :'-(
I have to publish recordings of a Zoom meeting. They are very small
(not even 10 MB pro minute) and I got the same problem. I have to
generate some logging (I use ffmpeg through bash and tcl scripts), but
was wondering if somebody knows what could generate this kind of
problems and what to do about it.
I will later on share some logging.

Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof

More information about the ffmpeg-user mailing list