Now Pages
If It's Not Live - Then It's Not NOW!
Sign Up!
Welcome to Now Pages
Saturday, September 23 2017 @ 02:27 AM CDT

Converting Video is a Pain - But...

Unless you've been studying digital video (and audio, and still) technology for some time now, you're probably pretty confused by all the various acronyms, file extensions, terms and "standards" - I know, I certainly was a few years ago when I really started to get into dealing with it in a big way.

Just the fact that there are two different aspects to digital video streaming that seem to have the same names for different things sure didn't help any at all: codecs and containers.

Before you start thinking about changing video files from one format to the other, you need to get the above firmly in your head.

The reason for this is that, for example, two different AVI files of the same material may have video encoded with different video codecs, and audio encoded with different audio codecs, and therefore may not be readable by the same program, even though the file extension ".avi" is the same on both files. Therein lies the major source of confusion. Similarly, other container formats may also contain any of several different codecs for video and/or audio, and in fact may contain several of each in some instances.

That all being said, the reason I want to talk about them is that I finally found (wasn't looking, but somebody pointed it out to me) a graphical front-end to a video transformation tool that I've been using for years now that helps for many of the basic transformations you're likely to come across.

The GUI tool is WinFF and the underlying command-line tool is ffmpeg

Using ffmpeg can be more than a bit daunting. It is, like any number of other open source command-line oriented tools, a "Swiss Army Knife" for changing virtually any and all aspects of a video or audio file, from the various codecs to things like frame size, bit-rate and even things like noise reduction, cropping, adding subtexts, etc.

Because of this, lots of people simply throw their arms up in the air and look for something else, while others of us get comfortable with a basic set of conversions and if we are really pressed, dig through the help and various web pages looking for the exact incantation we need that hopefully someone else has found and written about.

That's why I'm so pleased to see WinFF - it fills a void with some standard conversions as well as providing for a bit of a learning experience and also the ability to extend its off-the-shelf settings to include some customizations. More than that, it brings this to Windows without the need to install CygWin just to get ffmpeg command line.

For those of you who simply want to make the "standard" archive files that your archive system or video camera puts out into something you can use with some other non-compatible program, it is a great blessing. Somewhere in its presets is bound to be what you're looking for, and if not, with a bit of work you can create your own custom presets using the originals as templates.

Another major feature of WinFF is that it will apply the same transformation to any number of files - do one to test, then select as many simlar files as you need, set it going and leave it until complete. I transformed almost 100 such files a couple of weeks ago from the camera-original MP4 files to Microsoft Windows Media WMV files that VidBlaster would be able to use. It took the machine about 4 hours to do it, but I was out doing something else at the time.

Prior to this, I'd typically write a small shell script on my Linux box and run it, looping over the various input file names, changing the file name extensions for the output files, and doing the conversion. The command line for ffmpeg would be the same for each, but just getting the various file names changed takes a bit of trickery.  I've accumulated a number of such XXX2YYY batch files over the years: asf2flv asf2mpg asf2vob cmx2jpg crc32 ff-asf2flv mov2flv mp42jpg mpg2mjpeg mpg2mp4 mpg2vob pto2mk vid2jpg

Now, with this one tool, I can do such transformations easily and quickly, and yet still have the ability to customize things like bitrate and frame rate if I need to.

One of the great things about ffmpeg in general and WinFF in particular is that you don't have to set anything up to tell the program what kind of video you're feeding into it; it digs into the file and figures it out - even if the file extension is wrong or missing!

Also, by default, if you don't specify bitrate or frame rate, the conversion is done "same quality" so as much as possible, the program will leave the quality untouched. Note that this still may mean that the conversion lowers the quality somewhat since just unpacking some formats and re-packing them into another format will incur loss of detail. The libraries and algorithms behind the scenes do a pretty good job of optimizing this process but you should expect that any "lossy" codec original might suffer more loss when converted.

Note also that specifying higher (than original) bitrate or frame size won't get you back any detail - it will just make larger files.

Somewhere in the presets you'll likely find what you need. Going beyond the presets really isn't part of live streaming at this point - because this tool really deals only with archive or source files. There are some other tools we'll get into that deal with the live streaming aspect of video format conversions, but that's for another article.


Story Options


Trackback URL for this entry:

No trackback comments for this entry.



My Account

Sign up as a New User
Lost your password?

Older Stories

Sunday 25-Apr