0

I am trying to make a copy of one of my mp4 movies with audio intact, but blacking out video frames only on the last few minutes. Basically I want to keep the end credit music but without the artifacted video.

I found this answer: which works perfectly for an entire mp4 file (including a test fragment I made of the above ending credits sequence), but I need it applied as I stated above to just the end of the entire copied full mp4.

In this case I don't want to start blanking the video stream frames until after 2h 7m 30s. I messed around with combinations of the -ss, -start_time and -timecode 02:07:31 params, but I'm an ffmpeg noob and couldn't get it to produce anything but cut-out sections or the whole copy blanked.

Any guidance would be greatly appreciated!

fourells5
  • 15
  • 2

1 Answers1

0

You can use the drawbox filter to black those frames out.

ffmpeg -i in -vf drawbox=c=black:t=fill:enable='gt(t\,7650)' -c:a copy out

This will black out the frames from 7650 seconds onwards.

Gyan
  • 85,394
  • 9
  • 169
  • 201
  • This worked perfectly, thank you. A question: does the drawbox filter cause the copy streams function to perform a transcode? I noticed that the processing was quite a bit slower, and the out file was smaller than just the main segment that I had split out at 2:07:30. – fourells5 Jul 15 '20 at 04:12
  • Yes, use of any filter means that stream can't be copied. – Gyan Jul 15 '20 at 11:38