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 DNxHD.mov’:
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.
Without much ado, Heroine Virtual has quietly released Cinelerra 4.1 earlier this month.
The PiTiVi team have recently announced the release of version 0.13.3 of the popular open source source non-linear video editing tool. PiTiVi is built with Python on top of the GStreamer framework.
- Fix Rendering Failures
- UI beautifications
- Switch to themeable ruler
- Speed optimisations
- Show the project name in the window title
Finally, something actually useful on this blog……
This patch means watermark.c now obeys the alpha channel in a PNG file. The -m option is the mode, this must be 2 for alpha blending. The watermark image is applied to the input video and then scaled with the input video to the output video’s dimensions. So best to make an image the same dimensions as the input video, otherwise you’ll get horrible scaling effects.
ffmpeg … -vhook ‘/usr/local/lib/vhook/watermark.so -m 2 path/to/image.png’ …
(replace /usr/local/lib/vhook with wherever your watermark.so is.)
Patch is available here – watermark.patch
(Maybe see links below for files on Github instead)
Example screen grab: View image
We’ve also posted back to the FFmpeg Devel mailing list.
Actual credit for this patch goes to my colleague Tim MacFarlane - http://refractalize.blogspot.com/
Tim has also now added the files to Github:
Just the patch here.
The whole of watermark.c with patch applied here.
Popular open source non-linear video editing tool Kdenlive has just seen version 0.7.5 released. The team are making pretty regular releases and updates to this software. It’s good to see some decent velocity behind this project.
- Timeline vertical zoom (make tracks smaller or larger in one click)
- Stability improvement (fix issues with clip and group move / delete)
- Non realtime playing in monitors, allows to see your editing frame by frame
- Keyframe editor for effects
- Template text clips
- Improved titler (allow for right / bottom alignment of objects), allow unicode characters
- New dialog reporting missing clips when opening a project
- Save a copy of the Project Profile in Kdenlive document to make it easier to work on another computer
- Save last used Rendering Profile in document so it appears by default when reopening
- Rewrote and improved the thumbnail creator (that creates preview thumbs for your project file for KDE’s file managers)
There’s a great article called How Firefox Is Pushing Open Video Onto the Web by Micheal Calore over at WebMonkey, dealing with the HTML 5 <video> tag and Firefox’s native Ogg Theora support. The piece outlines the technical details of the <video> tag and includes an interview with Mozilla director of Firefox Mike Beltzner and Mozilla director of platform engineering Damon Sicore.
An excerpt from the interview:
Webmonkey: How do you see these factors — the HTML
5 video tag, putting the Ogg codecs right into the browser,
presentation techniques that mimic the plug-in player experience –
affecting video on the web? What’s it going to change in six months? Or
Beltzner: In six months, you’re going to see more
sites like DailyMotion doing things where they detect that the browser
supports Ogg and the video tag, and in that case, they’re going to give
those users an Ogg-and-video-tag-experience.
I think you’ll see content sites doing this because they’ll have the
ability to re-encode their entire video libraries without having to pay
any licensing fees. The Ogg Theora encoders are completely license-free
and patent-proof. They don’t need to worry about which player you’ve
got. They also don’t need to worry about which hardware you’ve got. Ogg
Theora will run on Windows, Mac and Linux, or any embedded device or
mobile device built on the Linux platform.
Here’s a beta example page from DailyMotion demonstrating use of the HTML 5 <video> tag. If you have Firefox 3.5 installed, or a reasonably new version of Webkit/Safari and the XiphQT component install, you should have in browser video playback – Ogg Theora and no Flash player needed.
YouTube’s demonstration page here.
Spending the last two days at the Open Video Conference has been a great experience, lots of interesting speakers and I’ve learned a few things. Perhaps I’ll write more in general later, however it’s worth mentioning, while still fresh in my mind, today’s sessions around royalty-free codecs and the HTML 5 <video> tag.
The main focus of the Royalty Free Codecs session seemed to be around Ogg Theora. Also present though were Sun, speaking about their new Open Media Stack, and David Schleef to represent his work on the Schroedinger Dirac library. I would have loved to hear more about what was happening with Dirac, but the crowd wanted Theora news.
A short demonstation on the projector screen showed H.263/H.264 content versus the same Ogg Theora content at various bit rates, the highest less than 500Kbps. The results, from Theora’s perspective, were very good. Visually I couldn’t pick out any differences on the large screen. I would have liked to see the demonstration done at higher, greater than 1Mbps, bitrates, though. Not the one used today, but a similar demonstration is available here.
Sun did not do themselves any favours at this Conference. A session yesterday gave them time to discuss the process they undertook to ensure there were no IP encumbrance in their new codec and Open Media Stack, but right at the end the key revelation was that they’re unable to Open Source their work.
David did not have much of a chance to talk in depth about Dirac, and I was disappointed not to have gained a better understanding the current development status, and community input velocity around Dirac. He did make a point that the BBC were using Dirac internally, which is true but only to a very small extent. In non-linear editing environments, DVCProHD, AVC-I 100 and ProRes are still the codecs of choice. In my opinion this due to the lack of tools available for Dirac work. Dirac tool development needs a great leap forward if this codec is to gain any significant traction.
Firstly, I was particularly interested in the W3C Draft Web Fragments specification. Amongst other things, this will allow playback of just segments of video, based on a time specification in seconds. While not currently possible, if this could be extended to read an embedded timecode track and seek in a frame accurate manner, that would be truly powerful in an open standard.
With Safari on Mac, the <video> tag can be used to playback any video format for which the user has the relevant codec and QuickTime component installed. Thus we have Theora support through the XiphQT component. In the latest version of iMovie, QuickTime Pro and Final Cut Pro, users can now also choose to export or render in Ogg Theora. If only the Dirac QT component was ready.
The cross fade is particularly interesting. Do we no longer need to finish clips in a non-linear editor? Can we now perform hard cuts based on an edit decision list and let the browser deal with the fading or finishing element of the job?
Hopefully there’s some exciting times ahead for open source, royalty free video codecs and ubiquity of embedded video on the Web.
Although released a few weeks ago, the new Kdenlive 0.7.4 version is progressing nicely. The current release notes list the following updates:
- Compatibility with the new 0.4.x versions of MLT
- Rendering jobs now start one after another instead of all together
- Rewritten DVD wizard, allowing for chapters, several buttons in menu and easy preview
- Start of a transcoding feature, allowing to easily convert a clip in another format
- Long list of bug fixes.
Not only are the Kdenlive team providing the usual packages for different Linux flavours (Ubuntu, Debian, Gentoo, Mandriva, OpenSUSE), they’re making it very easy for a wider range of users to try the software. The following downloads are also available:
We’re not aware of any other FOSS non-linear video editing tool that makes it so easy for new users to test and try the software.
We’re only about two weeks late noticing that the BBC has released the second episode in their R&DTV series. Again they’re providing a whole bunch of different video codecs – including Ogg Theora, but they’re still not their offering files encoded in their own Dirac codec. More information available on the main page or the BBC Backstage blog, but a wider selection of files can also be found directly on the FTP site where both 30 minute and 5 minute versions are available, as well as an entire asset bundle with rushes.
The BBC has released this content under a Creative Commons attribution licence, allowing everyone to remix as they see fit, providing an original BBC credit is maintained.
Our post regarding Episode 1 of R&DTV goes into some more details regarding the technical details of the available files.