Child pages
  • Working with video materials
Skip to end of metadata
Go to start of metadata

How to convert digital video between formats?

In this paragraph you will see how to prepare the web delivery version of video using ffmpeg and WinFF. ffmpeg is a command line tool for converting multimedia file between formats. It is one of several components of the FFmpeg project, a free, cross-platform software licensed under the LGPL/GPL. You can download the Windows version of FFmpeg here
WinFF is a Graphical User Interface (GUI) for ffmpeg. It is free software published under the GPL. WinFF is available for Windows and Linux. You can download it here
In addition to WinFF there are many other GUIs/frontends for ffmpeg. Here you can find the list of these applications. 

First you will see how to convert a video archive file using ffmpeg and you will learn the basic options of this tool. This will help you to understand how the WinFF works. 

Although we will encode to the FLV format in further examples, the method of encoding is the same for other formats. You have to specify the video and audio parameters of output file and then pass these parameters into the tool. 

We want to encode a video file in the AVI format (CC_1915_03_01_TheChampion.avi) to Flash Video. This can be done using command:

ffmpeg -i CC_1915_03_01_TheChampion.avi CC_1915_03_01_TheChampion.flv

where -i the option followed by the input file name. The last argument is the output file name. Based on the output file extension (flv) ffmpeg encodes the input file to the FLV format using the Flash Video codec. Because we do not specify any other options, ffmpeg by default tries to convert as lossless as possible. It uses the same audio and video parameters for the output which has the input. In this example the video frame size and number of channels will not change. Other parameters will use default values: video bitrate – 200 kb/s, frame rate – 25, audio sampling frequency 44100 Hz and audio bit-rate 64 kb/s. These are options for basic parameters:

-b bitrate - the video bitrate in bit/s
-r fps - frame rate
-s size - frame size
-aspect aspect - aspect ratio
-ar freq - the audio sampling frequency
-ab bitrate - the audio bitrate in bit/s
-ac channels - the number of audio channels.

See documentation to get information about other options.

To set the frame rate to 25, frame size to 320x240 pixels, bitrate to 300kb/s, number of audio channels to 1, audio sampling frequency to 22050 Hz and audio bitrate to 56 kb/s run command: 

ffmpeg -i CC_1915_03_01_TheChampion.avi -r 25 -s 320x240 -b 300kb -ac 1 -ar 22050 -ab 56kb CC_1915_03_01_TheChampion.flv

Now we use WinFF to perform the same conversion. 
With WinFF you do not need to specify a list of options for each conversion. Work with WinFF is based on presets. You simply select the input file(s), preset and directory for output files and start the conversion. There are many predefined presets in the default installation of WinFF. Below you can see how to create and use your own preset for Flash Video.

Figure 1: Creating new preset. 

Run WinFF and select the Presets from the Edit menu. A window appears where you define a new preset. In the Preset NamePreset Label and Category fields enter your own names. The most important is the Preset Command Line field, where you have to enter conversion options. We can use options (without input and output file name) from the previous example:

-r 25 -s 320x240 -b 300kb -ac 1 -ar 22050 -ab 56kb

The output file name will be created automatically and based on the input file that you will add in the main window. Save the preset by pushing the Save button and close the presets window.

Figure 2: WinnFF main window.

Now add the file using the Add button () or simply drag the file into the application window. Select the preset that you have just created from the Device Preset list and specify the output directory in the Output Directory. Start the conversion by pushing the Convert button (). 

Figure 3: Configuring additional options. 
If you need to change some options you do not need to create a new preset. Press the Options button () to display the options bar at the bottom. It allows you to temporarily change options. 

  • No labels