Recent Changes - Search:

Linux is free.
Life is good.

Linux Training
10am on Meeting Days!

1825 Monetary Lane Suite #104 Carrollton, TX

Do a presentation at NTLUG.

What is the Linux Installation Project?

Real companies using Linux!

Not just for business anymore.

Providing ready to run platforms on Linux

Mplayer Swiss Army Knife

Using mplayer and mencoder to Convert Media

Christopher J. Cox
North Texas Linux Users Group
July 19, 2007


The Apple iPod changed the rules with regard to audio and video. The "standard" audio and video formats are now ones that are expressly allowed on the iPod.

The iPod preferred video is an Mpeg4 option called AVC (Advanced Video Coding) or H.264. Most video podcasts are in this format with the extension .mp4 or .m4v (the latter being a corrupted extension invented by Apple).

Mp4 Player Confusion

The problem with AVC H.264 is probably the Mpeg4 extension, .mp4. Mpeg4 is a container and CAN contain other codings beside AVC. The confusion comes in the fact that ALL media players, including Portable Media Players like the Cowon A2 and Archos x04, will refer to themselves as MP4 players. However, the world understands this to mean AVC H.264 iPod style. Thus we have the terms Mpeg4 (a container). MP4 (an extension) and the fact that Mpeg4 doesn't just mean MP4 and doesn't always mean AVC H.264. Whew! So let the buyer beware. Your player may not play the type of media that you think it does.

The Cowon A2 "MP4" Player

The Cowon A2 understands several coding inside of an AVI (.avi) container. Yes... that's right, the .mp4 (Mpeg4) container is not understood by this "MP4" player. There was an early firmware that supported mpeg2 (e.g. DVD vob), but that feature has been removed. The Cowon A2 costs anywhere from $240 (20GB refurb) to $350 (30GB with screen protector). I recently purchased a slightly used A2 for $225.

Cowon A2 Video Formats

  • Containers supported:
    • AVI (.avi)
    • ASF (.asf)
    • WMV (.wmv)
  • Codecs supported:
    • DivX 3+
    • XviD (but no GMC or QPEL motion compensation/enhancers)
    • WMV9 (some later WMV too)
    • MPEG1 (possibly unstable)

The Archos x04 "MP4" Player

The Archos x04 line of players understands AVI containers similar to the Cowon. The Archos series costs anywhere from $250 (30GB) to $550 (7" 80GB). Purchased a 40G 504 for $200 via with the Travel Docking station. A true docking station costs $100 and optional video/feature plugins cost $20 each. No case is provided, cases cost about $20. No AC adapter provided with either docking station.

Archos x04 Video Formats

  • Containers supported:
    • AVI (.avi)
    • ASF (.asf)
    • WMV (.wmv)
  • Codecs supported:
    • DivX 3+
    • XviD (but no GMC or QPEL motion compensation/enhancers)
    • WMV9

So... roughly the same as the Cowon A2... UNLESS you purchase the optional plugins!

The Archos x04 "MP" Player Plugins

The Archos has optional plugins that can be purchased to enable extra functionality. Two of those plugins add additional video codec support:

  • Podcast Plugin
    • AVC H.264 (.mp4, .m4v)
    • Some Quicktime files
  • Cinema Plugin
    • MPEG2 (.mpg, .vob) with 5.1 sound (unencrypted only)
    • MPEG1

Archos plugins cost about $20 each.

Usability for Videos "Out of the Box"

The Archos and Cowon are very comparable out of the box with regards to video formats. The main codings to use are either DivX or XviD.

If you spend an extra $40, the Archos adds the very popular (iPod) formats for AVC H.264 and allows you to store full DVD ripped .vobs that can be played on the player.

But... "Out of the Box", the units are pretty much equal.

Encoding DivX for Cowon A2 or Archos 504

Mencoder is a utility that can be used to read one video format and write to another. It is well suited in fact for converting to DiVX or Xvid coded videos from other formats.

  • Easy ripping of a DVD to .vob (MPEG2)
    • mplayer dvd://1 -dumpstream -dumpfile myvideo.vob
  • Encoding to DivX using mencoder (with MP3 audio)
    • mencoder myvideo.vob -ovc lavc -lavcopts vodec=mpeg4 \
      -ffourcc DIVX -oac mp3lame -lameopts cbr:br=128 -o myvideo.avi

Tuning DivX Creation

Videos can be in a variety of sizes and aspect ratios. DVDs rips are usually 720 wide with either a fullscreen (4:3) or widescreen (16:9 or greater) aspect.

  • For widescreen DVDs, scales to 480x360 and we crop to 480x272
    • mencoder myvideo.vob -ovc lavc -lavcopts vcodec=mpeg4 \
      -ffourcc DIVX -vf scale -zoom -xy 480 -vf-add crop=480:272 \
      -oac mp3lame -lameopts cbr:br=128 -o myvideo.avi
  • For fullscreen DVDs, scales to 320x240 4:3
    • mencoder myvideo.vob -ovc lavc -lavcopts vcodec=mpeg4 \
      -ffourcc DIVX -vf scale -zoom -xy 320 -oac mp3lame \
      -lameopts cbr:br=128 -o myvideo.avi

Why 320x240? Why not something better? I chose 320x240 because it is a popular 4:3 size.

Encoding Xvid

Many people believe Xvid to be a higher quality coding than DivX. It is very true that there are more tweakable setting when encoding to Xvid, however the cost in time may not be worth it. Encoding to Xvid can take 3-4 TIMES (!!) as long as encoding to DivX. AND the quality is not all that different. AND Xvid files tend to be slightly larger in size.

What About Other Formats

  • What about Quicktime or Flash conversion?
    • Quicktime (H.263, H.262)
      • mencoder -ovc lavc -lavcopts vcodec=mpeg4 \
        -ffourcc DIVX -vf scale -zoom -xy 480 -vf-add crop=480:272 \
        -oac mp3lame -lameopts cbr:br=128 -o decyferdown.avi
  • Flash? Let's say you use youtube-dl, to download:
    • Flash
      • mencoder yL_-1d9OSdk.flv -ovc lavc -lavcopts vcodec=mpeg4 \
        -ffourcc DIVX -vf scale -zoom -xy 320 -oac mp3lame \
        -lameopts cbr:br=128 -o chickenchicken.avi

So, whether is a wmv, mov or flv, we can convert them all!

Why Not a Free Format?

With all of this Quicktime, Flash, DivX, Xvid, AVC H.264, etc... why isn't there a freely available coding?

There is!

Ogg Theora!

Ogg? Doesn't the Cowon A2 support Ogg?

Sigh... here we go again. Technically, the audio codec is Ogg Vorbis whereas the video codec is called Ogg Theora. The Cowon A2 does support the Ogg Vorbis codec. There are a handful of media players that will handle Ogg Vorbis. However, I do not know of a single video player that supports Ogg Theora.

Chris's Soapbox

So, eventually there will be lots of players handling Ogg Theora?

No. Probably not. In fact there may never be ONE. The problem is that the world is satisfied with the status quo. And that "status quo" is rapidly moving us toward a completely DRM controlled environment. In fact, we may be on the verge of the elimination of ALL physical media.

Any hope?

I see some hope in the advent of UMPC devices. Some already run Linux, my guess is that quite a few of them will be able to run Linux. The nice thing about a UMPC is that it is a computer, so we can do whatever we want.

Chris's Shinier Soapbox

With regards to DRM, recent development do show some signs of escape. The RIAA is trying desperately to shutdown ALL internet radio by making it TOO expensive for them to operate. They are doing this by GREATLY increasing the royalties due anytime you play a "published" song. What used to cost tens of thousands to operate per month could cost hundreds of thousands of dollars (or more). AND they want back royalties paid to them for whatever you played in the PAST (sheesh!!).


Chris's Shinier Soapbox

The good part of the RIAA's attempt to squash all music is that it may well put them out of business. Radio stations, both online and broadcast are looking and taking over the music industry (away from the RIAA). They are doing this by funding and supporting a growing field of INDEPENDENT artists. In fact, there is coming a day (and it might be VERY soon) where EVERY artist will prefer the independent model because at the end of the day, they will end up with more money in the artist's pocket and get BETTER promotion that what the RIAA owned publishers can do.

But... who knows...

Archos vs. Cowon... FIGHT!

Archos 4th GenCowon A2
Plays more codecs with addition of plugins.Supports slightly more codecs without plugins
Removable battery.Have to send unit in for battery repair.
More committed to Linux.New players are WinCE based.
Most comparable Archos models are slightly smaller.Cowon is a bit large and heavy.
Svideo and component out with dock.Composite in/out only.
604 has WiFi add-on.It's just a player/recorder.
504 has capacity up to 160GB.30GB max.
Reads PDF files.Have to convert PDFs to graphic files or text.

Cowon Strikes Back! FIGHT!

Archos 4th GenCowon A2
No recording capability without $$$ dock.Records audio and video directly.
Sound output not very strong.Crank it up!
Can do a lot if you PAY $$$.Does quite a bit out of the box.
Simple sound EqualizerEqualizer, BBE, MPEnhance, Mach3Bass, Surround Sound.
World's worst customer support.Reasonable support esp. in the U.S.A.
Hard to obtain AC Adapter (USB charge only)Charges via AC adapter or USB
Proprietary USB cable.Generic USB cable.
Minimal number of firmware upgrades.Lots of beneficial firmware upgrades.
Linux based... source code???Source code, hacking begun.
Bad quality reputation.Reasonable quality reputation.
Some units sensitive to static charges.Never seen it lock up.


The Cowon A2 and the Archos x04 series are excellent Linux based Portable Media Players. Neither dramatically outshines the other when doing a comparison. The Archos can support more codec options, but the Cowon A2 seems to have better support and overall quality.

Page last modified on August 22, 2007, at 02:45 AM