Author Topic: MP3 Layer-1 decoding  (Read 5204 times)

Siekmanski

  • Member
  • *****
  • Posts: 2365
MP3 Layer-1 decoding
« on: January 06, 2014, 01:02:40 AM »
I'm busy extracting all mp3 info from mp3 files and calculate all info needed to decode a mp3 file.
Has any of you guys an example of a "layer-1" mp3 file for me?
Then i can check it in my sources and see if i did the calculations properly.
Sorry no sources this time, it's not finished yet.

If you want to check other mp3 files, just rename the file to test.mp3
The mp3 file will be decoded and saved as sounddata.wav
Creative coders use backward thinking techniques as a strategy.

ragdog

  • Member
  • ****
  • Posts: 610
Re: MP3 Layer-1 decoding
« Reply #1 on: January 06, 2014, 01:05:52 AM »
Hi fine

For other good example about Mp3 layer or id3 have i found on asmcommuntiy.net for a long time

But your is nice

Greets,

dedndave

  • Member
  • *****
  • Posts: 8827
  • Still using Abacus 2.0
    • DednDave
Re: MP3 Layer-1 decoding
« Reply #2 on: January 06, 2014, 02:44:05 AM »
let me see if i can find one, Marinus :t

Siekmanski

  • Member
  • *****
  • Posts: 2365
Re: MP3 Layer-1 decoding
« Reply #3 on: January 06, 2014, 03:24:08 AM »
 :biggrin:
That would be great, googled for it and only found one example of a 1 second file which didn't decode....
Creative coders use backward thinking techniques as a strategy.

dedndave

  • Member
  • *****
  • Posts: 8827
  • Still using Abacus 2.0
    • DednDave
Re: MP3 Layer-1 decoding
« Reply #4 on: January 06, 2014, 04:11:39 AM »
so - is it the ID marker at the beginning ?
would it be ID1 ?

is that your voice ?   :biggrin:

dedndave

  • Member
  • *****
  • Posts: 8827
  • Still using Abacus 2.0
    • DednDave
Re: MP3 Layer-1 decoding
« Reply #5 on: January 06, 2014, 04:22:13 AM »

dedndave

  • Member
  • *****
  • Posts: 8827
  • Still using Abacus 2.0
    • DednDave
Re: MP3 Layer-1 decoding
« Reply #6 on: January 06, 2014, 05:05:21 AM »
http://trac.ffmpeg.org/raw-attachment/ticket/1718/M4A_MP1_288Kbps_CBR_44.1KHz_2ch.m4a

it says it's an M4A file
but MediaInfo tells me that the sound format is MPEG format version 1, layer-1

what you might also find are some older MPEG movie files with MP1 formatted sound track

dedndave

  • Member
  • *****
  • Posts: 8827
  • Still using Abacus 2.0
    • DednDave
Re: MP3 Layer-1 decoding
« Reply #7 on: January 06, 2014, 05:12:59 AM »
as a note of interest, i came across this sound library.....

http://www.un4seen.com/bass.html

dedndave

  • Member
  • *****
  • Posts: 8827
  • Still using Abacus 2.0
    • DednDave
Re: MP3 Layer-1 decoding
« Reply #8 on: January 06, 2014, 05:54:18 AM »
i am guessing the M4A file is a container
you can probably extract the sound track with some simple file manipulation

Siekmanski

  • Member
  • *****
  • Posts: 2365
Re: MP3 Layer-1 decoding
« Reply #9 on: January 06, 2014, 08:46:33 AM »
Thanks Dave,

That's not my voice....  :biggrin:
The M4A file is an other format.
I know that BASS library but i like to try it myself and learn something on the way.
It's just for fun to use the mp3 codec but i need to feed it with the proper info of the mp3 files.
Layer-1 is the only one which i don't have and i need one to examine it so i can play all types of MP3 files in my program.
Tried several converters but non of them create a layer-1 file.
Creative coders use backward thinking techniques as a strategy.

Siekmanski

  • Member
  • *****
  • Posts: 2365
Re: MP3 Layer-1 decoding
« Reply #10 on: January 09, 2014, 08:38:12 AM »
Found a MP3 Layer-1 file and it turns out my calculations were properly done.
Not that i need it in my source code, but i just wanted to know......
I'm going to use Fraunhofer ACM codec which only supports Layer-3 MP3 files.
So Layer-1 & Layer-2 can not be played, i first didn't noticed that........
Creative coders use backward thinking techniques as a strategy.

dedndave

  • Member
  • *****
  • Posts: 8827
  • Still using Abacus 2.0
    • DednDave
Re: MP3 Layer-1 decoding
« Reply #11 on: January 09, 2014, 04:28:32 PM »
you have a reason for not using a different codec ?

Siekmanski

  • Member
  • *****
  • Posts: 2365
Re: MP3 Layer-1 decoding
« Reply #12 on: January 09, 2014, 09:27:16 PM »
Not really, but Fraunhofer codec is already present on windows.
No other libs needed to play mp3 or encode to mp3.
And you can activate "Fraunhofer IIS MPEG Layer-3 Codec (professional)" if windows\system32\l3codecp.acm is present.
It allows us to encode up to 320 Kbps.
Creative coders use backward thinking techniques as a strategy.