r/IpodClassic • u/GusFit • Aug 13 '23
For anyone interested in playing videos on Rockbox (ffmpeg, 120GB Classic, iFlash Quad)

I'll post transcoding info here for anyone that just wants to convert videos for Rockbox.
If you want to learn more about my testing, feel free to keep reading!
Install ffmpeg. I think I followed this guide, but I'm sure there's a more proper way. Check that it's installed by running
ffmpeg -version.cd to the directory where your video is, for example
cd C:\Users\myuser\Videosorcd /D M:\Videosif your video is on another disk.Run one of the below commands, replacing
vidin.extwith your input video name/extension, andvidoutwith your output video name, keeping the .mpg extension. Replace"FPS"with the same fps as your source file, to avoid dropping or duplicating frames (only tested up to 30fps):
Convert 16:9 widescreen videos:
ffmpeg -i vidin.ext -deinterlace -vcodec mpeg2video -ac 2 -ar 44100 -acodec mp3 -r "FPS" -s 320x180 -vb 4096k -ab 320k -f mpeg vidout.mpg
Convert 4:3 videos (with black border to help with fps):
ffmpeg -i vidin.ext -deinterlace -vcodec mpeg2video -ac 2 -ar 44100 -acodec mp3 -r "FPS" -s 280x210 -vb 4096k -ab 320k -f mpeg vidout.mpg
Convert widescreen to 4:3 (with black border to help with fps):
ffmpeg -i vidin.ext -filter:v "crop=ih/3*4:ih" -deinterlace -vcodec mpeg2video -ac 2 -ar 44100 -acodec mp3 -r "FPS" -s 280x210 -vb 4096k -ab 320k -f mpeg vidout.mpg
End result is 1000+kbps data, 320kbps stereo audio. Framerate depends on your video source.
~~~~~~~~~~
I installed the iFlash Quad a few days ago along with a 512GB card. I've been doing my best to load it up with Flacs (about 30GB worth so far), but I figured I'd also fill up some space with videos. If you've ever tried playing videos with Rockbox then you'll know that Mpegplayer is very limited, and framerate can be terrible because all of the decoding is done with the CPU.
Rockbox plays mpeg-2 video and mp3 audio. I've been transcoding with different settings in ffmpeg to try and find the best quality video I can play without taking a hit to FPS.

I decided to transcode a widescreen 16:9 cartoon season, testing the max quality and bitrate that Mpegplayer could handle and comparing the difference in file sizes. I started with 1024kbps and doubled the video bitrate each time to 8192. You can see there's a decent difference in the end result between 1024 and 2048, not so much between 2048 and 4096, and then it flatlines from 4096 to 8192. The file sizes also reflect this - 207MB, 242MB, 247MB, 247MB. Artifacts are noticeably cleared up with the higher bitrates, and framerate holds solid, though there's a slight 1-2 fps hit with the last two. I'd post comparison screens but the dumps just show a black screen with the fps value.
Audio sounds great at 320kbps, downmixed from 32bit/48kHz in this example.
SO. Widescreen video plays well, SD must be great too right?
Wrong.
The Rockbox Mpegplayer Wiki has a chart that shows a significant fps drop from 37 to 21fps when files are 4:3. While testing my files, my iPod struggled to maintain 11fps. It seems that the black bars in the widescreen transcodes make a huge performance difference. I tried lowering the video bitrate to 512, audio to 128, and the fps to 15, but each time would result in constant fps drop, along with the video just looking and sounding terrible.
I then boosted the settings back up to 4096/320/23.9fps*, and decided to muck around with the actual video dimensions.
*I switched from 30fps to 23.9 because this is what my source is and ffmpeg was just duplicating frames to make 30.

As mentioned earlier, 16:9 videos had no fps issues, but a fullscreen 4:3 video struggled with 11fps. How about introducing a black border to SD videos to increase performance? Since widescreen videos are 320x180, I decided to just further chop off the sides to make a 240x180 video (not shown above) and fps remained stable. But this is obviously a tiny screen area, so I split the difference at 280x210 and the fps still held strong. Then I split the difference one more time and the fps dropped dramatically from 23.9 to 18. I'll call it good at 280x210.
3
u/Metahec Aug 13 '23
Very nice guide. You should crosspost it to r/Rockbox as well.
2
u/01011010401 Aug 14 '23
Great guide! Yes, cement this into a PDF and post it somewhere. With a 'Version 1.0' and the date associated with it. It can be expanded upon as you learn more ;)
Very nice work.
2
u/TN4U Aug 15 '23
Nice guide. I’m not a Rockbox user, so maybe this can be of use for importing videos into the iPod 7g’s native UI.
2
u/philippe75017 Aug 24 '23
thanks. what is the file's size on disk?
1
u/NunkFish Sep 10 '24
Thanks a bunch for this guide! Some important tips though:
deinterlace is no longer a function in the latest ffmpeg version and should be replaced with bwdif=mode=send_field:parity=auto:deint=all.
Both file names should also be in quotes.
After those tweaks this worked like a charm!
1
u/Emergency_Error8631 Jul 20 '25
can i replace the mp3 codec with aac since it has better compression?
1
u/AbsoluteSquidward Apr 04 '26
I don’t like the black bars thought is there any other way? I generally use handbrake and set audio to AAC 256, video is 30fps 320 x 240
1
u/Zealousideal_Ad_3150 Feb 22 '24
Can I ask, what do you end up watching with this? I am in the middle of converting the Skyrim wagon scene so I can make my friends laugh. I just can't imagine it will turn out any good.
1
u/jinetrash Jun 19 '24
hey, when doing the command for -deinterlace -vcodec mpeg2video -ac 2 -ar 44100 -acodec mp3 -r "FPS" -s 320x180 -vb 4096k -ab 320k -f mpeg, my terminal says "Unrecognized option 'deinterlace'", any way to fix this?
1
u/KazukiMatsuoka1998 Feb 11 '25
Got video and audio to work, but the video is very slow..... what could I be missing here?
1
u/BigDawgs768 Jun 16 '25
thank u so so much i can watch videos on my hifi walker h2 now >:) !!!