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
Search



Donate

Rockbox Technical Forums


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

Thank You for your continued support and contributions!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Recording
| | |-+  New Codec and FM Recording for iAudio and iRiver
« previous next »
  • Print
Pages: 1 2 [3] 4 5

Author Topic: New Codec and FM Recording for iAudio and iRiver  (Read 34895 times)

Offline jhMikeS

  • Developer
  • Member
  • *
  • Posts: 242
Re: New Codec and FM Recording for iAudio and iRiver
« Reply #30 on: September 01, 2006, 05:01:07 PM »
Actually it really doesn' t sound too bad.

I need to know all the details cause I'm including sample rates/bit rates and other config options for codecs soon.

What MPEG versions does it support?

So you only have full stereo/mono? I though I saw references to joint stereo in there somewhere. What's missing for it? <== Would like to attempt.

I currently know next to nothing about writing an MP3 encoder btw but I'll do my research.

I also need to make the encoder include the correct amount of zero samples at the beginning and end of an MP3 file. It doesn't seem to do that. If I need 576 for the beginning...how many extra end frames?
Logged

Offline pabouk

  • Member
  • *
  • Posts: 387
Re: New Codec and FM Recording for iAudio and iRiver
« Reply #31 on: September 04, 2006, 05:56:22 AM »
Firstly I would like to thank you for this great addition.

Quote from: Toni on September 01, 2006, 11:57:04 AM
With MP3 recording you can expect disk access every 54min at 64kBit,MP3,Mono.
Unfortunately the disk spins up at the beginning of every recorded file i.e. when you start recording or when you split the recorded file so it is still hardly usable for recording from the internal microphone.

It would be much more useful if the disk spins up only after stopping the recording OR even after some delay after recording several files - so you can record for example several dictaphone notices without the harddrive noise.

Quote
Unfortunately mono cannot be selected right now from the recording settings menu.
Could you please implement more mono modes? - i.e.:
left channel
right channel
downmixed L+R (normal mono)
Logged

Offline AlexP

  • Global Moderator
  • Member
  • *
  • Posts: 3688
  • ex-BigBambi
Re: New Codec and FM Recording for iAudio and iRiver
« Reply #32 on: September 04, 2006, 06:07:59 AM »
It HAS to spin up as soon as the buffer is full in order to write the data to disk otherwise it would be lost.  Only a certain time period could be recorded (depending on bitrate etc) before flushing to disk.  AFAIK this is what happens now, it spins up as little as possible just to empty the buffer (not sure about at the start)
Logged
H140, F60, S120, e260, c240, Clip, Fuze v2, Connect, MP170, Meizu M3, Nano 1G, Android

Offline pabouk

  • Member
  • *
  • Posts: 387
Re: New Codec and FM Recording for iAudio and iRiver
« Reply #33 on: September 04, 2006, 06:20:12 AM »
It is clear that Rockbox has to write the buffer when it is full.

English is not my native language so excuse me for clumsily expressing my ideas. I will try it once more:

Rockbox spins up the harddrive immediately when you START recording.
(or when you split the recorded file by pressing the RECORD button)

It means that you will hear the harddrive noise at the beginning of every recorded file when you record from the internal microphone or when the external microphone picks up the noise (i.e. in a quiet room).
« Last Edit: September 04, 2006, 06:22:34 AM by pabouk »
Logged

Offline keuleJ

  • Member
  • *
  • Posts: 93
Re: New Codec and FM Recording for iAudio and iRiver
« Reply #34 on: September 04, 2006, 08:54:20 AM »
I think it's very useful to write down the finished file to disk when you split files. In case something happens, at least the finished file is completely saved.
Logged

Offline AlexP

  • Global Moderator
  • Member
  • *
  • Posts: 3688
  • ex-BigBambi
Re: New Codec and FM Recording for iAudio and iRiver
« Reply #35 on: September 04, 2006, 09:49:16 AM »
Quote from: pabouk on September 04, 2006, 06:20:12 AM
It is clear that Rockbox has to write the buffer when it is full.

I know you know!  ;)  That's why I said:

Quote from: BigBambi on September 04, 2006, 06:07:59 AM
(not sure about at the start)

I was replying to you when you said:

Quote from: pabouk on September 04, 2006, 05:56:22 AM
It would be much more useful if the disk spins up only after stopping the recording OR even after some delay after recording several files
 

I was just pointing out that it can't necessarily just spin up after stopping recording, as you may have recorded for longer than the buffer lenght at your chosen bitrate and format.

I don't know why it spins up at the start of recording.  I'm sure a recording guru (Mmmm, Petur?) can tell us!  :P
Logged
H140, F60, S120, e260, c240, Clip, Fuze v2, Connect, MP170, Meizu M3, Nano 1G, Android

Offline pabouk

  • Member
  • *
  • Posts: 387
Re: New Codec and FM Recording for iAudio and iRiver
« Reply #36 on: September 04, 2006, 10:18:09 AM »
Quote from: BigBambi on September 04, 2006, 09:49:16 AM
I was just pointing out that it can't necessarily just spin up after stopping recording, as you may have recorded for longer than the buffer lenght at your chosen bitrate and format.
OK OK ;)  I was talking mainly about short recordins which fit into the buffer (54 minutes - MP3 64 kbps mono ;D). I just did not say that. Excuse my ignorance.

Quote
I don't know why it spins up at the start of recording.  I'm sure a recording guru (Mmmm, Petur?) can tell us!  :P
Probably Rockbox determines the next available filename at that moment. But it could be done just before the first portion of the file is written or after booting Rockbox (if you want to have the filename displayed). Problem with spinning up after file splitting is not so serious but writing the split file immediately should be probably optional.
Logged

Offline AlexP

  • Global Moderator
  • Member
  • *
  • Posts: 3688
  • ex-BigBambi
Re: New Codec and FM Recording for iAudio and iRiver
« Reply #37 on: September 04, 2006, 01:50:38 PM »
Quote from: pabouk on September 04, 2006, 10:18:09 AM
Excuse my ignorance.

And my pedantry!  :D
Logged
H140, F60, S120, e260, c240, Clip, Fuze v2, Connect, MP170, Meizu M3, Nano 1G, Android

Offline jhMikeS

  • Developer
  • Member
  • *
  • Posts: 242
Re: New Codec and FM Recording for iAudio and iRiver
« Reply #38 on: September 04, 2006, 08:52:14 PM »
Several points here:

-When you start recording the codec must be loaded from disk. No choice. It is not cached and it is unloaded when you exit the screen.

-When you start a new file the file must be created and perhaps a WAV header written (not for mp3). This should be addressable once all outgoing data can be placed in the output stream and the first flush is done.

-The data is flushed and the file is synced when the current file is closed. Disk up!

-And yes, it has to spin up when < 5sec or so remain free in the buffer to write.

-Mono mode is enabled now (for a couple days actually) for you iRiver owners :) I had neglected a couple #defines that enabled the menu selection. 44.1kHz is also the only frequency menu item you should see atm.

Tips:
-Keep your hd spinning longer when recording or just leave it on...this could be a recording option.
-Don't record immediately after startup when dircache is working or you'll be doing some waiting at times. As long as other houskeeping is done, recording is quite responsive...most of the time. Data doesn't get lost though which is the important thing.
Logged

Offline pabouk

  • Member
  • *
  • Posts: 387
Re: New Codec and FM Recording for iAudio and iRiver
« Reply #39 on: September 05, 2006, 05:07:34 AM »
Quote from: MikeS on September 04, 2006, 08:52:14 PM
-When you start recording the codec must be loaded from disk. No choice. It is not cached and it is unloaded when you exit the screen.
I totally forgot about the clear implications of the new recording codec architecture :D

Unfortunately the internal microphone will be fully usable only when the hardisk will be stopped during recording until the buffer almost fills up. It would be great if there will be an option to:
a) load selected codec(s) permanently at boot of Rockbox
b) load the selected codec after entering the recording menu or immediately after selecting the codec
c) cache the lastly selected/used codec(s)

Quote
-The data is flushed and the file is synced when the current file is closed. Disk up!
When the data stream (with possibility to store file headers) is implemented it would be helpful if immediate flushing of the closed file is optional.

Quote
-Keep your hd spinning longer when recording or just leave it on...this could be a recording option.
It would help a little. The noise of the spinning drive is high although it is lower than the noise of the spinning up drive.
Logged

Offline jhMikeS

  • Developer
  • Member
  • *
  • Posts: 242
Re: New Codec and FM Recording for iAudio and iRiver
« Reply #40 on: September 05, 2006, 06:05:18 AM »
Audio cannot be played if the codecs are loaded so any loading of codecs will stop playback. Else a new buffer would be needed for codecs that would take up space all the time and leave less for everything else.

Perhaps the codec could be loaded into normal RAM at first then swapped into the codec IRAM when needed, much like what happens between voice/(playback & record). But you still need a buffer set aside for that since there's no dynamic memory allocation.

Full flushing as well as creating the new file could be delayed and full sync delayed until recording has been stopped.

Don't say anything until the HD spins down perhaps? Make it a short timeout.

Needless to say disk access should be minimized in general.
Logged

Offline pabouk

  • Member
  • *
  • Posts: 387
Re: New Codec and FM Recording for iAudio and iRiver
« Reply #41 on: September 06, 2006, 10:59:33 AM »
Probably the best compromise (i.e. without changes to the Rockbox architecture) would be to (optionaly) load the codec immediately after entering the recording menu, entering the recording screen or changing a codec.

If someone wants to use Rockbox as a "ready" recorder (s)he will activate "Show Recording Screen on Startup" option so the codec will be loaded immediately after boot.

During recording the harddisk spindown timeout should be automatically set to 0.
« Last Edit: September 11, 2006, 06:40:15 PM by pabouk »
Logged

Offline lux

  • Member
  • *
  • Posts: 1
Re: New Codec and FM Recording for iAudio and iRiver
« Reply #42 on: September 06, 2006, 08:37:59 PM »
hello, i tried to record FM radio on iriver H140 and have some notes: when recording to MP3 (i tried 160 and 320 too) there is some digital noise, like very quick pulses oh high frequencies. i tried WAV too, and sound was clear. is it problem of not good encoder or what?
Logged

Offline pabouk

  • Member
  • *
  • Posts: 387
Re: New Codec and FM Recording for iAudio and iRiver
« Reply #43 on: September 08, 2006, 08:33:32 AM »
Yesterday I encountered two crashes while recording to WavPack with the latest build. This bug was described in the tracker as #5952 already so I added my observations as a comment.
Logged

Offline mlind

  • Member
  • *
  • Posts: 179
  • Recording Pro
Re: New Codec and FM Recording for iAudio and iRiver
« Reply #44 on: September 11, 2006, 05:31:11 PM »
Quote from: lux on September 06, 2006, 08:37:59 PM
hello, i tried to record FM radio on iriver H140 and have some notes: when recording to MP3 (i tried 160 and 320 too) there is some digital noise, like very quick pulses oh high frequencies. i tried WAV too, and sound was clear. is it problem of not good encoder or what?

Is this the same thing?
http://forums.rockbox.org/index.php?topic=6327.0
Seems they fixed it by now.
Logged
iRiver H120

  • Print
Pages: 1 2 [3] 4 5
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Recording
| | |-+  New Codec and FM Recording for iAudio and iRiver
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.184 seconds with 20 queries.