Re-encoding media for the N95 |
[Jul. 9th, 2007|10:18 pm]
Nick
|
Since the Nokia N95 does have a very nice, 320x240 colour screen, I thought it might provide a good opportunity to watch some of my media on the go. For example, I'm currently watching my way through my Roswell High DVD box sets, but progress is limited to when I have 45 minutes to sit in front of the TV, or have my laptop + spare time + the dvds. I figured having the episodes on the N95 could help out here :)
After a bit of googling, a found a really good post on the S60 blog on using ffmpeg to transcode. This appeared to offer everything I was after, so I had a try.
I initially had a bit of faff getting versions of ffmpeg and faad2/faac that played nicely together, but after discovering debian-multimedia.org, all was sorted. I then discovered that my newer ffmpeg took the audio bitrate in bps, not kbps (as with the version in the blog post), which did confuse me at first. With all that worked out, I was then ready to produce half a dozen different versions of one episode to test with.
On the audio front, I found the suggest bitrate of 64kbps AAC to low. With bud earphones, I couldn't hear the difference between the original and the re-encoded with my test file at 96kbps, and at 112kbps for my nice headphones. So, I think I'll probably go with 96kbps (-ab 96000).
On the video front, I found that dropping the framerate did have a surprisingly big effect on watchability, so I opted to leave it un-changed. I couldn't really see the difference between 350kbps and 400kbps on the video when at 320x180 pixels, so I've opted for the lower one for now. YMMV
So, for now, the command I'm using to re-encode with is: ffmpeg -i <input.mpg> -f mp4 -vcodec mpeg4 -b 350000 -s 320x180 -acodec aac -ar 48000 -ab 96000 -ac 2 <output.mp4>
Update: I've written a wrapper shell script, which uses mplayer to figure out the appropriate resolution. You can download it from here |
|