FORUMS: list search recent posts

ffmpeg frame rate and jpg to movie

COW Forums : FFmpeg

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
daniel paluska
ffmpeg frame rate and jpg to movie
on Nov 23, 2011 at 8:13:15 pm

so i have successfully made stacks of images into movies with ffmpeg.
ffmpeg -i frame%04d.jpg out.mp4

now i often like timelapse movies to be a little lower framerate so if i instead do
ffmpeg -i frame%04d.jpg -r 10 out.mp4
should i not expect my movie to be 2.5 times as long? since -r 25 is the default frame rate setting?

but i'm not finding this to be the case and wondering why. it seems ffmpeg drops frames when i reduce hte output framerate. i might expect that for movie conversion but i wouldn't expect that for converting a stack of frames.
actually i've been using this someftware for a couple years on various different machines and this is the first time i noticed this so i'm not sure if it is version specific or codec specific?

anybody else have experience with this?

thanks,
dan


Return to posts index

Reuben Martin
Re: ffmpeg frame rate and jpg to movie
on Nov 28, 2011 at 3:35:30 am

What few people realize is that the order of the options is very important for ffmpeg.


From ffmpeg's point of view, your are saying "I have a frame sequence at 25fps that I want resampled into 10 fps for the same runtime."

You need to place the "-r" option before the "-i" option so that ffmpeg understands that the 10fps is the rate of the input, not the resampled rate for the output.

example:
ffmpeg -r 10 -i frame%04d.jpg out.mp4

Please note, this command is very ambiguous. It does not specify the video or audio codec, and the MP4 standard supports several different codecs for both audio and video. ffmpeg will just select which ever video and audio codecs are programmed as default for MP4 which may or may not be what you want.

You would want something more like this:

ffmpeg -i source.xxx -vcodec foobar -acodec foobar -f mp4 output.mp4


Return to posts index

Reuben Martin
Re: ffmpeg frame rate and jpg to movie
on Nov 29, 2011 at 12:25:11 am

Some of the code was munged in the post due to discarding HTML characters.

That last code example should read something like:

ffmpeg [input_options_here] -i source.xxx [output_options_here] -vcodec foobar [vcodec_options_here] -acodec foobar [acodec_options_here] -f mp4 output.mp4


Return to posts index


Nilesh Patel
Re: ffmpeg frame rate and jpg to movie
on Sep 5, 2012 at 8:01:29 am

Hello,

Any One please tell me why am not able to generate video from images for framerate below then 20.

1. MPG
a. I want to generate Video with frame rate 12 but it support till 20

b. My Command : D:ffmpeg.exe -y -f image2 -r 20 -i D:Study1%d.jpg -s 512x512 -b 2400k D:Videoson_3_Sep_2012_add_framerate_20.mpg


On Other hand for MP4, I can go low frame rate as I required. For this I use below command

C:ffmpeg.exe -y -f image2 -r 12 -i D:Study1%d.jpg D:Videoson_3_Sep_2012_add_framerate_12.mp4

From many days I am trying form same, please stuck me out

Thanks in Advance


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]