Recently in Video Category

The FFmpeg::Command Perl module is a convenient way to drive the ffmpeg command-line utility for converting multimedia files.

For work, I have developed some scripts that make heavy use of FFmpeg::Command. Yesterday, one of the other developers told me they need a conversion script to be able to merge separate video and audio streams into one file that contains both audio and video. The ffmpeg command-line utility can do this by accepting more than one input file. For example:

$ ffmpeg -i video.avi -i audio.wav -acodec copy -vcodec copy merged.avi

The FFmpeg::Command Perl module, however, assumed there can only be one input file. I made the necessary changes to the module code so that it would accept multiple input files, created a patch file, and sent it to the Module owner Gosuke Miyashita. This morning, I received e-mail from Gosuke thanking me for the patch and informing me that he has uploaded a new version (v0.12) of FFmpeg::Command to CPAN.

I love Perl and open source software!

I installed Hulu Desktop for Linux recently, but could not get it to work. When I ran huludesktop, a dialog box would display saying that the Flash plugin could not be found and that I should edit ~/.huludesktop.

The ~/.huludesktop file has a INI-style syntax and has a section for Flash settings:

[flash]
flash_location = (null)

It’s not obvious whether the flash_location variable needs to be set to a directory or a full path. I tried both /usr/lib/flash-plugin/ and /usr/lib/flash-plugin/libflashplugin.so. Neither of these worked. I didn’t find much help via Google, but kept experimenting until I found a solution that worked:

flash_location = /usr/lib64/mozilla/plugins-wrapped/nswrapper_32_64.libflashplayer.so

When the 64-bit Flash plugin is officially released, this will probably become unnecessary. In the meantime, Hulu Desktop works!

I think I have finally, really arrived.

I’ve been doing contract work for a company in Provo that is launching a new website called YoManSports.com, which is in beta right now. At first glance, the site may appear to be a “YouTube for sports,” but it so much more than that. The concept is centered around video sharing, but includes familiar social networking elements you’d find on sites like Facebook or MySpace. In addition, there are several applications within the site that are sports-related — things like competition bracketing, scorecards, and groups. Perhaps the coolest feature that rounds out the list is the broadcast feature. This lets a person go to a sporting event with a video camera, even something as simple as a USB webcam, and set up a live web broadcast that anyone with a web browser can watch. The person managing the broadcast can mix prerecorded video, pictures, and even live video from other users into the broadcast. There’s even a news ticker for embedding clickable URL links into the broadcast. It’s pretty cool stuff.

Now, I said at the beginning of this post that I have arrived because we’ve been asked by management to blog regularly about the site and what we’re doing with it as part of our marketing plan. So, yeah, it’s cool to be able to do this and not be wasting my time at work.

My job has been designing and building the server architecture that sits behind the scenes and makes it all work. I was brought in late 2008 when the site was pretty much in a prototype stage. All the code was running on a single server and it really wasn’t designed to scale beyond that one server. So, one of the first things I did was figured out what we’d need to do split things like streaming video, web services, and database services onto their own dedicated servers.

After that, I went through and figured out how we were going to accomodate loads higher than we could with individual servers. In a nutshell: load balancing. That has now been implemented.

Another thing I’ve had a big hand in is offloaded encoding and conversion. The developers had created routines to do all the video encoding in PHP on the frontend of the website. Of course, doing video encoding on the same server Apache is running on can be detrimental to the experience of other website users. I developed a distributed encoding system that handles all the video conversion and encoding on a separate set of servers. I did it with Perl, of course.

I’m pleased with the technology being used on the site. I’m not a fan of PHP, but it’s doing the job well for frontend development. We’re making use of a lot of open source technology in dealing with videos. For example, all our transcoding is being done with the formidable FFMPEG software along with libraries like x264 and FAAC.

We’re leveraging Flash pretty heavily pretty heavily to make the site work so it’s fortunate that Flash support has nearly ceased being a problem for cross-platform compatibility. YoManSports.com works almost seamlessly across Windows, Mac OS, and Linux.

Watch this space for more info to come.

After the MiniDV videotape camcorders and before the explosion of hard disk camcorders,
several manufacturers were making these camcorders that would record directly to DVD media. A handful of them recorded to full-size DVD media, but most recorded to a small (~3 inches in diameter) mini-DVD media. One of these discs can hold about 30 minutes of SD (740x480, 30 frames per second) video or about 1.4GB of data.

A couple years ago, I was working on a video editing project and one of my sources was from one of these mini-DVD camcorders. One of the perks of the mini-DVD format is you can throw it right into a DVD player and it plays it, without much grief, like a normal DVD movie. There's even a scene-selection menu that shows you thumbnails of images to select scenes recorded on the DVD.

I think the mini-DVD format was a great idea for people who just want to videotape an event and throw it in the DVD player, but it's not so good for someone who wants to edit the video on the computer. The camcorder manufacturers probably shipped the cameras with some kind of conversion program to extract the video from the discs and convert it into an editable format, but since I didn't own one of these mini-DVD camcorders, I didn't have such software.

A little googling and I found the answer!

Check out this command:

mplayer dvd://1 -dumpstream -dumpfile dvd.vob

This mplayer command may be familiar to those who rip video from DVDs to convert it to an MPEG4 format or something similar.

I can't edit a VOB file, so I needed to convert the VOB into, preferably, an AVI. Most of the AVIs I edit are DV format AVIs that I get off my DV camcorders. I knew if I could get the video on the mini-DVD into that format, I'd be in heaven. I didn't find a direct way to do this, but I did find two more steps that would do it.

ffmpeg -i dvd.vob -target dv dvd.dv
cat dvd.dv | dvgrab -f dv2 -s 0 -stdin

The first command (ffmpeg) converts the VOB into raw DV data. This is data you could stream to a camcorder and store on a tape. It's not in an AVI container, but it's close. The next command (dvgrab) is usually used for capturing video from IEEE 1394 (Firewire) video devices, but being that it has an option (-stdin) for reading data from standard input, we can use it to convert our raw DV data to an AVI.

Voila!

I think this will be the last interview video from the 2007 Utah Open Source Conference. This is Derek Carter of NeverBlock talking about Xen, virtualization, and his history using and teaching about Linux and open source software.

I think I may be able to put together video for one more conference session, but otherwise, we're pretty much done with video for the 2007 conference. We're looking forward to doing a better job of recording all the keynotes and sessions at the 2008 conference.

You can see this video and many others by going to my YouTube Open Source TV playlist, or by visiting the UTOSF YouTube group.

I've uploaded two more videos to YouTube for OpenSourceTV.tv.

First, we have an interview with Clint Savage of the Utah Open Source Foundation and the main driving force behind last year's first Utah Open Source Conference.

Next, we have an interview with Scott Paul Robertson (AKA "spr") who gave a presentation at UTOSC 2007 on Django and who is also the author of one of my favorite open source utilities: oggify.

I've got at least one more interview to edit and upload and we also have other content coming soon as well.

You can see Clint's interview and Scott's interview and many others by going to my YouTube Open Source TV playlist, or by visiting the UTOSF YouTube group.

Reporting from the 2007 Utah Open Source Conference! This has been a remarkable experience seeing the community of Utah open source fans gather for fun, enlightenment, and education.

I have not been able to attend too many conference sessions, unfortunately. I had planned to, but I’ve been distracted by a new role doing interviews for Open Source TV — a project being driven by KnowledgeBlue.

Yesterday, I interviewed Dax Kelson of Guru Labs and Jared Smith of Digium. Both interviews went very well, I thought.

Today, I am hoping to talk to Pete Ashdown of XMission, Christer Edwards of ubuntu-tutorials.com, Tim Riker, Tim Nicholes of Apache, and Scott Paul Robertson (spr).

I’m also giving my presentation on NetworkManager later this afternoon.

About this Archive

This page is an archive of recent entries in the Video category.

Perl programming is the previous category.

Web design/development is the next category.

Find recent content on the main index or look in the archives to find all content.