Playing Movies on the iAudio X5

I am enraptured by my new Cowan iAudio X5.
It plays both flac and ogg vorbis and appears to my linux box as a
standard USB storage device. Given this level of openness I’m willing
to forgive it for running some version of embedded windows.

However until today I hadn’t got around to trying to get it to play
back any useful videos. It comes loaded with some short video clips
which are basically adverts for other Cowan products. However by
interrogating these clips with mplayer I was able to glean the
following information.

VIDEO: [XVID] 160×108 24bpp 13.000 fps 189.4 kbps (23.1 kbyte/s)
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: 48000 Hz, 2 ch, s16le, 128.0 kbit/8.33% (ratio: 16000->192000)

Now I’m no whizz with mencoder so I had to do some searching around until I found a good intro to using mencoder. With that in hand I was able to put together an encoder command that worked.

mencoder inputfile.avi -o outputfile.avi -ovc lavc -oac lavc -lavcopts acodec=mp3:abitrate=96 -ofps 13 -vf scale=160:108

I added the lower bitrate for the audio as some sources suggest that
this makes playback more stable. Theoretically the X5 will play back
video at 15fps but can get unhappy so sticking at 13 seems sensible.
Now I’m not sure that I’d want to watch Lord of the Rings at 160×108
but character driven drama like House or The West Wing is remarkably
watcheable at this resolution. I doubt I’ll use this feature day to day
but if I was preparing for a long flight I might whack a couple of
seasons of my favourite TV shows onto the X5 to serve as an alternative
to the inevitabley dreadful in-flight movie.

15 thoughts on “Playing Movies on the iAudio X5”

  1. Hi there,

    Great post. I was flailing around trying to find movies that would work on my new X5. For a while I thought I’d got a dud! You saved the day. Thank you!

  2. Thanks for the info. I’m currently on an XP machine at home, but I think I can do something similar with VirtualDub. I’m not so nuts for the bundled software for movie encoding, though I have to say it’s fast, and more robust than I expected.

    Still, you’re better off with mencoder. And I’m jealous of you for your Linux. One day I’ll make the switch. Getting the X5 was a good step in that direction.

  3. This looks to be exactly what I’ve been looking for approaching on a month now.

    You should post a link to here, if you haven’t already, in the forum over at iAudio.com. I poked around there quite a bit expecting to find exactly this.

  4. This looks great, but I apparently don’t have the mp3 codec…..

    Audio LAVC, couldn’t find encoder for codec mp3

    Could you post the output of….

    mencoder -ovc help

    and

    mencoder -oac help

    so I can check out what codecs I need to install pls,

    Chhers

  5. UPS is currently in the process of shipping me a new 30GB X5L. I’m excited about transcoding my daily MythTV recordings of BBC World News and watching them on the bus. Thanks for the command line options for mencoder!

  6. neil,
    you probably need to install lame

    Available codecs:
    copy – frame copy, without re-encoding (useful for AC3)
    pcm – uncompressed PCM audio
    mp3lame – cbr/abr/vbr MP3 using libmp3lame
    lavc – FFmpeg audio encoder (MP2, AC3, …)

  7. Hi, thanks for the mencoder line. I’ve been playing around a little with mencoder before but had something wrong.

    You can additionally lower the video bitrate to save quite some space (and probable CPU power on the device), because with this resolution you don’t need high bitrates. By default, I got something like 350kbps for the video and I don’t see any difference to the 150 I use now and they save nearly 50% of space. Plus I used “-3” as the second scale parameter so the aspect ratio will not be modified by mencoder. Here’s my new shell function:

    x5enc() {
    # Encode video to run on X5/X5L player
    # usage: x5enc SOURCE TARGET
    mencoder $1 -o $2 -ovc lavc -oac lavc \
    -lavcopts acodec=mp3:abitrate=128:vbitrate=128 \
    -vf scale=160:-3 -ofps 13
    }

    Maybe using -o xvid can get even better results, but It’s more CPU intensive while encoding.

    cheers chris

  8. Pingback: Blogroth
  9. I noticed I experienced problems playing movies when I used lavc for audio encoding. After switching to -oac mp3lame -lameopts cbr:br=128 it works nicely. Also I thought about running mplayer -vo null -nosound -frames 1 and check the output for the video size so I can switch between scale=160:-3 and scale=-3:108 🙂

  10. That’s weird. I’ve tried encoding it on linux with slightly different options. They work as well but it runs choppy. Here’s what I tried.

    mencoder movie.mov -ofps 15 -vop scale=160:120 -ovc xvid -oac mp3lame -xvidencopts bitrate=800 -lameopts cbr:br=128 -o movie.avi

  11. I used Chris’ x5enc() script. The resulting video plays great with mplayer, but the video plays too fast on the iaudio x5. The audio plays at the correct speed, so there is a sync problem. Google says that I need to remove the B-frames from the avi to make this work correctly. I did RTFM on mencoder but couldn’t figure out how to get this working. Anyone know how to remove the B-frames from the video, so that it plays in sync on the iaudio? Cheers,
    Raj.

  12. This worked for me in the end…
    It seems like when I used a lower ofps the video would play faster than the audio causing sync problems… but this worked fine on a 30 min video i tested…

    mencoder in.mpg -o out.avi -oac mp3lame -lameopts mode=2:cbr:br=96:vol=0 -ovc lavc -lavco
    pts vcodec=mpeg4:vbitrate=100:vhq:vpass=1:vmax_b_frames=0 -ffourcc XVID -vf scal
    e=160:128 -ofps 15;

    Rajesh Duggal

Leave a Reply

Your email address will not be published. Required fields are marked *