Forum > Audio and Video

jpg images to video

(1/2) > >>

xinyiman:
Hi guys, I was wondering if anyone has an example of how to make a video from a series of jpg images. For example I have 100 jpg images and I want them to become a video (assuming that those images were taken with a frequency of 100 milliseconds.
A cross platform procedure would be necessary.
Thanks for your help

correa.elias:
You can call ffmpeg using TProcess from your pascal program.

metis:
@xinyiman


--- Quote ---You can call ffmpeg using TProcess...
--- End quote ---
If You need it a bit more detailed, see FFGrab4Laz
-> GoTo: 'RunFFmpeg'.

For how to build the FFmpeg-CommandLine, see the FFmpeg Documentation
-> GoTo: "You can extract images from a video, or create a video from many images"
                 -> "For extracting images from a video" and "For creating a video from many images".

E.g. to extract Images from a Video, and then recreate that Video from those Images,
copy the following CommandLines into the first Line of 'RunFFmpeg' and click [Grab].

Video -> Images:
-i "tmp/Video2Image.avi" -f image2 tmp/frame%03d.jpg

Images -> Video:
-f image2 -framerate 12 -i tmp/frame%03d.jpg "tmp/Image2Video.avi"

'FFmpeg' is cross platform; the SourceCode of 'RunFFmpeg' is currently Windows, but You may extend it with Linux and Mac - it's OpenSource.

:)

BubikolRamios:
Not to open new topic ....


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---     AProcess:= TProcess.Create(nil);     Aprocess.Executable:= AppPath + 'ffmpeg.exe';     Aprocess.Parameters.Add('-i Images1/inputImage%d.bmp');     Aprocess.Parameters.Add('-framerate 1');     Aprocess.Parameters.Add('-c:v libx264');     Aprocess.Parameters.Add('-r 30 output.mp4');     Aprocess.Parameters.Add('-y'); //overwrite output files     AProcess.Execute;     AProcess.Free;      
Not sure where 'output.mp4' should be, there or somewhere else ?


TRon:

--- Quote from: BubikolRamios on April 29, 2024, 08:47:42 am ---Not sure where 'output.mp4' should be, there or somewhere else ?

--- End quote ---
Each option requires its own (individual) addition to the parameter-list of TProcess.

Navigation

[0] Message Index

[#] Next page

Go to full version