Archive

Archive for the ‘Video’ Category

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 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.

Cinelerra Quietly Releases New Version

October 1, 2009 Leave a comment

Without much ado, Heroine Virtual has quietly released Cinelerra 4.1 earlier this month.

A full list of detailed changes is available on the Cinelerra website.
In the race for who has the most effects in their Open Source editing tool, Cinelerra totals 58 in a list claimed not to be updated, including really useful items such a Reverse Telecine, Deinterlance and Denoise. For me, this trumps OpenShot’s Glow, Water and Echo.
After 10 minutes trawling, I can’t seem to figure out if the CinelerraCV (Community Version) is tracking to the latest code or not. There’s been no News announcements on their website since June 2009.

OpenShot Video Editor Adds New Effects

October 1, 2009 Leave a comment

Some noise on the Interwebs has been made in the last couple of days regarding the latest updates to the OpenShot Video Editor

The is now a PPA (that’s Personal Package Archive, for those who don’t use or care about Ubuntu) available for OpenShot, as well as the inclusion of 33 new video and audio effects.
I applaud the work done by the OpenShot team, as I still believe Open Source non-linear video editing has much room for growth. However, I do question the need for 33 new video and audio effects. Some of the new effects are very nice, a welcome inclusion and most likely quite useful. Chroma Key (Green Screen) support is one of those. However, other effects are largely just eye candy which I’m not clear would be truly useful to the serious editor. These include Glow and Water from the video effect selection and Echo from the audio options. How often would a professional video editor use these tools in a commercial solution such as Final Cut Pro? (which actually has over 150 effects and transitions, so I guess there’s a place for them!) From my own, limited, editing experience, I rarely use effects, sticking mostly to simple fade transitions.
The most important aspect of any video editing software is stability and codec support. I can’t accurately comment on OpenShot in this area, as I’ve not tested the software – I just can’t get past that bubble blue button interface.
I couldn’t easily find a complete list of all the new 33 effects, so best to read the blog post on the OpenShot site for more information, complete with a small dig at the PiTiVi team.

PiTiVi 0.13.3 Released

September 16, 2009 Leave a comment

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.

This latest version features the following updates:
  • Fix Rendering Failures
  • UI beautifications
  • Switch to themeable ruler
  • Speed optimisations
  • Show the project name in the window title
For more information regarding this release, including dependencies, contributors and a long list of bugs fixed, checkout the release notes page.
Version 0.13.3 of PiTiVi can be downloaded here.

FFmpeg Watermark.c Alpha Channel Patch

September 10, 2009 Leave a comment

Finally, something actually useful on this blog……


If you need to apply a watermark, or Digital Onscreen Graphic (DOG), to a file during the transcode process, the only way to currently achieve this with FFmpeg is to use the vhook watermark.c filter. Unfortunately, vhooks no longer work with the latest SVN snapshots of FFmpeg, as everyone is supposed to be writing new filters for the AVFilter framework.

Unfortunately, again, there’s not always time to write brand new filters in C from scratch. Sometimes, a quicker solution is required. At the major UK media content distribution company that I work for, we needed to transcode approximately 5,000 VC-1 5Mbps files to 2-pass H.264 at 1.5Mbps and 500kbps, within 6 weeks. We decided to find all the spare PCs we could get out hands on, install Debian Lenny and FFmpeg, then start transcoding. However, we also needed to apply a DOG to each and every file. How to do this with FFmpeg….. use the watermark.c vhook, which fortunately does still work with the 0.5 release of FFmpeg. Great news. Well, almost.

To achieve a really nice looking DOG, we wanted to use a PNG file with Alpha Channels. The existing watermark.c code did not support this. Therefore, we’ve written a patch.

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.


Usage:

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.

Categories: FFmpeg, Video Tags: , ,

Kdenlive 0.7.5 Released

July 2, 2009 Leave a comment

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.

There’s an interesting Discover Kdenlive 0.7.5 page available, outlining the main changes without having to wade through heavy release notes. The main changes in this version include:
  • 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)

A new version of the MLT framework (Media Lovin’ Toolkit now at 4.4) that Kdenlive is built on top of was also released today.

Categories: Kdenlive, Video Tags: , , ,

How Firefox Is Pushing Open Video Onto the Web

June 20, 2009 Leave a comment

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
six years?

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.

Categories: Codecs, Video Tags: , , , ,

HTML 5, Codecs and the Video Tag

June 20, 2009 Leave a comment

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.

The next session had representatives from all major browsers (Firefox, Webkit and Opera), except IE, present to talk about HTML 5 and the new <video> tag.

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.

Metavid developers also demonstrated a cute javascript library embed workaround that covered IE’s lack of support for the <video> tag. Full details are available on the Metavid website, as well as a demonstration of the code in action. Even if you’re browser doesn’t currently support the HTML 5 <video> element, this script will take care of it.

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. 

Kdenlive 0.7.4 Released, Makes it Easy to Try

June 20, 2009 Leave a comment

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.

BBC R&DTV Episode 2 Released

June 20, 2009 Leave a comment

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.

This episode features interviews with David Kirby on the BBC’s Ingex project, Matt Biddulph CTO of Dopplr and Jason Calacanis CEO of Mahalo.com.

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.

Follow

Get every new post delivered to your Inbox.