Author Topic: Playing Shine Encoded Mp3 Files  (Read 1221 times)

suruaZ

  • Full Member
  • ***
  • Posts: 123
    • View Profile
Playing Shine Encoded Mp3 Files
« on: April 25, 2005, 11:33:18 am »
Anyone knows why Shine encoded mp3 files are too speedy while playing it?
I use the same bit rate 32000 for encoding and decoding. As player I tried mpegplayer and madplay.

Thanks,
suruaZ
SL-5500, Sharp ROM 3.13, Pretec GSM/GPRS CF, IBM Microdrive 340 MB

dreadlocks

  • Jr. Member
  • **
  • Posts: 71
    • View Profile
    • http://zaurus.nayr.net
Playing Shine Encoded Mp3 Files
« Reply #1 on: April 25, 2005, 04:01:25 pm »
32 gives a very poor result..
try 48 or 64, I record my lectures using 64bit and it sounds great
RETIRED - Zaurus SL-5600 (and a dead 5000D)
Wapaton 1.6.1 - Personal Watapon Feed
SMC 2642W & Linksys WCF12, Targus Universal IR Keyboard
Sandisk 512mb SD, Lexar 64mb SD, Sharp Camera
Extreme Limit Metal & Leather Suit

suruaZ

  • Full Member
  • ***
  • Posts: 123
    • View Profile
Playing Shine Encoded Mp3 Files
« Reply #2 on: April 26, 2005, 12:40:51 am »
Quote
32 gives a very poor result..
try 48 or 64, I record my lectures using 64bit and it sounds great
[div align=\"right\"][a href=\"index.php?act=findpost&pid=76803\"][{POST_SNAPBACK}][/a][/div]

Sory I was not clear enough. 32k is a samples rate, bits rate is 128 kbs.
I have no problems with quality but with re play speed.
I think that if encoder encodes 32k samples per second and decoder decodes 32k samples per second the sound speed must be the same?

suruaZ
SL-5500, Sharp ROM 3.13, Pretec GSM/GPRS CF, IBM Microdrive 340 MB

omega

  • Hero Member
  • *****
  • Posts: 626
    • View Profile
    • http://
Playing Shine Encoded Mp3 Files
« Reply #3 on: April 26, 2005, 07:39:44 am »
Indeed, if the sample rate of both the recorder and player are the same then the speed should be the same.
Gorgeous C860, 256 Sandisk SD, 1Gig Pretec 40x CF, PDAIR leather case & the really cool retractable iPDA USB sync/charge cable. Powered by PDAXROM BETA 1.

My wish - to have a Command & Conquer style game on my Z! (FREECNC!!!) Simcity 2000 would also be great.

chrget

  • Full Member
  • ***
  • Posts: 129
    • View Profile
Playing Shine Encoded Mp3 Files
« Reply #4 on: April 26, 2005, 02:20:20 pm »
Quote
I think that if encoder encodes 32k samples per second and decoder decodes 32k samples per second the sound speed must be the same?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=76863\"][{POST_SNAPBACK}][/a][/div]

The operative word here is if. My guess is you may have run into one of the peculiarities (read: bugs) of the kernel / sound driver provided with the Sharp 3.13 (and possibly other?) ROMs. Seems that the SNDCTL_DSP_SPEED when applied to /dev/dsp1 will not become active immediately, but rather when the device is next opened. So in other words, sampling will be performed with the rate of the previous application to access the audio input (or possibly a default after suspend/resume/reboot).

The workaround is to start shine (or any other capturing application), abort it and then restart it. The second time around, the sampling rate will match and things will be alright.

Quote
[...] try 48 or 64, I record my lectures using 64bit and it sounds great

Now that is really an exaggeration if I ever heard one  I can think of many things to say when it comes to shine, but 'sounds great' is certainly not a phrase that comes to mind

Best regards,
Chris.
SL-5500G running a modified 3.13 Sharp ROM
Extrememory 1GB SD / Netgear MA701 WLAN
Audiovox RTM-8000 GSM/GPRS CF Card

dreadlocks

  • Jr. Member
  • **
  • Posts: 71
    • View Profile
    • http://zaurus.nayr.net
Playing Shine Encoded Mp3 Files
« Reply #5 on: April 26, 2005, 04:10:11 pm »
sounds great is relative, im not having the problem suruaz is having.
well in my lectures the professor wears a microphone and I sit under one of the celing mounted speakers using the built in mic on my 5600, comparing the quality of the sharp voice recorder to the shine encoded mp3 I can tell no obvious diffrences, besides the fact I can record several hours of lectures using shine.. now If I was trying to sample a direct input or mebe with a better mic I might expect shine would sound far from "great", but for my very specific uses it performs admirably..
RETIRED - Zaurus SL-5600 (and a dead 5000D)
Wapaton 1.6.1 - Personal Watapon Feed
SMC 2642W & Linksys WCF12, Targus Universal IR Keyboard
Sandisk 512mb SD, Lexar 64mb SD, Sharp Camera
Extreme Limit Metal & Leather Suit

chrget

  • Full Member
  • ***
  • Posts: 129
    • View Profile
Playing Shine Encoded Mp3 Files
« Reply #6 on: April 27, 2005, 03:25:25 am »
Quote
sounds great is relative, im not having the problem suruaz is having.
Awwww, come on, I was just pulling your string a bit

Shine is a nice little piece of software, no doubt about it. And, as I mentioned earlier, suruaZ's problem is not really related to shine but rather to the ROM/kernel in question, or so it seems.
Quote
[...] using the built in mic on my 5600, comparing the quality of the sharp voice recorder to the shine encoded mp3 I can tell no obvious diffrences, besides the fact I can record several hours of lectures using shine.. now If I was trying to sample a direct input or mebe with a better mic I might expect shine would sound far from "great", but for my very specific uses it performs admirably..[div align=\"right\"][{POST_SNAPBACK}][/a][/div]
I'm quite sure it does. As I said, I think shine is a Good Thing.

I 'solved' the Sharp Voice Recorder's main shortcoming (i.e. the high data rate through the use of plain PCM .wav files for recording) using a combination of a few lines of C-Code that captures from the audio device to stdout, a shell script and speexenc, thus producing nice low bitrate .spx voice recordings.

Obviously with Speex being a voice codec, general audio quality will not quite be the same as shine's, but for voice it's certainly more than acceptable, and at a much lower bitrate at that (it can go as low as 5-6 kBps while still producing amenable results). In the simplest case, speexdec will play back the resulting files, but other players usually will do as well (for me, lamip and vlc obviously come to mind  [confused? Here's the blatant plug: I'm referring to [a href=\"https://www.oesf.org/forums/index.php?showtopic=11336]this[/url] and this thread]).

For people interested in Speex, a look at this thread might be of interest.

Eventually I will most likely move on to AMR though, once I manage to make the encoder run in realtime on the Z, mainly for reasons of convergence (modern-day mobile phones can play back AMR files and/or even send them using MMS [Multimedia Message Service]), even though I prefer the fact that Speex is an open, royalty- and patent-free codec.

Best regards,
Chris.
SL-5500G running a modified 3.13 Sharp ROM
Extrememory 1GB SD / Netgear MA701 WLAN
Audiovox RTM-8000 GSM/GPRS CF Card

suruaZ

  • Full Member
  • ***
  • Posts: 123
    • View Profile
Playing Shine Encoded Mp3 Files
« Reply #7 on: April 27, 2005, 03:40:25 am »
Quote
Seems that the SNDCTL_DSP_SPEED when applied to / dev/dsp1 will not become active immediately, but rather when the device is next opened. So in other words, sampling will be performed with the rate of the previous application to access the audio input (or possibly a default after suspend/ resume/reboot).

The workaround is to start shine (or any other capturing application), abort it and then restart it. The second time around, the sampling rate will match and things will be alright.

Yes,exactly! From the second try and up everything is OK. Thanks chrget!

suruaZ
SL-5500, Sharp ROM 3.13, Pretec GSM/GPRS CF, IBM Microdrive 340 MB