Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

convert from jpg to mp4 by ffmpeg

Tags:

I have 320 jpg(320x574) images which I have recorded them with 2004 fps. I want to make a .mp4 video of them. I have run below codes in cmd (win7) and it just make a video of jpg number 320 and if I go for this ('*.jpg') insted of 320 it does not work. I really appreciate any help.

ffmpeg -r 1/5 -i C:\data-Sam\320.jpg -c:v libx264 -r 30 -pix_fmt yuv420p C:\data-Sam\out.mp4
like image 931
Sam Avatar asked Apr 09 '14 14:04

Sam


People also ask

Does Ffmpeg work on images?

FFmpeg looks for image files with file names with 'img-' resulting in a two-digit number. In the command section, you will need to define a search pattern for the ffmpeg output file so that you can find the image sequence.


1 Answers

Depending on your file names you'll want:

ffmpeg -f image2 -i /path/to/file/image%3d.jpg test.avi

The image%3d would be for files named: image000.jpg, image001.jpg, image002.jpg, etc.

If your files are named image0.jpg, image1.jpg, image2.jpg, etc. then you'd use /path/to/file/image%d.jpg.

See FFmpeg image2 demuxer examples

like image 183
Richy321 Avatar answered Oct 07 '22 16:10

Richy321