Unix & Linux Asked by vyasa on January 3, 2022
Sometimes I have a video in which I like to discard the video sequence for five seconds between second 11 and second 16 (as an example) and instead incorporate an image from a jpg file that is displayed during that time and leaving the audio sequence intact.
Would be great if someone told me an apt command line for this.
Thanks in advance 🙂
UPDATE 20200906: The solution should not re-encode the entire video in order to rapidly process large video files with a short image-overlay.
Just an idea, but how about: splitting the video in three parts (pre, needed-part, post)
then applying the idea posted to the "needed-part".
Afterwards concatenate the three files together again ?
PS: Using the command above kinda destroys my videos picture quality... no idea why...
Answered by Rye on January 3, 2022
Use
ffmpeg -i video -i image -filter_complex "[1][0]scale2ref[img][vid];[vid][img]overlay=enable='between(t,11,16)'" -c:a copy out.mp4
Scale2ref resizes the image to the resolution of the video. The overlay places the image on top of the video from the 12th to the end of the 16th second.
Answered by Gyan on January 3, 2022
1 Asked on December 6, 2020 by tanya-shreedhar
0 Asked on December 6, 2020 by rarelynecessary
2 Asked on December 6, 2020 by dhamu
1 Asked on December 6, 2020 by robsch
0 Asked on December 6, 2020 by kolja
1 Asked on December 6, 2020
1 Asked on December 6, 2020 by marc
0 Asked on December 5, 2020 by yael
1 Asked on December 4, 2020 by flow2k
1 Asked on December 4, 2020 by beakal-begashaw
0 Asked on December 4, 2020
1 Asked on December 4, 2020 by bex
1 Asked on December 4, 2020 by elu
3 Asked on December 4, 2020 by sln
13 Asked on December 4, 2020 by kris
2 Asked on December 4, 2020 by mbiber
3 Asked on December 3, 2020 by aravind
Get help from others!
Recent Questions
Recent Answers
© 2023 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP