FFmpeg : record, convert and stream audio and video

Last update : August 29, 2013

ffmpeg

FFmpeg Command Line Tool

FFmpeg is a complete, cross-platform solution to record, convert and stream audio and video. It includes libavcodec – the leading audio/video codec library.

The latest version is 2.0.1 released August 11, 2013. Version 0.6.x released in 2010 featured a lot of improvements that are relevant for HTML5 video. The H.264 and Theora decoders were significantly faster, the vorbis decoder has seen important updates and the release supported Google’s newly released libvpx library for the VP8 codec and WEBM container.

FFmpeg is free software licensed under the LGPL or GPL depending on the configuration options. Companies that violate the license terms are tracked and listed on the Hall of Shame and eventually sued.

ffdshow wrapper for Windows DirectShow

FFmpeg is developed under GNU/Linux, but it can be compiled under most operating systems. Windows distributions are available at the website ffmpeg.zeranoe.com. On Windows there are however some limitations, for instance up to now it’s not possible to capture audio in realtime.

To make the libavcodec decoders available to DirectShow-based applications (a proprietary Windows technology), you can use ffdshow. This DirectShow filter is a DirectShow-wrapper around the libavcodec (ffmpeg) decoders. Non DirectShow-based applications like Avidemux use libavcodec/ffmpeg through it’s native interface. There exist a fork of the original ffdshow project called ffdshow tryouts.

Paul Glagla developed a utility Filmerit (version 3.0.8 published on May 14, 2007) to show DirectShow filters and diagnose errors. Another similar tool called InstalledCodec (version 1.30) which allows to enable/disable codec drivers and DirectShow filters is available on the NirSoft website.

FFmpeg is a command-line based tool. There are however several graphical user interfaces (GUI) available :

  • SUPER from eRigthSoft
  • Avanti, a dedicated “workbench” for FFmpeg/Avisynth
  • HandBrake, an open-source, GPL-licensed, multiplatform, multithreaded video transcoder; I upgraded to version 0.9.5 in june 2011
  • WinFF, a free tool published under the GNU public license for Windows and Ubuntu

SUPER from eRigthSoft

Avanti GUI

HandBrake

FFmpeg or the libraries are also used by other video frameworks :

  • VLC from Videolan

A full list of all projects using FFmpeg is available on the official website.

A similar project as FFmpeg, using several components of this project, is MEncoder.

The following list provides some useful links about FFmpeg :

The WebM Project

last update : January 16, 2011
The WebM project is dedicated to developing a high-quality, open video format for the web that is freely available to everyone.

The WebM launch is supported by Mozilla, Opera, Adobe, Google and more than forty other publishers, software and hardware vendors.

WebM defines the file container structure, video and audio formats. WebM files consist of video streams compressed with the VP8 video codec and audio streams compressed with the Vorbis audio codec. The WebM file structure is based on the Matroska container.

VP8 is a highly efficient video compression technology that was developed by On2 Technologies.

A detailed description about the WebM Project is available at the FAQ section of the website.

A first WebM encoder is available from Miro, another one from PolySoft Solutions.

Some specialists are not convinced that WebM will be a success, as stated by Devon Govett on his blog. Others, like Jason Garrett-Glaser, the current primary x264 developer and ffmpeg developer, even thinks that the performance of the V8 codec is lower than the heavenly patented H.264 codec and that there will be patent issues in the future, because V8 copied too much from H.264.

How to encode to WebM is the title of a contribution posted by Jan Ozer in the Streaming Media Magazine in january 2011.

ArcSoft WebCam Bundle

ArcSoft offers a Webcam Bundle with the WebCam Companion™ 3 and the Magic-i Visual Effects 2 software tools. This bundle was preinstalled with ArcSoft Connect on my Sony Vaio laptop.

ArcSoft WebCam Companion™ 3 offers a broad range of applications designed and optimized for a webcam with the following features :

  • Photo and Video Capturing
  • Smart Video Enhancement
  • Pose Detection
  • Masque your photos
  • Editing Snapshots
  • Album Managing
  • Intelligent Video Surveillance

ArcSoft Magic-i Visual Effects 2 is a smart and simple webcam application designed to enhance users’ video chat experience through frames, effects, and themes. Using “Video Plug-in” technology, Magic-i Visual Effects 2 launches automatically when you start a video chat with any of your favorite chat clients, so you can apply fun effects simply and easily. It’s also compatible with WebCam Companion.

ArcSoft Connect provides product management and helpful updates for ArcSoft applications, which enables a better user experience. ArcSoft Connect will be automatically launched while running ArcSoft products.

The tools work as expected. The buttons for desactivating the camera (private) or the microfone (mute) in the visual effects plugin are very small and it’s useful to check first these settings if the sound or video is not working.

Recording, edit and embed WMV/ASF video streams

Last update : January 30, 2013
Several methods are available to record WMF/ASF video streams:

  • VLC Media Player : To record WMF video streams with VLC Media Player, use the following procedure – Select File->Open Network Stream – Select HTTP/HTTPS/FTP/MMS and paste the URL/Link – Select Stream/Save under Advanced Options and click on Settings – Select Outputs and Play locally and File – Select ASF as Encapsulationd Method – OK and VLC should start play and also capture the video to the file
  • VM Recorder : WM Recorder uses a unique Stream Capture Technology to give perfect bit-for-bit reproductions of the original video stream.
  • Net Transport download manager

A full list is available at the Videohelp website.

To cut the video streams, I use the Video Cutter V1.0 software. To embed the video streams in a webpage, I use the licensed version of the JW Player – Silverlight Player 1.1.

JibJab starring you : online humor with Actionscript 3

last update : January 30, 2013

JibJab Starring You Skating

JibJab, an online humor site with original and user generated jokes, live videos, flash and other animated videos, is run by the digital entertainment studio JibJab based in Venice, California. Founded in 1999 by Evan and Gregg Spiridellis, the company achieved international acclaim during the 2004 US presidential election when their video of George W. Bush and John Kerry singing  This Land is Your Land became one of the biggest viral video hits in history. More details are available at Wikipedia and on the JibJab Blog.

The HeadCut Tool of the video application JibJab Starring You, with which the user can cut head and jaw, and generate relevant graphic files, was produced by Filippo Gregoretti, an italian born ActionScript developer and New Media consultant. His blog pippoflash.com was developed to showcase his work, but especially to provide help or give inspiration to all those out there who love the creativity allowed by ActionScript and Flash.

Filippo Gregoretti’s other love of his life is the Piano, he perform internationally as pianist.

To start with jibjab, yoiu can subscribe for a free membership. In order to personalize and send exclusive content, you will need to purchase a Membership (12 $ per year). With a Membership, you get access to exclusive eCards & videos!, make unlimited Starring You! movies, share unlimited JibJab Sendables eCards, get discounts on digital downloads,  are the first to know about new releases and  support great artists!

The videos are available in two formats for download (1,99$ per video for members):

mpg:

video : MPEG-PS, MPEG Video version 1, 425 x 319 pixels, 24 frames/s, ratio 4:3,  4.985 kbps;
audio : MPEG Audio Version 1, Layer 2,  44,1 KHz, 2 channels, 160 kbps;

mp4:

video : MPEG-4 (Base Media),  Visual Simple&LG1, 425 x 319 pixels, 24 frames/s, ratio 4:3,  2.275 kbps;
audio : AAC (Version 4 LC),  44,1 KHz, 2 channels, 152 kbps;

Uploading and hosting public and private videos

last update : october 2010

The following websites allow users to upload and host their videos for public or private views:

  • YouTube (Google) : up to 2 GB in size; up to 15 minutes in length; HD resolution
  • Google video : service has been discontinued
  • Picasa (Google) : up to 1 GB in size; recommended resolution: 640 x 480 pixels; recommended ratio: 4:3; recommended frame rate: 30 frames per second;  videos are converted into a flash format (.FLV) with Standard Quality (320 x 240 pixel) or High Quality (480 x 360 pixels) playback
  • flickr (Yahoo) : up to 150 MB in size; up to 90 seconds in length; HD resolution (720 horizontal lines of resolution in the video); free and pro
  • Vimeo : free and pro ($59.95 a year)
  • LongTail Video (bits on the run) : pro (price calculator)
  • PhotoBucket : up to 500 MB; up to 10 minutes

Video formats on YouTube

YouTube has three main formats as well as a “mobile” format.

The original format, now labeled “standard quality”, displays videos at a resolution of 320×240 pixels using the Sorenson Spark codec with mono MP3 audio.

“High quality” videos, introduced in March 2008, are shown at up to 864×480 pixels with stereo AAC sound.

In November 2008, HD support was added with a resolution of 1280 x 720 pixels, encoded with the H.264 video codec and the audio AAC stereo codec. At the same time, the YouTube player was changed from a 4:3 aspect ratio to a widescreen 16:9.

In July 2009, YouTube announced that YouTube users can now upload 3D videos. The videos can be watched in the normal way, and glasses are worn by the viewer to achieve the 3D effect.

YouTube accepts videos uploaded in most formats, including .WMV, .AVI, .MKV, .MOV, MPEG, .MP4, DivX, .FLV, and .OGG. It also supports 3GP, allowing videos to be uploaded directly from a mobile phone.

More informations are available on Wikipedia and on YouTube.

Recording and processing Flash (flv) videos

Last update : January 30, 2013

Today this contribution has only a historical value.

After YouTube and Google, new players like Metacafe, Blip.tv, Revver, Yahoo Videos and so on have entered the online video sharing space. Today millions of video clips, technology shows, music albums, movie trailers and private films are available on these video sites for online viewing or they can also be downloaded to your hard drive for offline viewing.

The downloaded video files are generally in FLV format (Flash Video) which is an Adobe standard for video compression. It has fast becoming the web standard for delivering online video (replacing Apple QuickTime, AVI, Windows Media and Real rm formats) because Flash Video can be viewed inside Macromedia Flash Players which are shipped by default with most web browsers.

To download Flash Videos, the following approaches are possible:

To record Flash Videos, the following tools are available :

To play Flash Videos on the desktop, use the following players :

To split Flash Videos, use this tool :

To convert and edit Flash Videos, different file conversion programs are available :

  • SUPER from eRightSoft
  • An free online conversion tool (beta) to PC, iPod and PSP is offered by vixy.net.

To encode and publish :

To captionate Flash Videos, the tools available are :

To extract image frames from FLV Videos :

To embed Flash videos in a webpage :

To play Youtube Videos in a webpage :

  • use the Youtube code (an embedded YouTube watermark logo is displayed in the right bottom corner of the player)
  • Mediaplayer by Jeroen Wijering (LongTail Video) ; an embedded YouTube watermark logo is displayed if the standard URL http://www.youtube.com/watch?v=xxxxxxx is used to respect the terms of service (TOS) of YouTube.  The watermark logo is not shown if  the mp4 url  format http://www.youtubemp4.com/video/xxxxxxx.mp4 is used to play the YouTube videos.

To extract audio data from Flash videos :

Links to tutorials about Flash video processing are given below :

YouTube APIs and Tools

Last update : January 30, 2013
The YouTube APIs and Tools let you bring the YouTube experience to your webpage, application, or device. The Data API lets you perform most of the operations a normal YouTube user can on the YouTube website. The Player APIs let you control the YouTube player using JavaScript or ActionScript. There is not only the wellknown standard basic embedded player, but also a chromeless player that lets you create your own player controls. Widgets and a custom player help you to embed YouTube videos on your webpage, even if you are not a web programmer.

Go to the following link at Leslie’s Artgallery to see an example of the customized embedded YouTube Player.