Re: [FFmpeg-user] ffmpeg create wrong time information

2021-12-22 Thread Gyan Doshi




On 2021-12-21 08:14 pm, Cecil Westerhof via ffmpeg-user wrote:

I have the recording of a zoom meeting where I need to cut out a
portion from and the first little bit has to be blacked out.

I use the following command:
 ffmpeg -y\
 -ss 00:26:05 \
 -to 00:44:04 \
 -i input.mp4 \
 -vf "
  drawbox=enable='between(t, 0, 1.6)' :
 color = black:
 w = in_w :
 h = in_h :
 thickness = fill
 "\
 -acodec copy \
 -vcodec libx264  \
 -crf 23  \
 -preset veryfast \
 output.mkv

This creates a seemingly correct file, with one little problem: the
time starts at 00:00:27 and ends at 00:18:26. (As displayed by the
player mpv.)


This should work. Where are the keyframes in the video stream?

Regards,
Gyan
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] ffmpeg create wrong time information

2021-12-22 Thread Cecil Westerhof via ffmpeg-user
Bouke / Videotoolshed  writes:

>> On 21 Dec 2021, at 19:37, Cecil Westerhof via ffmpeg-user 
>>  wrote:
>> 
>> Cecil Westerhof via ffmpeg-user  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.

If I look at overlay, it says:
Overlay one video on top of another.

I only want to block video for a short while because someone who
should not be visible is visible.


> 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.

The problem is that (in this case, I have used it without problems)
with -ss before the video there is 27 seconds of (hidden) audio. If
the video started 27 seconds I could understand it.

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] ffmpeg create wrong time information

2021-12-22 Thread Bouke / Videotoolshed



> On 21 Dec 2021, at 19:37, Cecil Westerhof via ffmpeg-user 
>  wrote:
> 
> Cecil Westerhof via ffmpeg-user  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
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".