[FFmpeg-user] Replacing video segments with JPGs?

Nicolas George nicolas.george at normalesup.org
Fri Dec 21 17:31:46 CET 2012


Le primidi 1er nivôse, an CCXXI, Gilles a écrit :
> This is a conference where the camcorder was shooting the speaker the
> whole time, and I need to insert some JPGs from the PowerPoint
> presentation. I don't know how this action is called in video-speak.
> 
> Can ffmpeg do this, eg. something like:
> 
> 'at 1mn30 for 10 secondes, replace video with JPG
> ffmpeg -i input.mpg -ss 01:30 -t10 -v:insert myfile.jpg output.mpg

There is currently nothing to do that directly. With the current features,
my best suggestion would be to prepare a video with all the replacement
images, and a transparent replacement image when you want to keep the video.
And then use the overlay filter to composite the result.

Simplest method: a lot of symlinks, using the image2 demuxer.

You need to decide the accuracy you need for your overlay. If you are fine
with a 1-second accuracy, then you can use the image2 demuxer at 1 frame per
second, and only need 3600 symlinks per hour. If you want frame-accurate
timing at 30 frames per second, you would need 30 times as much symlinks,
but that still can work.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20121221/3f00ed86/attachment.asc>


More information about the ffmpeg-user mailing list