Commit | Line | Data |
---|---|---|
9aeeeb63 FB |
1 | * ffmpeg can use YUV files as input : |
2 | ||
3 | ffmpeg /tmp/out.mpg /tmp/test | |
4 | ||
5 | If will use the files: | |
6 | /tmp/test0.Y, /tmp/test0.U, /tmp/test0.V, | |
7 | /tmp/test1.Y, /tmp/test1.U, /tmp/test1.V, etc... | |
8 | ||
9 | The Y files use twice the resolution of the U and V files. They are | |
10 | raw files, without header. They can be generated by all decent video | |
11 | decoders. | |
12 | ||
13 | * ffmpeg can use a video4linux compatible video source : | |
14 | ||
15 | ffmpeg /tmp/out.mpg | |
16 | ||
17 | Note that you must activate the right video source and channel | |
18 | before launching ffmpeg. You can use any TV viewer such as xawtv by | |
19 | Gerd Knorr which I find very good. | |
20 | ||
21 | * There are some importants options to know: | |
22 | ||
23 | -s size set frame size [160x128] | |
24 | -f format set encoding format [mpeg1] | |
25 | -r fps set frame rate [25] | |
26 | -b bitrate set the bitrate in kbit/s [100] | |
27 | -t time set recording time in seconds [10.0] | |
28 | ||
29 | The frame size can also be: cif, qcif, sqcif and 4cif. | |
30 | The encoding format can be mpeg1, h263 or rv10. | |
31 | ||
32 | Advanced options are: | |
33 | ||
34 | -d device set video4linux device name | |
35 | -g gop_size set the group of picture size. | |
36 | An 'intra' frame is generated every gop_size frames. | |
37 | -i use only intra images (speed up compression, but lower quality). | |
38 | -c comment set the comment string. | |
39 | ||
40 | Comment strings are only used for Real Video(tm) encoding. Tags are | |
41 | used in the comment string. A typical comment string is: | |
42 | ||
43 | "+title=Test Video +author=FFMpeg +copyright=Free +comment=Generated by FFMpeg 1.0" | |
44 | ||
45 | The output file can be "-" to output to a pipe. This is only possible | |
46 | with mpeg1 and h263 formats. | |
47 | ||
48 | * Tips: | |
49 | ||
50 | - For low bit rate application, use a low frame rate and a small gop | |
51 | size. This is especially true for real video where the Linux player | |
52 | does not seem to be very fast, so it can miss frames. An example is: | |
53 | ||
54 | ffmpeg -g 3 -r 3 -t 10 -b 50 -s qcif -f rv10 /tmp/b.rm | |
55 | ||
56 | - The parameter 'q' which is displayed while encoding is the current | |
57 | quantizer. The value of 1 indicates that a very good quality could | |
58 | be achieved. The value of 31 indicates the worst quality. If q=31 | |
59 | too often, it means that the encoder cannot compress enough to meet | |
60 | your bit rate. You must either increase the bit rate, decrease the | |
61 | frame rate or decrease the frame size. | |
62 |