Sunday, December 25, 2005

I loaded a few more videos into my ipod this morning, and they all ran fine.

I then used the camcorder connection cable I bought a few days ago to connect my ipod to the tv, with the plugs swapped around, as per the details here, being:

* Plug the red RCA plug into your TV's yellow RCA jack.
* Plug the yellow RCA plug into your TV's white RCA jack.
* Plug the white RCA plug into your TV's red RCA jack.

This worked fine, and the videos ran fine on the tv.

The quality wasn't terrific, but it was quite watchable. I've yet to try it with something out of the tivo for a true test of the quality.

After that, I noticed that the screen on the ipod, when the backlight goes off, is all discoloured. While I'm whinging, the new ipod always looks greasy, and picks up fingerprints, smears, and tiny scratches like nothing else.

My old ipod mini only every looked a tiny bit grubby around the thumbwheel, and on the apple logo on the back, the anodized aluminium kept it fine otherwise.

I did a bit of googling, and I found that apparently the "rainbow" look on the screen is caused my polarisation, to do with the sun. I might pop into the apple shop and ask them about it at some point, but I'll probably get fobbed off anyway.

I'm really not all that worried, if I could get an ipod with a large capacity, and no screen, I'd be happy, since I never look at the screen anyway, while it's in my pocket, and I'm riding along.

I found Mike Rowehl's blog here, and he has a few good posts about using linux with the video ipod.

He mentioned that he needed to use a version of ffmpeg from CVS, and the command to convert videos. He also talked about using gtkpod to load the videos.

I built and installed mp4v2 first, downloading it from here. It didn't make any difference to gtkpod though, not that I was expecting it to, because gtkpod needs to be recompiled.

So anyway, I decided to build a newer version of ffmpeg, so I could do video conversion on my laptop. It's mainly a gimmicky thing, that I probably won't even use once I get going, but anyway.

I pulled the latest code out of cvs:
cvs -z9 -d:pserver:anonymous@mplayerhq.hu:/cvsroot/ffmpeg co ffmpeg


I configured it:
./configure --enable-mp3lame --enable-libogg --enable-faac --enable-xvid --enable-gpl --enable-x264 --enable-shared

however had issues with the mp3lame library being missing, when I tried to compile it.

I grabbed the latest lame src from here

unbzipped it, configured it, compiled it, and installed it.

This got me a step closer, now I didn't have the ogg library.

I figured I probably didn't need it anyway, so I reconfigured ffmpeg without ogg support:
./configure --enable-mp3lame --enable-faac --enable-xvid --enable-gpl --enable-x264 --enable-shared

And then tried to compile it, but was missing the FAAC library.

This I do need, because the audio on ipod videos needs to be in AAC format, funny that.

I grabbed the FAAC source from here.

It used the external mp4v2 library that I'd already installed.

I compiled and installed it, and went back to ffmpeg again.

I got another step closer, now the xvid library was causing errors.

I downloaded the latest source of xvid, from here, and configured it.

It complained about not being able to find a correct assembler ("configure: WARNING: no correct assembler was found - Compiling generic sources only"), and then I couldn't compile it, getting the error, "cc1: error: unrecognized command line option "-freduce-all-givs""

I figured this was related to the assembler being missing, and it seems that both yasm and nasm were being looked for my xvid, so I installed nasm, since yasm doesn't appear to be available in debian.

I then reconfigured xvid, which found the assembler, but trying to compile (even after a make clean) would result in the same error as before.

I found this forum post, and the error is caused by using GCC4, which I have on my laptop.

Apparently you can fix this with the gcc_select command, but I didn't have it, and it's not available in debian, so I just used the same fix as when I installed Oracle, replacing the gcc symlink from 4 to 3.3:

cd /usr/bin
sudo rm gcc
sudo ln -s gcc-3.3 gcc

When I compiled xvid, it compiled fine.

Installing went through without issue. I went back to ffmpeg.

I got another step forward.. now I was the missing the x264 library.

As before, I figured I probably didn't need it anyway, so I reconfigured ffmpeg without x264 support:
./configure --enable-mp3lame --enable-faac --enable-xvid --enable-gpl --enable-shared


This time it compiled and installed without issue.

I again tried to convert videos, and didn't have any luck. Also, I think there's errors in the output when I run ffmpeg with no parameters.

I'm wondering if there's a problem with the gcc version mismatch.

I stopped working on ffmpeg, and went back to gtkpod.

I'd pulled the latest version out of CVS yesterday, but the INSTALL file tells you to configure it, and there's no configure script.

I ran autogen.sh instead, and it went for a while, before complaining that libglade-2.0 was missing.

I installed libglade2-dev with apt, and it got a bit further, until it complained about the version of the id3tag lib I had installed.

I got the latest version from here.

I was able to configure and compile this without issue.

After this, I was able to use autogen to configure gtkpod successfully.

It also compiled and installed correctly.

I ran it up, and I was able to load videos that I converted with the windows tool into the ipod, so I'm halfway there, I just have to find the version of ffmpeg the windows tool uses, and compile it for linux.

Update: I finally managed to get ffmpeg to output a valid file for the ipod. The command I ended up with, building it a bit at a time, is as follows:
ffmpeg -i [input file] -vcodec xvid -b 1800 -acodec aac -ab 128 -maxrate 2500 -qmin 3 -qmax 5 -s 320x240 -f mp4 [output file.mp4]

I could probably use less audio bitrate, 64 or something, I'll continue testing, and checking quality. Also, the order of the switches matters, the output filename should be on the end.

0 Comments:

Post a Comment

<< Home