Rockbox Technical Forums

Rockbox Development => Feature Ideas => Topic started by: dangerousd777 on January 25, 2009, 08:09:48 PM

Title: [Feature Suggestion] Recording to WMA or some other format.
Post by: dangerousd777 on January 25, 2009, 08:09:48 PM
MP3 sounds good at 128, WMA is fine at about 64-96, WMA is the same or less CPU intensive as well to encode and less to decode and render.

The reasons for this are pretty simple, so I don't have to explain, I'd just like more time to record in case I only had like 300 MB left if I jammed a lot of music on my Sansa e260.

Besides that the options for recording are absolutely EXCEPTIONAL... and so is everything else. (I especially like the bitrate options and the volume gain) and Keep it up  ;D
Title: Re: [Feature Suggestion] Recording to WMA or some other format.
Post by: Llorean on January 25, 2009, 09:21:52 PM
WMA is the same or less CPU intensive as well to encode and less to decode and render.

The reasons for this are pretty simple, so I don't have to explain

I think evidence suggests at least that it's quite clear WMA takes more CPU to decode than MP3 does. Rather than saying "the reasons are pretty simple" you might want to show something that explains why the direct, measurable, quantifiable evidence is wrong.

Also, you suggest "or some other format" but don't actually seem to have suggested any other formats, just WMA which is measurably inferior in one of the areas you seek to improve and impossible to compare in the other at this time (unless you happen to have on-hand a fixed-point WMA encoder you're already testing on Rockbox).
Title: Re: [Feature Suggestion] Recording to Ogg Vorbis perhaps???
Post by: dangerousd777 on February 02, 2009, 10:08:06 PM
It would be interesting if it was easy to add your own codecs to Rockbox for testing purposes, I'm sure there's ways but I'm not much of a software developer/tester, or programmer or anything else.

Even Vorbis is less CPU intensive than WMA according to that chart, and the compression is EVEN BETTER. AoTuv Lancer Ogg Vorbis is much much faster on SSE 2 CPUs (Ogg Vorbis and WMA I get about 13x real-time encoding speed on my P4 w/ HT 3.2 Oc'd to 4 Ghz, and with AoTuv Lancer I get 53x real time).

The CPUs for Mp3 and Mp4 players don't have SSE or SSE2 however.

Regular WMA sounds good down only to 96, Ogg Vorbis sounds good even down to about 32-48 average, therefore that would probably beat WMA 96 encoding according to that chart and the trend. It'd only be a decrease of about 5-7 mhz.

Does this sound reasonable? Or is it another longshot???

Does RockBox automatically clock the CPU when recording and encoding?
How much does Mp3 take to encode?

Could Ogg Vorbis be the next one? And considering it's free and non-proprietary and the source is freely available, that's also a plus.
Title: Re: [Feature Suggestion] Recording to WMA or some other format.
Post by: safetydan on February 02, 2009, 10:21:33 PM
I don't believe there's a fixed-point encoder for Ogg Vorbis available. That pretty much kills any chance of getting Ogg Vorbis as a recording format.

Also, be careful looking at encoding speeds on PC. The CPUs used on Rockbox targets are very different and sometimes much simplified from a typical PC CPUs. This can lead to different relative performance than you might expect.
Title: Re: [Feature Suggestion] Recording to Ogg Vorbis perhaps???
Post by: saratoga on February 02, 2009, 10:34:21 PM
It would be interesting if it was easy to add your own codecs to Rockbox for testing purposes, I'm sure there's ways but I'm not much of a software developer/tester, or programmer or anything else.

Its not that difficult compared to actually writing them.

Even Vorbis is less CPU intensive than WMA according to that chart,

Which chart?
Title: Re: [Feature Suggestion] Recording to Ogg Vorbis: Extra Info
Post by: dangerousd777 on February 04, 2009, 12:10:40 AM
It would be interesting if it was easy to add your own codecs to Rockbox for testing purposes, I'm sure there's ways but I'm not much of a software developer/tester, or programmer or anything else.

Its not that difficult compared to actually writing them.

Even Vorbis is less CPU intensive than WMA according to that chart,

Which chart?

Writing them would surely be difficult. What does it take to add a codec to Rockbox?

There may not be a fixed point encoder but there are just various encoders some of which are open-source such as LibravCodec, FFMpeg and MEncoder.

In http://www.hydrogenaudio.org/forums/lofiversion/index.php/t48790.html user HotShotGG says "Not yet, [there is no fixed Ogg Vorbis encoder that I know of.] It is possible just by looking at the code. It can be done."

In http://www.hydrogenaudio.org/forums/lofiversion/index.php/t48898.html user Gabriel states "This encoder is small enough to be converted to fixed point. If going this way, it would be a huge progress for Vorbis, and a quite interesting thing."

The Codec Performance Comparison chart in the Rockbox TWiki that you posted the link to, I took a quick glance at the Sansa e260s stats and even Ogg Vorbis beats out WMA.

If someone COULD create a fixed point encoder somehow for Rockbox, it would be superb. It would save plenty of space and would be higher quality than Mp3 when recording from Mic or FM radio.

It seems plausible, but perhaps too difficult. The encoding differences, well then I'm not sure unless I could test out my Sansa for those kind of things, but I can't access the Debug menu to View buffering thread (To see CPU usage and such) while recording, or maybe I can but I'm just not aware of the method yet.

I'd like to see either WMA or Ogg Vorbis implemented, but if not then I'll have to deal with Mp3.
Title: Re: [Feature Suggestion] Recording to WMA or some other format.
Post by: AlexP on February 04, 2009, 04:17:44 AM
decoding speed != encoding speed

Yes, converting to fixed point is a very big job.  I doubt many people would bother as you can already either record to MP3, or record to wavpack (lossless) then compress later.  Still if someone did, it would of course be welcomed.

I'd like to see either WMA or Ogg Vorbis implemented, but if not then I'll have to deal with Mp3.

Best get coding then!
Title: Re: [Feature Suggestion] Recording to Ogg Vorbis: Extra Info
Post by: saratoga on February 04, 2009, 09:24:25 AM
The Codec Performance Comparison chart in the Rockbox TWiki that you posted the link to, I took a quick glance at the Sansa e260s stats and even Ogg Vorbis beats out WMA.

Testing WMA now, I get about 265% real time on the Sansa.  Looking at that page, the only numbers for WMA are from 18 months ago right after I added it to Rockbox. 
Title: Re: [Feature Suggestion] Recording to Ogg Vorbis: Extra Info
Post by: dangerousd777 on February 04, 2009, 10:44:15 PM
The Codec Performance Comparison chart in the Rockbox TWiki that you posted the link to, I took a quick glance at the Sansa e260s stats and even Ogg Vorbis beats out WMA.

Testing WMA now, I get about 265% real time on the Sansa.  Looking at that page, the only numbers for WMA are from 18 months ago right after I added it to Rockbox. 


Damn that's pretty fast. I've noticed that there have been huge improvements to the decoders over time for different ports. How well do Mp3 and Vorbis decode now in the later/latest version(s)?

decoding speed != encoding speed

Yes, converting to fixed point is a very big job.  I doubt many people would bother as you can already either record to MP3, or record to wavpack (lossless) then compress later.  Still if someone did, it would of course be welcomed.

I'd like to see either WMA or Ogg Vorbis implemented, but if not then I'll have to deal with Mp3.

Best get coding then!

So is encoding speed is similar to decoding speed? Or is one a bit more than the other.

I don't think there are fixed-point encoders for WMA and Ogg Vorbis, but my friend Lainlives may know of something or may be able to code them... that is if he has interest in it. He has Rockbox on his PSP so he might have some interest.  :P

While most people would just encode them on PC, if you have them already encoded in Rockbox they're perfectly prepared, and you could record for much longer at lower bitrates without seeming to lose quality (Ogg Vorbis has an excellent psychoacoustic model.)

I think from the Sansa e200 microphone that Lossless WAV and Lossless/Lossy hybrid such as WAVPack aren't that necessary. I mean your only encoding to monaural and at 22,050 samples per second (I never really understood why it's only monaural and not stereophonic and the sampling frequency is limited to ONLY 22,050 but nothing lower and nothing higher. Maybe it has something to do with hardware limitations  ???)
For that Mp3 128-144 to even 160 should be good enough.

Note: I figure I could always resample the sample frequency, encode to whichever format of my preference and change from mono to stereo. I'm still interested in this subject however, much more feasible than the video formats, seeing as those would be restricted by hardware limitations such as available computational power of the Sansa e200.
Title: Re: [Feature Suggestion] Recording to WMA or some other format.
Post by: evilnick on February 05, 2009, 09:51:30 AM
Quote
Note: I figure I could always resample the sample frequency, encode to whichever format of my preference and change from mono to stereo. I'm still interested in this subject however, much more feasible than the video formats, seeing as those would be restricted by hardware limitations such as available computational power of the Sansa e200.

You could, but this wouldn't magically make the sound any higher fidelity, it'd be exactly the same but take up more filesize.
Title: Re: [Feature Suggestion] Recording to WMA or some other format.
Post by: dangerousd777 on February 05, 2009, 11:13:28 PM
Quote
Note: I figure I could always resample the sample frequency, encode to whichever format of my preference and change from mono to stereo. I'm still interested in this subject however, much more feasible than the video formats, seeing as those would be restricted by hardware limitations such as available computational power of the Sansa e200.

You could, but this wouldn't magically make the sound any higher fidelity, it'd be exactly the same but take up more filesize.

Well I did resample one 22050 hz file (it was music) and it did sound a bit better afterwards.
True there isn't much of a point.
Title: Re: [Feature Suggestion] Recording to WMA or some other format.
Post by: AlexP on February 06, 2009, 06:52:13 AM
Quote
Note: I figure I could always resample the sample frequency, encode to whichever format of my preference and change from mono to stereo. I'm still interested in this subject however, much more feasible than the video formats, seeing as those would be restricted by hardware limitations such as available computational power of the Sansa e200.

You could, but this wouldn't magically make the sound any higher fidelity, it'd be exactly the same but take up more filesize.

Well I did resample one 22050 hz file (it was music) and it did sound a bit better afterwards.
True there isn't much of a point.

Placebo
Title: Re: [Feature Suggestion] Recording to WMA or some other format.
Post by: evilnick on February 06, 2009, 10:16:01 AM
How could you tell which band it was?  ;D
Title: Re: [Feature Suggestion] Recording to WMA or some other format.
Post by: AlexP on February 06, 2009, 04:19:55 PM
Hehe, alright smart arse - "placebo effect" :)
Title: Re: [Feature Suggestion] Recording to WMA or some other format.
Post by: soap on February 06, 2009, 05:34:37 PM
http://en.wikipedia.org/wiki/Placebo_Effect_(band)
Title: Re: [Feature Suggestion] Recording to WMA or some other format.
Post by: AlexP on February 06, 2009, 05:48:26 PM
Dammit people, I'm not talking about bands! :)
Title: Re: [Feature Suggestion] Recording to WMA or some other format.
Post by: dangerousd777 on February 07, 2009, 12:33:16 PM
The mention of that though is a bit off-topic.

Are there any other good formats that have a fixed-point encoder that can be made available for Rockbox?
Title: Re: [Feature Suggestion] Recording to WMA or some other format.
Post by: bluebrother on February 07, 2009, 06:43:51 PM
wavpack, mp3, wav :)
Title: Re: [Feature Suggestion] Recording to WMA or some other format.
Post by: AlexP on February 09, 2009, 03:28:20 AM
The mention of that though is a bit off-topic.

No it isn't - you claim that changing the sample rate of an already recorded piece of music makes it sound better - it doesn't.  If you think you can hear a difference then you are suffering from the placebo effect (OK, so the bands were a bit off-topic).
Title: Re: [Feature Suggestion] Recording to WMA or some other format.
Post by: dangerousd777 on February 09, 2009, 10:30:29 PM
The mention of that though is a bit off-topic.

No it isn't - you claim that changing the sample rate of an already recorded piece of music makes it sound better - it doesn't.  If you think you can hear a difference then you are suffering from the placebo effect (OK, so the bands where a bit off-topic).

lol. You make it sound like a disease or something.
Besides placebo effect and all that, is there anything that can be done?
Title: Re: [Feature Suggestion] Recording to WMA or some other format.
Post by: AlexP on February 10, 2009, 06:20:54 AM
Besides placebo effect and all that, is there anything that can be done?

About what?
Title: Re: [Feature Suggestion] Recording to WMA or some other format.
Post by: dangerousd777 on February 10, 2009, 07:50:47 PM
Well about the topic of this thread, the formats.

Any format besides the ones already there that have fixed point encoders?
Title: Re: [Feature Suggestion] Recording to WMA or some other format.
Post by: Llorean on February 10, 2009, 07:55:23 PM
Honestly, if quality matters you should generally just record wavpack and then transcode on the PC. A realtime encoder on one of these players is never going to be able to have the same optimizations as a PC-side one because they're so much slower. Instead most lossy encoders are going to lean in favour of speed so that they'll never be too slow and lose data. So just free up enough space to encode losslessly and you're alright.
Title: Re: [Feature Suggestion] Recording to WMA or some other format.
Post by: AlexP on February 11, 2009, 03:21:05 AM
Besides what Llorean says:

Any format besides the ones already there that have fixed point encoders?

www.google.com