hi all,
i have 399 consecutive jpeg files. i want to make a video from them. i use the follwing command:
ffmpeg -f image2 -i image%d.jpg video.mp4
there is no problem in the progress. total length is 15-16 seconds. however video is too fast compared to real life. i tried to reduce fps to get a longer video using the following command (1 fps, just to test):
ffmpeg -f image2 -i image%d.jpg -r 1 video.mp4
nevertheless it just uses first 18-19 images to create a 18 seconds long video... it shows 1 image for 1 second but its length is not 399 seconds as expected in this try. since i don't know much about the mechanism of such things, i think i am missing something. so what is that? show me the light![]()
+ Reply to Thread
Results 1 to 15 of 15
-
-
Hi
This is from the ffmpeg documentation.
Here:- http://www.ffmpeg.org/ffmpeg-doc.html
Maybe you need to modify your command.
For creating a video from many images:
The syntax foo-%03d.jpeg specifies to use a decimal number composed of three digits padded with zeroes to express the sequence number. It is the same syntax supported by the C printf function, but only formats accepting a normal integer are suitable.Code:ffmpeg -f image2 -i foo-%03d.jpeg -r 12 -s WxH foo.avi
-
yeah i did that %03 thing, it uses all images for 16 sec video. i am looking at the documentation. there is a problem with -r option. for "-r 10", resulting fps is 16 at the end and it uses half of the images
... i want 10 fps for these 399 images to get a ~40 sec video. "-r 10" doesn't do this. thank you however
-
omg! thank you gavino!
btw, to get same quality (each image is 85KB), which one is the best: adding "-b 850k" or higher to the command (video is 10 fps) or "-sameq"? -
I think if you use "-vcodec copy", you will get an MJPEG video without any re-encoding of the image data.
-
ffmpeg -i ma.mp4 -vcodec copy -s 640x360 ma2c.mp4
ffmpeg -i ma.mp4 -s 640x360 -vcodec copy ma2b.mp4
i tried commands above, they give exactly the same video. yes i can see them jwplayer but they are not resized. i want to cut heigth and width to half to get a nearly 1/4 file size. my jwplayer window is also 640x360, so big movies are seen as rasterized while not in fullscreen mode... thank you for your reply, expecting more of them
-
When you use -vcodec copy, the -s option is ignored.
Resizing the image requires recoding. -
sorry Gavino, i have another topic, i mix them :/ ... it is:
https://forum.videohelp.com/threads/331247-ffmpeg-jwplayer-mp4-problem
anyway do you have a suggestion? as you can see below, the recoded file is not H264, so how can i do that? i think the problem arises from this difference... When i execute "ffmpeg -i ma.mp4 -s 640x360 -sameq ma2.mp4":
the properties of original file(ma.mp4):
Video: MPEG4 Video (H264) 1280x720 25.00fps [Video]
Audio: AAC 44100Hz stereo 1411Kbps [Audio]
the properties of recoded file(ma2.mp4):
Video: MPEG4 Video 640x360 25.00fps [Video]
Audio: AAC 44100Hz stereo 1411Kbps [Audio] -
i tried your command and alike but i got the following in red color:
[libx264 @ 01db8d40] broken ffmpeg default settings detected
[libx264 @ 01db8d40] use an encoding preset (e.g. -vpre medium)
[libx264 @ 01db8d40] preset usage: -vpre <speed> -vpre <profile>
[libx264 @ 01db8d40] speed presets are listed in x264 --help
[libx264 @ 01db8d40] profile is optional; x264 defaults to high -
i tried following:
ffmpeg -i ma.mp4 -s 640x360 -vcodec libx264 -vpre baseline ma2.mp4
ffmpeg -i ma.mp4 -s 640x360 -vcodec libx264 -vpre hq ma2.mp4
for the first one it gives this error at the end:
File for preset 'baseline' not found
i try -fpre and i give full path to preset file, but it gives same error. btw my original video is:
http://vimeo.com/14839484
it is a nice video to check video quality after re-encoding.
maybe i should convert all files to flv but as far as i can see, the performance of flv is lower than of mp4. what do you recommend? or is there a solution to this problem? -
I would expect that to work. Did you give the entire path name+extension, eg
-fpre "C:\folder\libx264-hq.ffpreset" ?
If the folder name includes spaces, you will need quotes round the parameter.
Since flv and mp4 are just containers, you would still need to encode to h.264, and it's that step that seems to be giving difficulty at the moment.maybe i should convert all files to flv but as far as i can see, the performance of flv is lower than of mp4.
Similar Threads
-
can't get ffmpeg to convert video to image sequence
By wiseant in forum Video ConversionReplies: 15Last Post: 12th Apr 2013, 09:37 -
Ffmpeg N/A video conversion problem
By livestream in forum Video ConversionReplies: 3Last Post: 15th Sep 2011, 17:17 -
php-ffmpeg video conversion
By Tonybot in forum ProgrammingReplies: 1Last Post: 6th Jun 2011, 03:36 -
AVI to AC3 conversion question --Aftern and FFMPEG issues
By eclipse95 in forum AudioReplies: 3Last Post: 9th May 2009, 02:50 -
Question about FFMPEG WMV conversion
By shaktar in forum Video ConversionReplies: 2Last Post: 6th Feb 2009, 09:46



Quote