Posts Tagged ‘transcoding’

Handbrake 0.9.5 Released

January 5, 2011 Leave a comment

Handbrake is one of the very few, functionally mature open source video transcoding tools with a decent, usable user interface (of course command line options are still available).
Generally the Handbrake development team take a long time between official releases, and v0.9.5 is no exception. This latest version comes more than a full calendar year after the previous milestone release.

While Handbrake doesn’t support a wide range of broadcast video formats, which would be a nice addition for me personally, this is not really their target market. Handbrake does a great job on web targeted and home use video encoding jobs. Ripping Blu-Ray DVDs, encoding for Apple TV2 and advanced finite controls for H.264 transcoding are all now supported in the latest release.

Further details about the release available here.

Discussion thread, specific to this release, available here.

Multi-platform downloads found here.

FFmbc v0.5 Available

November 16, 2010 1 comment

It has been announced as available for a while now, but only recently was the download made publically available again for FFmbc 0.5. Lead developer Baptiste is doing a super job moving this project forward, but really needs the support from more media professionals to fully realise the early promise of this open source, broadcast media focused, transcoding solution.

FFmbc 0.5 download available here.

FFmbc 0.5 feature updates include:

  • Sync on FFmpeg svn r25202.
  • Yadif video deinterlacing filter.
  • Overlay video filter.
  • Fade video filter.
  • HQDn3d video filter.
  • Rename ffmpeg binary to ffmbc.
  • FFmbc is now GPL only.
  • Disable shared libraries.
  • Remove -s resizing output cli option, use -vf scale.
  • 23.98 and 24 fps support in MXF muxer.
  • Mpeg-2 aspect ratio bitstream filter, to change aspect ratio without reencoding.
  • Fix an issue with -async and audiomerge.
  • Fix an issue with the fade filter.
  • Write interlacing information in mov files, fix deinterlacing with quicktime player.
  • Correctly support interlaced in yuv4mpeg and quicktime.
  • Display interlacing when printing information.
  • Fix an issue with resampling and audiomerge.

Categories: FFmbc, FFmpeg, Video Tags: , ,

FFMBC 0.4 Now Available

June 25, 2010 Leave a comment

A little over one month since the release candidate was made available, FFMBC has officially rolled our version 0.4. Lots of useful and interesting updates for our favourite open source video transcoding tool:

– Sync on FFmpeg svn r21845.
– Full support for reading and writing covert art in mp3 and iTunes m4a,m4v,mp4.
– “-coverfile” commandline option to set a cover file. png,jpg,bmp supported.
– Correctly write Quicktime metadata as utf-8.
– Fixed a bug with temporal offset when muxing mpeg-2 long gop in MXF.
– Huge speedup when opening Quicktime and mpeg-4 files.
– Timecode for Quicktime and MXF files can now be set when stream copying.
– Added x264 sources in contrib directory, git 5b86182d1240b441f28462abf3d40b7371de5ba3
– Enable pthreads by default.
– Fixed a bug with interlaced VC-3 decoding.
– Integrate libavfilter. New commandline option -vf, see doc/libavfiter.texi
– Auto-rotate iPhone 3GS files.
– Support lyrics in mp3 and iTunes m4a,m4v,mp4.
– Automatically set current UTC time in created files.
– New AVFMT_HAS_PTS flag in AVInputFormat to specify that format has pts.
– Write and read metadata “reel_name” in mov timecode track if present.
– MPEG TS muxer now produces streams playable by VLC and Quicktime.
For me, the two most interesting updates in this list are the fixed VC-3 bug and the ability to now set timecode when copying QuickTime and MXF files.
FFMBC version 0.4 can be directly downloaded from here.
Categories: FFmbc, Video Tags: , , ,

FFmbc – A Broadcast Media Alternative to FFmpeg

November 12, 2009 Leave a comment

FFmbc (FFMedia Broadcast) is an off-shoot of the FFmpeg project that is targeted squarely at the broadcast media world. The project while still in its infancy, but available for around 6 months already, is currently at release version 0.2. Launched and managed by Baptiste Coudurier, well known for his work on the FFmpeg project, FFmbc rolls out the following enhancements:

Import your files in Final Cut Pro or AVID Media Composer by

Creating XDCAM HD422 files in .mov or .mxf

Creating XDCAM IMX/D-10 files in .mov or .mxf
Creating AVID DNxHD files in .mov

Transcode your MPEG-2 4:2:2 Tranport stream files containing S302M audio.
Transcode your AVCHD Camera files correctly.
Merge and split your audio tracks.
Create Quicktime files containing time code tracks.
Advanced Metadata support.

ID3v2 complete support.
Itunes complete support.

We’ve been meaning to test some of FFmbc’s functionality for a while now and after a couple of false starts, we’ve been successfully able to convert a generic MPEG2 50i (50Mbps all Intra-Frame) 4:2:2 Transport Stream to IMX D-10 in a .mov container. This file contained PCM audio, which version 0.1 of FFmbc baulked at, but the latest version handled perfectly. The output IMX D10 file was imported without error directly into Final Cut Pro for editing. FFmbc has not yet renamed any FFmpeg libraries, so the same conversion syntax and commands can be used across both. Although, be careful as this may create some library conflicts if you try to have both FFmbc and FFmpeg installed at the same time.
Why would we want to use an Open Source transcoding tool in a predominantly proprietary video production environment? The answer is simple. Every commercial product we’ve investigated (Telestream’s Episode Engine and Flip Factory, Rhozet’s Carbon Coder, Digital Rapid’s Streamz) wanted to transcode our MPEG2 source file to IMX, rather than simply re-wrap the essence into IMX. Transcoding takes a considerable amount of time and will always lower the quality of the final output, no matter how minutely. FFmbc instead took our video and audio essence, extracted it from the MPEG2 Transport Stream and re-wrapped it all to IMX D10. 
Our 30 minute test file was around 16GB in size. Our test machine was a puny eeePC, with an Intel Atom N280 1.66Ghx processor, running Ubuntu Karmic Koala Netbook remix (hardly ideal for transcoding video). The entire conversion process took a little over 7 minutes, at a rate of approximately 110fps (frames per second). Pretty impressive!
There are a couple of caveats to mention with regards to FFmbc. The software is very new and Baptiste is very busy. I’m sure more developers would be a welcome addition to the project. We used the earlier Stream#0 tutorial for installing FFmpeg to achieve the same for FFmbc. However, FFmbc v0.2 didn’t like the latest SVN of x264, which is a bug that won’t be fixed until the next FFmbc release. Instead, we used the packaged libx264 from the Ubuntu repository. FFmbc then compiled and installed without error. Checking out the latest FFmbc from GIT also caused some issues The source compilation complained and failed regarding the absence of swscale. However, working around these small issues, we’ve achieved our goal – a quick conversion of a generic MPEG2 file to something that can be edited using Final Cut Pro.
FFmbc is an exciting prospect, targeted directly at the broadcast media world. If you’re looking for an open source file transcoding solution, to integrate with your Avid or Final Cut Pro editing environment, give FFmbc a chance to prove itself.

How-To Build FFmpeg on Debian Squeeze

October 22, 2009 8 comments

It’s been a long time now since I wrote my original How-To for building FFmpeg on Debian. A lot has changed since then, in both the Debian and FFmpeg world, so it’s definitely time for an update.

This tutorial describes how to build x264 and FFmpeg from scratch, on a base Debian Squeeze system. Throughout this tutorial I will be assuming that you are operating as either root or su, or aware of how to use sudo (make sure you’ve added yourself to the /etc/sudoers list).

First, we need to update the sources list. I use pico as my text editor, as I was a long time Pine mail user way back when. Feel free to use vi or emacs if you prefer.

Go to the Debian Multimedia repository site and download the keyring package. Follow the instructions for unpackaging it about half-way down the front page. Now update your sources list:

>pico /etc/apt/sources.list

Add deb squeeze main on a new line and save the file.

>aptitude update
>aptitude full-upgrade

Now you’re using the latest sources and packages.

Next, install all the additional libraries we’ll need:

>aptitude install install build-essential subversion git-core yasm libgpac-dev libdirac-dev libgsm1-dev libschroedinger-dev libspeex-dev libvorbis-dev libopenjpeg-dev libdc1394-dev libsdl1.2-dev zlib1g-dev texi2html libfaac-dev libfaad-dev libmp3lame-dev libtheora-dev libxvidcore4-dev libopencore-amrnb-dev libopencore-amrwb-dev

Once that has successfully completed, it’s time to grab the latest x264 code:

>git clone git://
>cd x264
>./configure –enable-shared
>make install

Hopefully all is still going well and you encountered no errors so far. Great, let’s grab FFmpeg from Subversion:

>svn checkout svn:// ffmpeg
>cd ffmpeg

Now to configure FFmpeg. There’s so many options, it’s sometimes hard to know which ones to choose. The list below is my personal preference, but do try ./configure –help to assist in choosing your own.

>./configure –enable-gpl –enable-postproc –enable-pthreads –enable-libfaac –enable-libfaad –enable-libmp3lame –enable-libtheora –enable-libx264 –enable-shared –enable-nonfree –enable-libvorbis –enable-libgsm –enable-libspeex –enable-libschroedinger –enable-libdirac –enable-avfilter –enable-avfilter-lavf –enable-libdc1394 –enable-libopenjpeg –enable-libopencore-amrnb –enable-libopencore-amrwb –enable-version3

After a successful configuration, all the enabled decoders, encoders and muxers will be displayed. There are some configuration dependencies here. If you don’t –enable-gpl things like postproc will fail at build time. Next….

>make install

“Make” will probably take quite a long time.

Optionally you may like to build qt-faststart as well. If you don’t know what this does, use Google, but in short it arranges atoms in QuickTime header files to allow for progressive download delivery.

>make tools/qt-faststart

If you try to use FFmpeg now, by simply typing “ffmpeg” you are likely to encounter an error regarding shared libraries (we did build FFmpeg with –enable-shared). To fix this we do the following:

>pico /etc/

Add the line “/usr/local/lib” (without quotes) to this file and then save it. Read more about dynamically linked libraries here, specifically the fourth paragraph to explain what we just did.


That’s it! Finished. Pretty easy, right? Now you just need to learn how to use FFmpeg, but that’s a topic for another day. Very briefly though, here’s a command line for creating a 2-pass H264 file, at 750kbps and 480×360 resolution, in a mov container, with progressive download enabled.

>ffmpeg -y -i inputfile.mpg -pass 1 -vcodec libx264 -vpre fastfirstpass -s 480×360 -b 750k -bt 750k -threads 0 -f mov -an /dev/null && ffmpeg -deinterlace -y -i inputfile.mpg -pass 2 -acodec libfaac -ab 128k -ac 2 -vcodec libx264 -vpre hq -s 480×360 -b 750k -bt 750k -threads 0 -f mov


Categories: FFmpeg, Video Tags: , , ,

Applying the HandBrake – Stopping Short of Video Transcoding

October 2, 2009 Leave a comment

Finding a full featured open source video transcoding solution is no easy task. There is of course FFmpeg, which is fantastic and powerful, but one does need to spend a serious amount of time learning the syntax and various options. This is fine if you’re taking one type of input file and creating one type of output file. Easy to script and I’ve seen some really good results, especially using the x264 library. However, trying to find a nice GUI to do the same thing, so far no joy.

I had really hoped HandBrake might be the right tool for the job. It’s been around for a long time now, it’s not just for Mac anymore and there seems to be an active community around it.

The last stable release was almost 10 months ago, but recently an SVN snapshot build was supplied, with some pre-compiled packages to go with it. The usual caveats apply, but the change log provided some tantalising updates, so I decided to try it out.

My home laptop is running Debian Squeeze, but I decided to try the Ubuntu 9.04 GUI package, as I was lazy and didn’t feel like compiling from source. Maybe this was a mistake….. The installation of the deb package went fine. No errors to speak of and a nice little HandBrake icon appeared in my Sound & Video menu. Starting the application also worked flawlessly.

I hadn’t used HandBrake before, so I didn’t know what to expect. On first glance the software appears to be mainly geared towards H.264 transcoding. While this is currently an important video codec, I was hoping for a much wider range of output options. I couldn’t find any.

Fine, let’s stick with H.264. My source file for testing was 4.2GB of DNxHD – a little over 3 minutes of content at 185Mbps. HandBrake uses FFmpeg in the backend to do the transcode heavy lifting. I know FFmpeg supports DNxHD, so I was not expecting any real problems. Unfortunately, my assumption proved to be incorrect.

Selecting the DNxHD file as source, HandBrake scanned the file for a couple of minutes, then stopped. No error message, no warning, just the UI sitting there waiting for the next input. Fortunately, there’s an Activity Window to select and view the command line output. Here’s what I saw…..

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from ‘/home/phillc/Media/South Pacific Avid’:
  Duration: 00:03:11.12, start: 0.000000, bitrate: 189668 kb/s
    Stream #0.0(eng): Video: dnxhd, 1920×1080, PAR 1:1 DAR 16:9, 25 tbr, 25 tbn, 25 tbc
    Stream #0.1(eng): Audio: pcm_s16le, 48000 Hz, mono, s16, 768 kb/s
    Stream #0.2(eng): Audio: pcm_s16le, 48000 Hz, mono, s16, 768 kb/s
    Stream #0.3(eng): Audio: pcm_s16le, 48000 Hz, mono, s16, 768 kb/s
    Stream #0.4(eng): Audio: pcm_s16le, 48000 Hz, mono, s16, 768 kb/s
    Stream #0.5(eng): Audio: pcm_s16le, 48000 Hz, mono, s16, 768 kb/s
    Stream #0.6(eng): Audio: pcm_s16le, 48000 Hz, mono, s16, 768 kb/s
    Stream #0.7(eng): Audio: pcm_s16le, 48000 Hz, mono, s16, 768 kb/s
    Stream #0.8(eng): Audio: pcm_s16le, 48000 Hz, mono, s16, 768 kb/s
[10:14:27] scan: decoding previews for title 1
[10:14:45] scan: could not get a decoded picture
[10:14:58] scan: could not get a decoded picture
[10:15:12] scan: could not get a decoded picture
[10:15:26] scan: could not get a decoded picture
[10:15:40] scan: could not get a decoded picture
[10:15:54] scan: could not get a decoded picture
[10:16:08] scan: could not get a decoded picture
[10:16:23] scan: could not get a decoded picture
[10:16:35] scan: could not get a decoded picture
[10:16:49] scan: could not get a decoded picture
[10:16:49] libhb: scan thread found 0 valid title(s)

What’s it all mean?

It would seem that FFmpeg recognised a valid DNxHD file. It found the video track and 8 tracks of audio, but after this, who knows! Not being able to get a decoded picture is not an error I’ve come across using FFmpeg from the command line before.

EDIT: The root of this problem is actually FFmpeg and not Handbrake. The DNxHD file was 10-bit, but FFmpeg currently only supports 8-bit files of this codec.

That’s as far as I’ve managed to travel in the HandBrake world. I had a look at some of the H.264 file output options, which are comprehensive, but don’t at first glance seem to support the general x264 preset options. HandBrake presets are more geared towards devices – iPod and Apple TV. It appears to be possible to queue multiple jobs using HandBrake, but not set watch folders nor apply rules for output files. E.g Once transcoding is finished, move file to folder X.

HandBrake is probably a good tool for those looking to create web media, from DVD or Camcorder source, but it’s not powerful enough to deal with high end media from the post-production or broadcast domain.

FFmpeg Makes an Official Release!

March 10, 2009 Leave a comment

It’s been a long while since I’ve posted on this blog, but finally today something has spurned me into action. 

The FFmpeg team have finally made a release – version 0.5 – with a silly long name. Previously, users were always told to download and compile the latest SVN version of FFmpeg, if they expected any support from the mailing lists.
Now it would seem that there is a stable release, only a few years since the last one, that can be used by software developers and packagers everywhere. I still expect that many mailing list issues will be dealt with by the instruction to download from the SVN or Git repository and compile. I also expect that bug fixes and enhancements will make it into SVN quite quickly, but that also the next release might be some time away.
Release notes are available on the FFmpeg changelog (long!) and there’s a lively, as always, Slashdot discussion around this momentous event.

Get every new post delivered to your Inbox.