Ffmpeg2theora
From LinuxReviews
ffmpeg2theora is a command line converter which can create Ogg Theora videofiles using most common videoformats (mpg, dv, etc)[1]
Contents |
Usage
$ ffmpeg2theora -h
ffmpeg2theora 0.19
Usage: ffmpeg2theora [options] input
General output options:
-o, --output alternative output filename
-k, --skeleton outputs ogg skeleton metadata
-s, --starttime start encoding at this time (in sec.)
-e, --endtime end encoding at this time (in sec.)
-p, --v2v-preset encode file with v2v preset.
Right now there is preview and pro. Run
'ffmpeg2theora -p info' for more informations
Video output options:
-v, --videoquality [0 to 10] encoding quality for video (default: 5)
-V, --videobitrate [1 to 16778] encoding bitrate for video (kb/s)
--optimize optimize video output filesize (slower)
-x, --width scale to given width (in pixels)
-y, --height scale to given height (in pixels)
--aspect define frame aspect ratio: i.e. 4:3 or 16:9
-F, --framerate output framerate e.g 25:2 or 16
--croptop, --cropbottom, --cropleft, --cropright
crop input by given pixels before resizing
-S, --sharpness [0 to 2] sharpness of images (default: 2).
Note: lower values make the video sharper.
-K, --keyint [8 to 65536] keyframe interval (default: 64)
Video transfer options:
-C, --contrast [0.1 to 10.0] contrast correction (default: 1.0)
Note: lower values make the video darker.
-B, --brightness [-1.0 to 1.0] brightness correction (default: 0.0)
Note: lower values make the video darker.
-G, --gamma [0.1 to 10.0] gamma correction (default: 1.0)
Note: lower values make the video darker.
-Z, --saturation [0.1 to 10.0] saturation correction (default: 1.0)
Note: lower values make the video grey.
Audio output options:
-a, --audioquality [-2 to 10] encoding quality for audio (default: 1)
-A, --audiobitrate [32 to 500] encoding bitrate for audio (kb/s)
-c, --channels set number of output channels
-H, --samplerate set output samplerate (in Hz)
--nosound disable the sound from input
Input options:
--deinterlace force deinterlace, otherwise only material
marked as interlaced will be deinterlaced
--vhook you can use ffmpeg's vhook system, example:
ffmpeg2theora --vhook '/path/watermark.so -f wm.gif' input.dv
-f, --format specify input format
--v4l /dev/video0 read data from v4l device /dev/video0
you have to specifiy an output file with -o
--inputfps fps override input fps
--audiostream id by default the last audio stream is selected,
use this to select another audio stream
--sync use A/V sync from input container. Since this does
not work with all input format you have to manually
enable it if you have issues with A/V sync
Metadata options:
--artist Name of artist (director)
--title Title
--date Date
--location Location
--organization Name of organization (studio)
--copyright Copyright
--license License
Other options:
--nice n set niceness to n
-P, --pid fname write the process' id to a file
-h, --help this message
Examples:
ffmpeg2theora videoclip.avi (will write output to videoclip.ogg)
cat something.dv | ffmpeg2theora -f dv -o output.ogg -
Live streaming from V4L Device:
ffmpeg2theora --v4l /dev/video0 --inputfps 15 -x 160 -y 128 -o - \
| oggfwd iccast2server 8000 password /theora.ogg
Live encoding from a DV camcorder (needs a fast machine):
dvgrab - | ffmpeg2theora -f dv -x 352 -y 288 -o output.ogg -
Live encoding and streaming to icecast server:
dvgrab --format raw - | \
ffmpeg2theora -f dv -x 160 -y 128 -o /dev/stdout - | \
oggfwd iccast2server 8000 password /theora.ogg
Usage tips
It should be mentioned that you can pipe multiple files. Example:
cat *.mpeg | \ ffmpeg2theora -f mpg --optimize -o /pub/local/video/GNU/stallman.ogg -
Performance
It must be mentioned that ffmpeg2theora is extremely slow and uses ages compared to encoding MPEG-4 ASP using mencoder and it's version of the Xvid codec.
You likely want to encode your flies using fmpeg2theora regardless if you prefer freedom over slavery simply because Ogg Theora is not subject to software patents (which Xvid isn't[1]).
It should also be mentioned that --optimize creates signifficantly smaller files (at the price of way longer encoding time).
Limitations
You can't set target size to get a output file which is exactly 350 MB or something like that.
References
| HOWTO | Players | Rippers and Converters |
|
|
Audio (only) players: |
Video DVD rippers Video downloaders
Audio CD rippers
|
