Making a video of lower frame rate?
Hello everyone, I have a sequence of images and I wish to create a video with relatively low frame rate - like 2 fps or 1 fps. I am typing in the following command in the command line: ffmpeg -i %04d.ppm -r 2 out.avi The video uses only 12 frames and the whole thing is not created correctly. Does this lack something? Thanks
Am 04.03.2010 20:33, schrieb Hina Shah:
Hello everyone,
I have a sequence of images and I wish to create a video with relatively low frame rate - like 2 fps or 1 fps. I am typing in the following command in the command line:
ffmpeg -i %04d.ppm -r 2 out.avi
The video uses only 12 frames and the whole thing is not created correctly. Does this lack something? avi is only a container format, you should specify a video format using -vcodec xxx (depending on what it should be, use ffmpeg -formats to get a list of supported codecs) Walter. Thanks _______________________________________________ ffmpeg-user mailing list ffmpeg-user at mplayerhq.hu https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
* Walter Werner on Thursday, March 04, 2010 at 20:59:43 +0100
avi is only a container format, you should specify a video format using -vcodec xxx (depending on what it should be, use ffmpeg -formats to get a list of supported codecs)
ffmpeg -formats has been split up, so ffmpeg -formats # shows the container formats ffmpeg -codecs # shwos the supported codecs c -- Was hei?t hier Dogma, ich bin Underdogma! [ What the hell do you mean dogma, I am underdogma. ] _F R E E_ _V I D E O S_ --->>> http://www.blacktrash.org/underdogma/
Okay.. so now I have modified my cmd line as: ffmpeg -i %04d.ppm -r 3 -s 700x700 -vcodec mpeg4 out.mp4 But the video generated seems to be using only some images and not all. I have around 133 images all in sequence, and the video seems to use only 17 of those. I want to use all of the 133 images at a frame rate of 1 or 2 or 3 fps. Thanks! On Thu, Mar 4, 2010 at 3:10 PM, Christian Ebert <blacktrash at gmx.net> wrote:
* Walter Werner on Thursday, March 04, 2010 at 20:59:43 +0100
avi is only a container format, you should specify a video format using -vcodec xxx (depending on what it should be, use ffmpeg -formats to get a list of supported codecs)
ffmpeg -formats has been split up, so
ffmpeg -formats # shows the container formats ffmpeg -codecs # shwos the supported codecs
c -- Was hei?t hier Dogma, ich bin Underdogma! [ What the hell do you mean dogma, I am underdogma. ]
_F R E E_ _V I D E O S_ --->>> http://www.blacktrash.org/underdogma/ _______________________________________________ ffmpeg-user mailing list ffmpeg-user at mplayerhq.hu https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
--- On Thu, 3/4/10, Hina Shah <hinacomp at gmail.com> wrote:
From: Hina Shah <hinacomp at gmail.com> Subject: Re: [FFmpeg-user] Making a video of lower frame rate? To: "FFmpeg user questions and RTFMs" <ffmpeg-user at mplayerhq.hu> Date: Thursday, March 4, 2010, 2:14 PM Okay.. so now I have modified my cmd line as:
ffmpeg -i %04d.ppm -r 3 -s 700x700 -vcodec mpeg4 out.mp4
But the video generated seems to be using only some images and not all. I have around 133 images all in sequence, and the video seems to use only 17 of those. I want to use all of the 133 images at a frame rate of 1 or 2 or 3 fps.
The file names/numbers need to be sequential and start from a certain base number. 0001.ppm ? Any skipped numbers equals termination afaik. Pretty easy to script a solution. The behavior could probably be modified too, but not likely given that basic considerations can overcome. Not to mention how would you want to handle gaps (repeat images on missing sequences, or skip to the next available).
But I have all my images saved in sequential order only. No missing files. Moreover, the video that is created seems to be using only some of the images but uniformly in all the 133 frames. So I think it might be missing some nearly repititive frames. But for different frame rates a different number of frames is used. Like for a frame rate of 5 - 28 frames, for a frame rate of 2-12 frames, etc. How do I handle that? Thanks! On Sat, Mar 6, 2010 at 10:26 PM, James Shatto <wwwshadow7 at yahoo.com> wrote:
--- On Thu, 3/4/10, Hina Shah <hinacomp at gmail.com> wrote:
From: Hina Shah <hinacomp at gmail.com> Subject: Re: [FFmpeg-user] Making a video of lower frame rate? To: "FFmpeg user questions and RTFMs" <ffmpeg-user at mplayerhq.hu> Date: Thursday, March 4, 2010, 2:14 PM Okay.. so now I have modified my cmd line as:
ffmpeg -i %04d.ppm -r 3 -s 700x700 -vcodec mpeg4 out.mp4
But the video generated seems to be using only some images and not all. I have around 133 images all in sequence, and the video seems to use only 17 of those. I want to use all of the 133 images at a frame rate of 1 or 2 or 3 fps.
The file names/numbers need to be sequential and start from a certain base number. 0001.ppm ? Any skipped numbers equals termination afaik. Pretty easy to script a solution. The behavior could probably be modified too, but not likely given that basic considerations can overcome. Not to mention how would you want to handle gaps (repeat images on missing sequences, or skip to the next available).
_______________________________________________ ffmpeg-user mailing list ffmpeg-user at mplayerhq.hu https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
Hi Hina, [Top-posting repaired. Please don't do that on this list. It upsets the owners, and causes many helpful people to ignore you.] Hina Shah wrote:
On Sat, Mar 6, 2010 at 10:26 PM, James Shatto <wwwshadow7 at yahoo.com> wrote:
--- On Thu, 3/4/10, Hina Shah <hinacomp at gmail.com> wrote:
Okay.. so now I have modified my cmd line as:
ffmpeg -i %04d.ppm -r 3 -s 700x700 -vcodec mpeg4 out.mp4
But the video generated seems to be using only some images and not all. I have around 133 images all in sequence, and the video seems to use only 17 of those. I want to use all of the 133 images at a frame rate of 1 or 2 or 3 fps.
The file names/numbers need to be sequential and start from a certain base number. 0001.ppm ? Any skipped numbers equals termination afaik. Pretty easy to script a solution. The behavior could probably be modified too, but not likely given that basic considerations can overcome. Not to mention how would you want to handle gaps (repeat images on missing sequences, or skip to the next available).
But I have all my images saved in sequential order only. No missing files. Moreover, the video that is created seems to be using only some of the images but uniformly in all the 133 frames. So I think it might be missing some nearly repititive frames. But for different frame rates a different number of frames is used. Like for a frame rate of 5 - 28 frames, for a frame rate of 2-12 frames, etc. How do I handle that?
You haven't shown us your command output (please do that in the future), but I'm guessing that your input image sequence is being treated as 24fps. You need to put "-r 3", or whatever, in *front* of the "-i". The order you give options to ffmpeg matter. HTH, Phil
Hello, I am sorry if I have done something wrong. I did not mean to, and I do not know what wrong I have done. Nevertheless, thank you for your suggestion, it finally worked. So the command line should actually look like this: ffmpeg -r 3 -i input%04d.ppm -vcodec mpeg4 out.mp4 Thanks all! On Mon, Mar 8, 2010 at 9:03 AM, Phil Turmel <pturmel-av at turmel.org> wrote:
Hi Hina,
[Top-posting repaired. Please don't do that on this list. It upsets the owners, and causes many helpful people to ignore you.]
Hina Shah wrote:
On Sat, Mar 6, 2010 at 10:26 PM, James Shatto <wwwshadow7 at yahoo.com> wrote:
--- On Thu, 3/4/10, Hina Shah <hinacomp at gmail.com> wrote:
Okay.. so now I have modified my cmd line as:
ffmpeg -i %04d.ppm -r 3 -s 700x700 -vcodec mpeg4 out.mp4
But the video generated seems to be using only some images and not all. I have around 133 images all in sequence, and the video seems to use only 17 of those. I want to use all of the 133 images at a frame rate of 1 or 2 or 3 fps.
The file names/numbers need to be sequential and start from a certain base number. 0001.ppm ? Any skipped numbers equals termination afaik. Pretty easy to script a solution. The behavior could probably be modified too, but not likely given that basic considerations can overcome. Not to mention how would you want to handle gaps (repeat images on missing sequences, or skip to the next available).
But I have all my images saved in sequential order only. No missing files. Moreover, the video that is created seems to be using only some of the images but uniformly in all the 133 frames. So I think it might be missing some nearly repititive frames. But for different frame rates a different number of frames is used. Like for a frame rate of 5 - 28 frames, for a frame rate of 2-12 frames, etc. How do I handle that?
You haven't shown us your command output (please do that in the future), but I'm guessing that your input image sequence is being treated as 24fps. You need to put "-r 3", or whatever, in *front* of the "-i". The order you give options to ffmpeg matter.
HTH,
Phil _______________________________________________ ffmpeg-user mailing list ffmpeg-user at mplayerhq.hu https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
Date: Mon, 8 Mar 2010 15:15:37 -0500 From: Hina Shah <hinacomp at gmail.com> Sender: ffmpeg-user-bounces at mplayerhq.hu
Hello,
I am sorry if I have done something wrong. I did not mean to, and I do not know what wrong I have done.
Because it make the thread hard to follow.
Why not?
Please don't top post!
The point is that on messages to mailing lists or new groups, you should always either comment 'in-line' by inserting comments in the quoted test immediately after the portion to which they are related or place all comments at the end of the quoted text. Top posting on this list is considered to be either rude or careless. -- R. Kevin Oberman, Network Engineer Energy Sciences Network (ESnet) Ernest O. Lawrence Berkeley National Laboratory (Berkeley Lab) E-mail: oberman at es.net Phone: +1 510 486-8634 Key fingerprint:059B 2DDF 031C 9BA3 14A4 EADA 927D EBB3 987B 3751
On Mon, Mar 8, 2010 at 3:15 PM, Hina Shah <hinacomp at gmail.com> wrote:
Hello,
I am sorry if I have done something wrong. I did not mean to, and I do not know what wrong I have done.
Reading top to bottom is how most humans do it...if you're alien then perhaps reading bottom-up works :-) Top posting is shunned upon simply because it makes the thread harder to read chronologically. Jarred
Nevertheless, thank you for your suggestion, it finally worked. So the command line should actually look like this:
ffmpeg -r 3 -i input%04d.ppm -vcodec mpeg4 out.mp4
Thanks all!
On Mon, Mar 8, 2010 at 9:03 AM, Phil Turmel <pturmel-av at turmel.org> wrote:
Hi Hina,
[Top-posting repaired. Please don't do that on this list. It upsets the owners, and causes many helpful people to ignore you.]
Hina Shah wrote:
On Sat, Mar 6, 2010 at 10:26 PM, James Shatto <wwwshadow7 at yahoo.com> wrote:
--- On Thu, 3/4/10, Hina Shah <hinacomp at gmail.com> wrote:
Okay.. so now I have modified my cmd line as:
ffmpeg -i %04d.ppm -r 3 -s 700x700 -vcodec mpeg4 out.mp4
But the video generated seems to be using only some images and not all. I have around 133 images all in sequence, and the video seems to use only 17 of those. I want to use all of the 133 images at a frame rate of 1 or 2 or 3 fps.
The file names/numbers need to be sequential and start from a certain base number. 0001.ppm ? Any skipped numbers equals termination afaik. Pretty easy to script a solution. The behavior could probably be modified too, but not likely given that basic considerations can overcome. Not to mention how would you want to handle gaps (repeat images on missing sequences, or skip to the next available).
But I have all my images saved in sequential order only. No missing files. Moreover, the video that is created seems to be using only some of the images but uniformly in all the 133 frames. So I think it might be missing some nearly repititive frames. But for different frame rates a different number of frames is used. Like for a frame rate of 5 - 28 frames, for a frame rate of 2-12 frames, etc. How do I handle that?
You haven't shown us your command output (please do that in the future), but I'm guessing that your input image sequence is being treated as 24fps. You need to put "-r 3", or whatever, in *front* of the "-i". The order you give options to ffmpeg matter.
HTH,
Phil _______________________________________________ ffmpeg-user mailing list ffmpeg-user at mplayerhq.hu https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
_______________________________________________ ffmpeg-user mailing list ffmpeg-user at mplayerhq.hu https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
On Mon, Mar 8, 2010 at 3:32 PM, Jarred Nicholls <jarred.nicholls at gmail.com>wrote:
On Mon, Mar 8, 2010 at 3:15 PM, Hina Shah <hinacomp at gmail.com> wrote:
Hello,
I am sorry if I have done something wrong. I did not mean to, and I do not know what wrong I have done.
Reading top to bottom is how most humans do it...if you're alien then perhaps reading bottom-up works :-)
Top posting is shunned upon simply because it makes the thread harder to read chronologically.
Jarred
Thanks for letting me know. I had not realized this. Will take care in future! Hina
Nevertheless, thank you for your suggestion, it finally worked. So the command line should actually look like this:
ffmpeg -r 3 -i input%04d.ppm -vcodec mpeg4 out.mp4
Thanks all!
On Mon, Mar 8, 2010 at 9:03 AM, Phil Turmel <pturmel-av at turmel.org> wrote:
Hi Hina,
[Top-posting repaired. Please don't do that on this list. It upsets the owners, and causes many helpful people to ignore you.]
Hina Shah wrote:
On Sat, Mar 6, 2010 at 10:26 PM, James Shatto <wwwshadow7 at yahoo.com> wrote:
--- On Thu, 3/4/10, Hina Shah <hinacomp at gmail.com> wrote:
Okay.. so now I have modified my cmd line as:
ffmpeg -i %04d.ppm -r 3 -s 700x700 -vcodec mpeg4 out.mp4
But the video generated seems to be using only some images and not all. I have around 133 images all in sequence, and the video seems to use only 17 of those. I want to use all of the 133 images at a frame rate of 1 or 2 or 3 fps.
The file names/numbers need to be sequential and start from a certain base number. 0001.ppm ? Any skipped numbers equals termination afaik. Pretty easy to script a solution. The behavior could probably be modified too, but not likely given that basic considerations can overcome. Not to mention how would you want to handle gaps (repeat images on missing sequences, or skip to the next available).
But I have all my images saved in sequential order only. No missing files. Moreover, the video that is created seems to be using only some of the images but uniformly in all the 133 frames. So I think it might be missing some nearly repititive frames. But for different frame rates a different number of frames is used. Like for a frame rate of 5 - 28 frames, for a frame rate of 2-12 frames, etc. How do I handle that?
You haven't shown us your command output (please do that in the future), but I'm guessing that your input image sequence is being treated as 24fps. You need to put "-r 3", or whatever, in *front* of the "-i". The order you give options to ffmpeg matter.
HTH,
Phil _______________________________________________ ffmpeg-user mailing list ffmpeg-user at mplayerhq.hu https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
_______________________________________________ ffmpeg-user mailing list ffmpeg-user at mplayerhq.hu https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
_______________________________________________ ffmpeg-user mailing list ffmpeg-user at mplayerhq.hu https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
--- On Sun, 3/7/10, Hina Shah <hinacomp at gmail.com> wrote:
From: Hina Shah <hinacomp at gmail.com> Subject: Re: [FFmpeg-user] Making a video of lower frame rate? To: "FFmpeg user questions and RTFMs" <ffmpeg-user at mplayerhq.hu> Date: Sunday, March 7, 2010, 7:11 AM But I have all my images saved in sequential order only. No missing files. Moreover, the video that is created seems to be using only some of the images but uniformly in all the 133 frames. So I think it might be missing some nearly repititive frames. But for different frame rates a different number of frames is used. Like for a frame rate of 5 - 28 frames, for a frame rate of 2-12 frames, etc. How do I handle that?
Thanks!
ffmpeg assumes -r 25 when none is specified. AFAIK. You need to specify the intended frame rate BEFORE and probably AFTER -i too. What you're probably seeing is 25 fps input (assumed) and your 3 fps output skipping 22 of those frames per second. Or I could be wrong. $ ffmpeg -f image2 -r 1 -i %04d.ppm -r 30000/1001 -y output.mpg Some video formats don't let you do custom frame rates(output). Be sure to account for that if you have to. - James
participants (7)
-
blacktrash@gmx.net -
hinacomp@gmail.com -
jarred.nicholls@gmail.com -
oberman@es.net -
pturmel-av@turmel.org -
walter.werner@vol.at -
wwwshadow7@yahoo.com