I've made some progress with my command. But I've run into a problem. In the docs, under the drawbox command, it lists an option 'replace'

replace
Applicable if the input has alpha. With value 1, the pixels of the painted box will overwrite the video’s color and alpha pixels. Default is 0, which composites the box onto the input, leaving the video’s alpha intact.

This is exactly what I need. But I can't get it to work. Whenever I do a command with it, I get:

"[Parsed_drawbox_0 @ 0x564929e46aa0] Option 'replace' not found
[AVFilterGraph @ 0x564929e44bc0] Error initializing filter 'drawbox' with args 'enable=between(t,2,3):color=0x000000FF:t=999:replace=1'"

I tried to upgrade my ffmpeg to the latest version. I have ffmpeg version 3.4.1-1~16.04.york0 Copyright (c) 2000-2017 the FFmpeg developers

Does anyone know what I'm doing wrong to get the replace option to work on drawbox?

Here is my full command:

ffmpeg -i screencast.avi -ss -2 -i output.avi -filter_complex "[0:v]drawbox=enable='between(t,2,3)':color=0x000000FF:t=999:replace=1[out]; [out][1:v]overlay=0:0:enable='between(t,2,3)':format=rgb[out2]" -strict experimental -map [out2] output.avi

Thanks!

Josh

Hi all,

Would someone mind helping me to get a commandline correct?

I have a video, screencast.avi, of utvideo with transparency.

I extract a couple seconds of images from screencast.avi like:

ffmpeg -ss 31 -t 2 -i screencast.avi filename%03d.png

I would like to edit the images and then "put them back" into the video, replacing the appropriate frames.

I know how to use the overlay filter, but don't know how to make it use the whole series of images at the correct time. Plus, I can't simply overlay the video as it has transparency. I would need to replace the frames, or blank the appropriate frames before overlaying.

Thanks for help getting the command correct!

Josh

Here are my attempts for anyone interested:

This command uses all the images, but doesn't start and end them at the right place:

ffmpeg -i screencast.avi -pattern_type glob -i "filename*.png" -filter_complex overlay output.avi

This command puts the overlay in the correct frames, but only uses a single .png file, not all of them:

ffmpeg -i screencast.avi -pattern_type glob -i "filename*.png" -filter_complex "overlay=0:0:enable='between(t,2,3)'" output.avi

Plus, both commands incorrectly overlay the transparent images, rather than replacing the frames.

_______________________________________________
ffmpeg-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".

_______________________________________________
ffmpeg-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".

Reply via email to