Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
translations translations
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Welcome to the Rockbox Technical Forums!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Audio Playback, Database and Playlists
| | |-+  Looking for the most efficient (easiest to decode) format for iPod 5
« previous next »
  • Print
Pages: [1] 2

Author Topic: Looking for the most efficient (easiest to decode) format for iPod 5  (Read 3313 times)

Offline K4sum1

  • Member
  • *
  • Posts: 24
    • Eclipse
Looking for the most efficient (easiest to decode) format for iPod 5
« on: June 20, 2022, 10:21:24 AM »
I'm thinking of using my iPod Video 5 again, and I'm wondering what would be the most efficient codec to use for it would be. With MP3, I've had issues with some equalizers, so I want to try something else, but I don't know what to use. I don't want an uncompressed codec, but any lossy codec with decent quality would be fine.
Logged

Offline K4sum1

  • Member
  • *
  • Posts: 24
    • Eclipse
Re: Looking for the most efficient (easiest to decode) format for iPod 5
« Reply #1 on: June 23, 2022, 12:53:25 PM »
So I found this page, which was buried in the manual, it appears that FLAC is the best (probably .wav if it got tested). For compressed stuffs, MP3s are best. Tests are a little old though, but I can't be bothered to compile a build of Rockbox.
Logged

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 9376
Re: Looking for the most efficient (easiest to decode) format for iPod 5
« Reply #2 on: June 23, 2022, 10:29:14 PM »
There was some minor optimization after that, but you won't get compression for much less than 10-20 MHz, which is only about 110-220 CPU cycles per output sample on a CPU that can fetch an instruction or fetch data (but not both) once per cycle. 

If possible, optimize your EQ usage.  Each EQ band will consume several MHz of CPU time, so pick your bands optimally to avoid using too much CPU time.
Logged

Offline K4sum1

  • Member
  • *
  • Posts: 24
    • Eclipse
Re: Looking for the most efficient (easiest to decode) format for iPod 5
« Reply #3 on: June 23, 2022, 11:05:23 PM »
Well, I don't use a normal EQ, I use the perceptual bass enhancement option.
Logged

Offline gevaerts

  • Developer
  • Member
  • *
  • Posts: 1077
Re: Looking for the most efficient (easiest to decode) format for iPod 5
« Reply #4 on: June 24, 2022, 05:04:15 AM »
Assuming efficiency is about battery runtime (and not some half-philosophical things that don't have any real-world impact), there may be some other things to take into account than purely decoder CPU usage.

Especially if you're on rotating disks lossless codecs will probably result in lower runtime, because the files are a lot bigger and therefore the disk needs to spin up a lot more often, which uses a *lot* of power.

If you use one of the various flash options, I think it's still worth testing. With "pure" flash the effect probably won't be noticeable (which is why modern flash-based players can get away with much less RAM and still get good runtimes), but with the various ATA to whatever adapters I'm not sure. I'd recommend just encoding some audio of your choice (more than 32MB or 64MB, depending on your specific ipod. I'd just go for 100MB or so) in both FLAC and mp3 (or your lossy codec of choice), set things up to play in a loop, and see how long the battery lasts with both of those. See https://www.rockbox.org/wiki/PluginBatteryBenchmark for one way to make that sort of test easier.
Logged

Offline K4sum1

  • Member
  • *
  • Posts: 24
    • Eclipse
Re: Looking for the most efficient (easiest to decode) format for iPod 5
« Reply #5 on: June 24, 2022, 08:55:31 AM »
Lazy
Logged

Offline mookee

  • Member
  • *
  • Posts: 36
Re: Looking for the most efficient (easiest to decode) format for iPod 5
« Reply #6 on: October 07, 2022, 10:16:39 AM »
well wav aka pcm should be the purest form of audio files, isnt it!?

but its huge cause uncompressed.

i have a funny tiny phone with a poor dac but a headphone out. mp3 sounds terrible but if i use wav it seems to be much better..
Logged

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 9376
Re: Looking for the most efficient (easiest to decode) format for iPod 5
« Reply #7 on: October 07, 2022, 12:09:52 PM »
Quote from: mookee on October 07, 2022, 10:16:39 AM
well wav aka pcm should be the purest form of audio files, isnt it!?

but its huge cause uncompressed.


FLAC is more efficient since you don't waste tons of energy loading the uncompressed samples from disk. 
Logged

Offline K4sum1

  • Member
  • *
  • Posts: 24
    • Eclipse
Re: Looking for the most efficient (easiest to decode) format for iPod 5
« Reply #8 on: October 07, 2022, 06:46:59 PM »
Quote from: saratoga on October 07, 2022, 12:09:52 PM
FLAC is more efficient since you don't waste tons of energy loading the uncompressed samples from disk. 
What about if a SD is used as the disk?
Logged

Offline K4sum1

  • Member
  • *
  • Posts: 24
    • Eclipse
Re: Looking for the most efficient (easiest to decode) format for iPod 5
« Reply #9 on: May 14, 2025, 10:45:52 AM »
I stopped being lazy and compiled Rockbox with the test plugin, and twice now my iPod has just shut off in the middle of the test writing nothing to the log. Anyone know what could cause this?
Logged

Offline rockbox_dev123

  • Member
  • *
  • Posts: 169
Re: Looking for the most efficient (easiest to decode) format for iPod 5
« Reply #10 on: May 14, 2025, 12:31:31 PM »
I recommend using 128 kbps Vorbis as It's almost identical to Opus at this bitrate but Rockbox uses less CPU to decode. You also obviously get to save on disk space. Depending on the size of your disks and music library you can probably increase the bitrate. But it's pretty transparent sounding to me.
Logged

Offline K4sum1

  • Member
  • *
  • Posts: 24
    • Eclipse
Re: Looking for the most efficient (easiest to decode) format for iPod 5
« Reply #11 on: May 14, 2025, 02:25:48 PM »
I plugged in the device to the wall and it completed the codec test, but froze at the end. None of the buttons did anything, so I decided to try plugging it into my computer to get the output .txt, where my iPod kernel panicked and the .txt is again 0kb
Logged

Offline K4sum1

  • Member
  • *
  • Posts: 24
    • Eclipse
Re: Looking for the most efficient (easiest to decode) format for iPod 5
« Reply #12 on: May 14, 2025, 06:34:35 PM »
Ok I finally have the results from testing and here's the results with latest build as of 2025/05/14

Quote
| *AC3 (A52)*  ||||
| a52_stereo_192.ac3 | 395.86% realtime | Decode time - 44.46s | 20.20MHz |
| *Monkey Audio*  ||||
| ape_c1000.ape | 176.16% realtime | Decode time - 99.85s | 45.41MHz |
| ape_c2000.ape | 112.41% realtime | Decode time - 156.47s | 71.16MHz |
| ape_c3000.ape | 69.79% realtime | Decode time - 252.02s | 114.62MHz |
| ape_c4000.ape | 23.79% realtime | Decode time - 739.21s | 336.27MHz |
| ape_c5000.ape | 2.69% realtime | Decode time - 6537.18s | 2973.97MHz |
| *AAC-LC*  ||||
| applelossless.m4a | 198.19% realtime | Decode time - 88.75s | 40.36MHz |
| *Atrac3*  ||||
| atrac3_lp2_132.oma | 149.44% realtime | Decode time - 118.01s | 53.53MHz |
| *Cook (RA)*  ||||
| cook_mono_32.ra | 640.80% realtime | Decode time - 27.45s | 12.48MHz |
| cook_mono_64.ra | 568.88% realtime | Decode time - 30.92s | 14.06MHz |
| cook_stereo_32.ra | 627.76% realtime | Decode time - 28.02s | 12.74MHz |
| cook_stereo_64.ra | 299.40% realtime | Decode time - 58.75s | 26.72MHz |
| cook_stereo_96.ra | 289.21% realtime | Decode time - 60.82s | 27.66MHz |
| *FLAC*  ||||
| flac_5.flac | 684.96% realtime | Decode time - 25.68s | 11.67MHz |
| flac_8.flac | 642.90% realtime | Decode time - 27.36s | 12.44MHz |
| *MP3*  ||||
| lame_096.mp3 | 519.36% realtime | Decode time - 33.88s | 15.40MHz |
| lame_128.mp3 | 399.00% realtime | Decode time - 44.10s | 20.05MHz |
| lame_192.mp3 | 391.02% realtime | Decode time - 45.00s | 20.45MHz |
| lame_256.mp3 | 386.21% realtime | Decode time - 45.56s | 20.71MHz |
| lame_320.mp3 | 367.96% realtime | Decode time - 47.82s | 21.74MHz |
| *Musepack*  ||||
| mpc_096.mpc | 389.24% realtime | Decode time - 45.19s | 20.55MHz |
| mpc_128.mpc | 367.37% realtime | Decode time - 47.88s | 21.77MHz |
| mpc_170.mpc | 360.82% realtime | Decode time - 48.75s | 22.17MHz |
| mpc_224.mpc | 353.21% realtime | Decode time - 49.80s | 22.64MHz |
| mpc_300.mpc | 347.42% realtime | Decode time - 50.63s | 23.02MHz |
| mpc_350.mpc | 340.56% realtime | Decode time - 51.65s | 23.49MHz |
| *AAC-LC*  ||||
| nero_096.m4a | 283.71% realtime | Decode time - 62.02s | 28.19MHz |
| nero_128.m4a | 270.74% realtime | Decode time - 64.99s | 29.54MHz |
| nero_192.m4a | 254.09% realtime | Decode time - 69.25s | 31.48MHz |
| nero_256.m4a | 240.74% realtime | Decode time - 73.09s | 33.23MHz |
| nero_320.m4a | 227.42% realtime | Decode time - 77.37s | 35.17MHz |
| nero_400.m4a | 218.42% realtime | Decode time - 80.56s | 36.62MHz |
| *Nero AAC-HE (SBR)*  ||||
| nero_he_64.m4a | 532.87% realtime | Decode time - 33.03s | 15.01MHz |
| *Nero AAC-HEv2 (SBR+PS)*  ||||
| nero_hev2_64.m4a | 974.69% realtime | Decode time - 18.06s | 8.20MHz |
| *Opus*  ||||
| opus_128k.opus | 138.31% realtime | Decode time - 127.18s | 57.84MHz |
| opus_192k.opus | 125.31% realtime | Decode time - 140.37s | 63.84MHz |
| opus_256k.opus | 118.16% realtime | Decode time - 148.87s | 67.70MHz |
| opus_32k.opus | 204.04% realtime | Decode time - 86.21s | 39.20MHz |
| opus_64k_20ms.opus | 161.23% realtime | Decode time - 109.10s | 49.61MHz |
| opus_64k_5ms.opus | 113.97% realtime | Decode time - 154.34s | 70.19MHz |
| *MP1*  ||||
| pegase_l1_192.mp1 | 420.00% realtime | Decode time - 41.88s | 19.04MHz |
| pegase_l1_256.mp1 | 414.17% realtime | Decode time - 42.47s | 19.31MHz |
| pegase_l1_352.mp1 | 412.04% realtime | Decode time - 42.69s | 19.41MHz |
| pegase_l1_448.mp1 | 410.69% realtime | Decode time - 42.83s | 19.47MHz |
| *MP2*  ||||
| pegase_l2_128.mp2 | 423.34% realtime | Decode time - 41.55s | 18.89MHz |
| pegase_l2_192.mp2 | 412.91% realtime | Decode time - 42.60s | 19.37MHz |
| pegase_l2_256.mp2 | 411.94% realtime | Decode time - 42.70s | 19.42MHz |
| pegase_l2_384.mp2 | 413.29% realtime | Decode time - 42.56s | 19.35MHz |
| *True Audio*  ||||
| true_audio.tta | 184.30% realtime | Decode time - 94.95s | 43.40MHz |
| *Vorbis*  ||||
| vorbis_096.ogg | 372.11% realtime | Decode time - 47.27s | 21.49MHz |
| vorbis_128.ogg | 359.05% realtime | Decode time - 48.99s | 22.28MHz |
| vorbis_192.ogg | 332.51% realtime | Decode time - 52.90s | 24.05MHz |
| vorbis_256.ogg | 305.43% realtime | Decode time - 57.59s | 26.19MHz |
| vorbis_350.ogg | 277.92% realtime | Decode time - 63.29s | 28.78MHz |
| vorbis_500.ogg | 252.40% realtime | Decode time - 69.69s | 31.69MHz |
| *WMA Standard*  ||||
| wma_128.wma | 347.76% realtime | Decode time - 51.04s | 23.00MHz |
| wma_192.wma | 332.89% realtime | Decode time - 53.32s | 24.03MHz |
| wma_256.wma | 320.68% realtime | Decode time - 55.35s | 24.94MHz |
| wma_320.wma | 311.23% realtime | Decode time - 57.03s | 25.70MHz |
| wma_96.wma | 356.06% realtime | Decode time - 49.85s | 22.46MHz |
| *WMA Professional*  ||||
| wmapro_141k.wma | 303.13% realtime | Decode time - 59.03s | 26.39MHz |
| wmapro_173k.wma | 293.39% realtime | Decode time - 60.99s | 27.26MHz |
| wmapro_271k.wma | 267.87% realtime | Decode time - 66.80s | 29.86MHz |
| wmapro_55k.wma | 337.81% realtime | Decode time - 52.97s | 23.68MHz |
| wmapro_80k.wma | 323.69% realtime | Decode time - 55.28s | 24.71MHz |
| *WAVPACK*  ||||
| wv_fastx3.wv | 327.92% realtime | Decode time - 53.64s | 24.39MHz |
| wv_normx4.wv | 267.16% realtime | Decode time - 65.84s | 29.94MHz |

I'd add it to the wiki but idk how lol.

It's interesting everything is generally an improvement over the last benchmarks except FLAC is a very slight regression.

I wanted to see how perceptual bass enhancement affects the results, but enabling it doesn't change the results here when I know it takes a lot of resources in real playback because it causes MP3 files to lag last time I tried it.

Quote from: rockbox_dev123 on May 14, 2025, 12:31:31 PM
I recommend using 128 kbps Vorbis as It's almost identical to Opus at this bitrate but Rockbox uses less CPU to decode. You also obviously get to save on disk space. Depending on the size of your disks and music library you can probably increase the bitrate. But it's pretty transparent sounding to me.

Maybe 128 Vorbis would be good for disk space, but it's slightly heavier than 320 MP3, which eh I have big SD card. Although you say almost identical to Opus? I always heard Opus was a pretty massive leap, but is that only in lower bitrates then? Could you link something that would show this? Maybe it would be good to have a 128 Vorbis version of my music library for my phone and other devices where I'd be using Bluetooth or whatever anyways.
Logged

Offline speachy

  • Administrator
  • Member
  • *
  • Posts: 673
Re: Looking for the most efficient (easiest to decode) format for iPod 5
« Reply #13 on: May 14, 2025, 09:45:52 PM »
Quote from: K4sum1 on May 14, 2025, 06:34:35 PM
Maybe 128 Vorbis would be good for disk space, but it's slightly heavier than 320 MP3, which eh I have big SD card. Although you say almost identical to Opus? I always heard Opus was a pretty massive leap, but is that only in lower bitrates then? Could you link something that would show this? Maybe it would be good to have a 128 Vorbis version of my music library for my phone and other devices where I'd be using Bluetooth or whatever anyways.

Yes, 128K vorbis is more expensive to decode than 320K mp3, but that 320K mp3 will wake up the storage device nearly 3x as often.  With SSD swaps that's less expensive than before, but even when only reading a uSD card will be in the 100-200mW range.  By comparison, one of the ipod5g's CPU cores running at max speed only uses about 20mW in comparison.

Meanwhile, Opus, like most relatively modern codecs (eg AAC), really shines at lower bitrates.  However, by the time you hit about 128Kbps they all perform fairly similarly.

(See: https://opus-codec.org/comparison/ -- and keep in mind that that comparison is well over a decade old!)

It's worth considering that even at very high bitrates (eg 320Kbps) mp3 will fare _worse_ than Opus (or even AAC) at 128K due to inherent limitations of the codec design... and given the relatively noisy analog output path of these ipods (it is a 20-year-old design, after all) I seriously question if you're going to be able to hear any difference.
Logged

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 9376
Re: Looking for the most efficient (easiest to decode) format for iPod 5
« Reply #14 on: May 15, 2025, 08:00:51 AM »
Those opus benchmarks are a reminder that I really need to optimize the non-power-of-2 FFT. Been on my to-do list for 12 years now.
Logged

  • Print
Pages: [1] 2
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Audio Playback, Database and Playlists
| | |-+  Looking for the most efficient (easiest to decode) format for iPod 5
 

  • SMF 2.0.19 | SMF © 2021, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.073 seconds with 17 queries.