Archive
Blackmagic Decklink SDI and Linux
Almost a year ago, I invested in a central London based post-production company. At the time, I had dreams of pushing open source software solutions into the professional post-production arena. Things haven’t quite worked out as planned, and I’ve made very limited headway on this project. Business imperatives took over and changing a whole ecosystem is a big job. I’ve continued to use Linux on my laptop and happily connect to printers and network drives, but that’s about all.
Recently I had an opportunity to change all that. We needed a tape digitisation solution, separate from our Avid editing suites, for a new project. I’ve know for a while that Blackmagic’s Decklink range of cards work with Linux and were pretty good for capturing from SDI. We purchased the basic Decklink SDI card, re-cycled an old machine onto which I installed Linux Mint Debian and away we went….
Things weren’t entirely smooth from the start. I upgraded the Mint Debian ISO, including the kernel to 2.6.39. This was my first mistake. The card was not recognised with this kernel. Booting into the original 2.6.32 kernel overcame this problem and the card was recognised. I had to download the relevant Linux software from the Blackmagic website, as the accompanying DVD only included Windows software. The available Linux software from Blackmagic included the relevant drivers, firmware and Media Express software. Unfortunately, other advertised items such as the drive speed test and alpha keying utilities are not available for Linux.
Once everything was up and running, it was time to capture. The Media Express 2.3.1 software was pretty straight forward to use. Setting in and out points allowed the software to control the J30 Digibeta deck and content was captured in Uncompressed 10-bit YUV formate. The other limited codec options included Uncompressed 8-bit YUV, RGB and MotionJPEG. This uncompressed file was then transcoded to IMX50 using FFMbc. The whole process seemed to work reasonably well, and I’m just now waiting to send the IMX50 sample off for technical inspection.
Unfortunately, the Media Express software as supplied did not provide options to change the SD captured frame size from 720×576 to anything else. Ideally I was looking for 720×608 so that VITC was also captured. A phone call to Blackmagic revealed that this was possible with the Windows and Mac version of their software, but not on Linux. Their Linux SDK did expose the necessary calls, but the software had not been written to include them. Essentially, if I wanted VITC, I’d need to write a capture utility myself. Somewhat disappointing.
Overall, I’m pleased that we now have an SDI capture solution running on Linux. However, the Blackmagic Decklink card still feels a little half baked and Linux was perhaps only an afterthought for them.
Updates on WebM Support – All Aboard!
As could probably be predicted, there’s been a lot more press around WebM over the last ten days or so. A few articles are worth noting.
WebM – The New Open Source Codec on the Block
In August 2009, Google acquired codec developer On2 Technologies for a rumoured $106 million. The flagship On2 codec was VP8 and it was also rumoured at the time that Google may open source this technology in the future, although a number of challenges lay ahead.
Dirac Schrödinger 1.0.9 Released
As we were on holiday last week, in the chilly snows of Austria, we almost missed an important announcement regarding the Schrödinger implementation of the Dirac codec.
Ripping CDs with FLAC – Best Compression Settings
As storage space becomes cheaper, there’s a growing trend to save digital music files in a lossless format. Such lossless formats provide an exact replication of the audio quality found in the original content, usually on CD. The resulting files are also much larger, when compared to MP3 or AAC at 128kbps or 256kpbs. A favourite open source lossless audio codec is FLAC, which stands for Free Lossless Audio Codec. Within the possible FLAC settings there are 8 levels of compression to choose from when creating new files.
Lossless codec? Compression? Doesn’t compression result in loss of detail? Not always. There are many lossy codecs, both audio and video, that apply various compression techniques that actually discard some of the original material, to obtain smaller file sizes. The better the codec is at discarding items that don’t impare the listening or viewing experience, the more impressive the end result will be.
FLAC, being lossless, doesn’t discard any of the original content, but still applies compression techniques. View this like compressing a file with Gzip or Bzip perhaps. Smaller files are achieved, but when de-compressed nothing has been lost in the process. Perhaps think of it like folding a piece of paper. Fold it in half once, and the end result is smaller. Keep folding to produce smaller and smaller (or more highly compressed) paper packages. Unfold the paper, and you still have the same original piece of paper. Ignore fold lines and degradation over time! This doesn’t happen in the world of bits and bytes.
We decided to test which of the FLAC compression settings provided the best trade-off between final file size and encoding time. Higher compression will require more time, but should produce smaller file sizes.
Trying to mimic how we would actually go about ripping a whole CD, we decided to use the Ripit utility, and follow instructions posted on the Debian forum. Ripit is a great example of a truly useful utility where a fancy GUI is just not needed. Edit one simple configuration file, then type “ripit” at the command prompt and that’s almost all there is to it. There would be some overhead in using Ripit, as it checks the freedb.org database for each album’s details, but this should be minimal.
Grabbing the nearest un-ripped CD from the shelf, our test file will be U2′s Pride (In the Name of Love) from their Best of 1980-1990 album. This song is 3 minutes and 50 seconds long.
Our exact Ripit command was:
>time ripit 01
“Time” provides feedback on the elapsed time of the process. “01″ tells Ripit to just rip the first track on the CD.
The test machine is a reasonably old Dell Inspiron 6400, which contains a Intel Core2 CPU T5500 @ 1.66GHz and 1GB of RAM.
Here are our results from the 8 different levels of compression
available in FLAC. If no compression level is specified, 5 will always
be the default.
Comression Quality: 0
Time: 0m59.309s
Size: 30261367 bytes (28.86MB)
Compression Quality: 1
Time: 1m1.518s
Size: 29643288 bytes (28.27MB)
Compression Quality: 2
Time: 1m0.324s
Size: 29631732 bytes (28.26MB)
compression Quality: 3
Time: 0m57.156s
Size: 28596473 bytes (27.27MB)
Compression Quality: 4
Time: 1m0.707s
Size: 27717767 bytes (26.43MB)
Compression Quality: 5
Time: 1m1.406s
Size: 27710285 bytes (26.43MB)
Comression Quality: 6
Time: 1m1.899s
Size: 27710119 bytes (26.43MB)
Compression Quality: 7
Time: 1m8.692s
Size: 27696835 bytes (26.41MB)
Compression Quality: 8
Time: 1m13.376s
Size: 27664197 bytes (26.38MB)
Between Compression Quality 0 and Compression Quality 8, there’s approximately 13.5 second and 2.5MB difference. This might not seem like very much, but let’s expand these figures to account for an entire CD.
Assuming all tracks are approximately the same length (3:50) and that there are 12 tracks on the average CD, we have the following figures:
13.5 seconds x 12 = 162 seconds (2 minutes 42 seconds)
2.5MB x 12 = 30MB.
Realistically though, you can see there’s a big jump in time between Compression Quality 6 and Compression Quality 7, while there’s not a lot of difference in time between Compression Quality 5 and Compression Quality 0 (Ignoring Compression Quality 3′s time anomaly which we can’t account for). There’s also not a lot of file size difference between Compression Quality 5 and Compression Quality 8.
Therefore, unless storage space is a really big issue, the average user is probably better off leaving the Compression Quality settings at Default (5) and saving almost 3 minutes for CD rip. Then again, on a newer machine, this time difference is likely to be much less, so you may as well use Compression Quality 8 and save that little bit of space.
In the end, Compression Quality settings in FLAC don’t make that much difference. Leaving the settings at Default is a pretty good choice, but setting them to a maximum of 8 will save some space, without a major time impact.
Interview with Magic Lantern Creator
Several months ago we posted an article about the Magic Lantern firmware for the Canon 5D Mark II video DSLR. This open source software adds functionality to the 5D that Canon didn’t provide out of the box. There has been quite a lot of progress on Magic Lantern over the last few months. The latest release is version 0.1.6, but even since then further enhancements have been made, including Autoboot.
The originating creator of Magic Lantern, Trammell Hudson, recently participated in an interview available on the Cinema5d website. Here are some short excerpts from Trammell’s responses:
4. What plans do you have for the new 5d firmware update? Can we expect anything beyond 24p/25p?
You would have to ask Canon about their plans… I’ll update my code to work with their new firmware once it is available. It would really please me if Canon incorporated all of the features from Magic Lantern into their firmware.
On my roadmap for upcoming Magic Lantern releases:
* 1080i HDMI output (still having technical problems)
* SMPTE timecode jamming
* Scripting
* USB control from the Impero remote follow-focus
* Waveforms and vector scope
* Autoboot (now available)
5. On your Wikia Page you describe the Magic Lantern as ” an enhancement atop of Canon’s firmware that makes your 5D Mark II into the 5D Mark Free” What exactly do you mean?
Most equipment is “closed” in that what you buy is what you get. Sure, you can put it on rails, add a follow focus and mattebox, but you can’t really change what is going on inside the box. With Magic Lantern, however, the internals of the camera have been opened up so that it is possible to add new features that the manufacturer might not have ever imagined.
Read the full text of the interview over at Cinema5d.
A potentially useful enhancement to the Magic Lantern firmware would be the ability to change the codec used in the 5D Mark II. Currently, content is stored as H.264 at around 40Mbps. While this provides for some very nice high quality footage, it’d be nice if additional open source options were included, like Lagarith and Dirac Research. The Magic Lantern Wikia Discussion page has a few comments around this idea already.
H264 Video Encoding on Amazon’s EC2
in effect from November 1st 2009.
How Firefox Is Pushing Open Video Onto the Web
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.
HTML 5, Codecs and the Video Tag
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.
BBC R&DTV Episode 2 Released
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.