1 |
On Tue, Aug 26, 2008 at 12:34:00PM +0400, Penguin Lover Andrew Gaydenko squawked: |
2 |
> I have a very short (probably one or few frames) avi file (display geometry |
3 |
> test image). How to stretch the avi in time to long period (say, minutes)? |
4 |
> Software? Steps? |
5 |
|
6 |
|
7 |
If you worry just about display, look at the -fps option in mplayer, |
8 |
it lets you dictate the frame rate at which the movie is played. |
9 |
(Though on this box here it doesn't let you stretch to ftime more than |
10 |
1 sec....) |
11 |
|
12 |
A possibly better way is to (assuming your video file has really few |
13 |
frames) |
14 |
|
15 |
mplayer -vo jpeg <videofile> |
16 |
|
17 |
beware that if your video file has more than a few seconds, the number |
18 |
of frames can really pile up and give you a whole bunch of files. |
19 |
|
20 |
Then you can reencode the avi thus |
21 |
|
22 |
mencoder "mf://000*jpg" -mf fps=<insert frame rate> -o <outputfile>.avi -ovc lavc -lavcopts vcodec=mpeg4 |
23 |
|
24 |
(you can, of course, encode in the codec of your choosing). The files |
25 |
000*jpg are the default filenames for the output of the first command. |
26 |
If you specified output file names in the first command, you need to |
27 |
change the input filenames for the second. For fps insert a number |
28 |
corresponding to what you want: for example, say you have 5 frames and |
29 |
want to stretch it to 2 minutes, then set |
30 |
|
31 |
fps=5/120 |
32 |
|
33 |
(number of frames divided by the amount of total run time). |
34 |
|
35 |
Hope this helps, |
36 |
|
37 |
W |
38 |
-- |
39 |
Marten: That's like rule number one of dating-if the lady tells you |
40 |
she wants to wait, you wait. Even if it means you get blueballed |
41 |
so hard your nuts travel into the future due to relativistic effects. |
42 |
Dora: Ah, the Hawking Libido Dilation Effect. Bane of frustrated young |
43 |
men and physicists alike. |
44 |
Sortir en Pantoufles: up 627 days, 12:37 |