----- av_convert ----- av_rec ----- libVideoFile ----- | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
av_convertThe program av_convert can convert between some video file formats and provide basic editing functions. This includes extracting arbitrary parts out of different video files and combining them in one destination file.In normal operation, video frames and audio is decoded wile reading the source and recompressed upon writing the destination file. This decoding/encoding is performed by libVideoFile. In an alternate operating mode, videoframes are not decompressed but copied directly to the destination file. Of course, this mode has some limitations: A scene can only start at a GOP (group of pictures) boundary and no operations such as resizing or cropping can be applied to the frames. Input files Since av_convert can do basic video editing with multiple sources it is necessary to describe the video sources and the timeline. When invoking av_convert all input files are listed on the command line. Here each source can have several attributes such as start time and the end time. More options are described below. There are three types of source files: combined video and audio, video only and audio only. This type is defined by the option letter:
After this option letter the description of the file follows. This consists of an optional name of the io-plugin to handle this file type separated by "::" and the filename. Parameters are enclosed in "[]" and follow directly after the file name.
The name of the io-plugin can be one of Avi, QT, Mpeg, Dvd, MpegVideo, mp3, ...
A complete list of io-plugins can be obtained by
The complete input file definition looks like this This file definition now can be repeated for multiple inputs, which of course can be different files or different parts of the same file. Reading all this inputs in the same order as they appear on the command line makes up the timeline of the output. Selecting the track numberIf there is more than one audio or video track in one file, the one to use can be chosen by the options
This should follow directly the file definition. Crop frames
For each input file a rectangular box can be defined to crop the image to this box.
The definition of the box follows the each input file and looks like this:
The output file definition looks the same way as for the input file. Here however specifing the
IO-plugin is mandatory. The option for the output file is -o.
Beside the name of the output file the codecs for audio and video compression have to
be defined. A list of all codecs can be obtained by -h A-Codecs and
-h V-Codecs.
The size of the output image can be given by Some filters can be applied to the video track in order to reduce noise or interlace artefacts prior to compression. This will significantly improve image quality or compression ratio for interlaced or noisy sources. The filters available are
Examples av_convert -i Quicktime::Rec.mov -o Avi::Rec.avi -V XVID -V MinQuantisation=4 -V MaxQuantisation=8 -V Bitrate=1000 -A mp3 -A VBR=1 -A VBR_Quality=5 This example shows how to convert the input Rec.mov to the avi file Rec.avi. The video codec is XVID and the audio codec mp3. Some options are passed to the codecs. Nonlinear video editingav_convert -i Rec.mov[100-250.3] -i Rec.mov[5000-5200] -i ... -o Avi::Out.avi -V ... -A ... The parts of Rec.mov from 100sec to 250.3sec and 5000sec to 5200sec are written to the destination file Out.avi. Options overview
|