[FFmpeg-user] Prepend a single frame to a MP4 file
cleyfaye at gmail.com
Mon May 16 21:02:33 CEST 2016
2016-05-15 22:36 GMT+02:00 Virgil Stokes <virgil.stokes at it.uu.se>:
> I have created an image file (testImage.png) from which I would like to
> make a 5 second MP4 file. Then
> concatenate (prepend) this 5 second video to the test.mp4 file (as defined
> above). How can this be done in ffmpeg? Note, I am using:
My approach with that would be to create a 5 second video from the image
(using something like "ffmpeg -loop 1 -framerate 29.97 -i <image> -c:v h264
-pix_fmt yuv420p out.mp4" then concatenate them using the concat input.
Assuming matching codecs and resolution, this would work well without
having to transcode the whole video. You might also need to add an empty
audio track to the 5s segment beforehand though.
More information about the ffmpeg-user