Cowon D2, ffmpeg and Ubuntu 10.04 Lucid Lynx

I’ve installed Ubuntu 10.04 Lucid Lynx in order to replace my main desktop running 8.10. The biggest problem I’ve encountered yet was that ffmpeg can no longer encode videos for my little Cowon D2 media player.

I was using this command to encode the videos and it worked well under 8.10:

ffmpeg -i <file> -r 25 -b 600k -mbd rd -flags +4mv+aic -cmp 2 -subcmp 2 -g 300 -vcodec libxvid -acodec libmp3lame -ab 128k -async 1 -s 320x240 -aspect 4:3 <outfile>

On Lucid ffmpeg gives this version

FFmpeg version SVN-r0.5.1-4:0.5.1-1ubuntu1

on Intrepid it’s this one

3:0.svn20080206-12ubuntu3.1

I tried to install the latest ffmpeg (http://ubuntuforums. … wthread.php?t=786095) but the problem remained. So I checked the version on 8.10 and compiled an old ffmpeg version like this, assuming you compile everything under /home/myname/software.

1. To build xvidcore, get xvidcore-1.1.2 and extract it to /home/myname/software/

cd /home/myname/software
cd xvidcore-1.1.2/build/generic
./configure
make

2. Build a static executable of an “old” ffmpeg version by checking out the version from 2008-02-06:

cd /home/myname/software
svn checkout -r {2008-02-06} svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
cd ffmpeg
./configure --enable-gpl --enable-nonfree --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-x11grab --enable-libxvid --extra-libs=/home/myname/software/xvidcore-1.1.2/build/generic/=build/libxvidcore.a  --disable-shared --enable-static --extra-libs=-static --extra-cflags=--static
make

The library options are there to build a static version including the xvid codec.

Now I’ve got some compilation errors and had to fix some lines in file ffmpeg/libswscale/swscale.h (I’ve attached the file). The compilation did run through now and created a static ffmpeg. With this new “old” ffmpeg a can encode the videos again for the D2 with the command mentioned above.

I’ve also attached my static version. It can be executed on it’s own from any directory.

Back to top