[FFmpeg-user] ffmpeg create wrong time information

Bouke / Videotoolshed bouke at videotoolshed.com
Wed Dec 22 11:47:47 EET 2021



> On 21 Dec 2021, at 19:37, Cecil Westerhof via ffmpeg-user <ffmpeg-user at ffmpeg.org> wrote:
> 
> Cecil Westerhof via ffmpeg-user <ffmpeg-user at ffmpeg.org> writes:
> 
> After some experiments I solved it by putting -ss and -to behind -i
> and not forgetting to alter the between values.
> But this takes about a third more time.
> Is there be a better solution?
> 
> I am now using:
>    ffmpeg -y                                         \
>        -i input.mp4                                  \
>        -ss 00:26:05                                  \
>        -to 00:44:04                                  \
>        -vf "
>             drawbox=enable='between(t, 1565, 1566.6)':
>                color     = black                     :
>                w         = in_w                      :
>                h         = in_h                      :
>                thickness = fill
>        "                                             \
>        -acodec copy                                  \
>        -vcodec libx264                               \
>        -crf 23                                       \
>        -preset veryfast                              \
>        output.mkv

I think you are inserting black, not overlaying (blanking) the video. Try -vf overlay.
With -ss before input, it will do a faster search, you might have to do a bit of math on the enable= range, but that will become very obvious with a small test.

Bouke


More information about the ffmpeg-user mailing list