HTML5 Guidelines for Web Developers

(coco) #1
4.4 Tools for Video Conversion 77

it. If you are thinking of adding converted YouTube videos to your MP3 collec-
tion, be warned: The quality of the audio track on YouTube is usually rather dis-
appointing.


Because the developers of FFmpeg did not bother with such trivialities as the
programming of a graphic user interface, the user is expected to be none too shy
about using the command line. If you do not change the FFmpeg default set-
tings, you only need the following function call to convert an existing Flash Video
(FLV) to the WebM format:


$> ffmpeg -i myflashvideo.flv myflashvideo.webm


FFmpeg is also excellent for finding out the format of a video:


$> ffmpeg -i myflashvideo.flv
...
Input #0, flv, from '/tmp/myflashvideo.flv':
Duration: 00:05:12.19, start: 24.8450, bitrate: 716 kb/s
Stream #0.0: Video: h264, yuv420p, 480x360 [PAR 1:1
DAR 4:3], 601 kb/s, 25 tbr, 1k tbn, 49.99 tbc
Stream #0.1: Audio: aac, 44100 Hz, stereo, s16,
115 kb/s


In this example, we are dealing with an approximately five-minute long video in
a Flash container in which the video track is saved using the H.264 codec, and the
audio track is in AAC.


Since version 0.6, FFmpeg has supported WebM videos. But the developers were
not satisfied with using the libvpx library available through Google: They reim-
plemented VP8 based on the existing FFmpeg code, hoping to achieve consider-
ably better performance in converting videos.


A significant part of the FFmpeg project is the libavcodec library where support-
ed audio and video formats are saved. Players like vlc, mplayer, or xine use this
library to play or re-encode videos.


The list of parameters for FFmpeg is practically endless and cannot be
reproduced in detail within the scope of this book. If you are interested in finding
out more, please refer to the excellent FFmpeg Documentation available online
at http://www.ffmpeg.org/ffmpeg-doc.html.

Table 4.3 shows some important parameters for encoding with FFmpeg.


NOTE
Free download pdf