Author Topic: Channel info MPEG version  (Read 319 times)

3delite

  • Posts: 895
Channel info MPEG version
« on: 9 May '16 - 16:01 »
Hi!

Is there a way to get the MPEG version of a MPEG file stream?

The 'ChannelInfo.ctype' only reports the MPEG layer version if I understand, I need to identify the MPEG version too (1, 2, 2.5).

My code fails on corrupt MPEG files, and BASS seems to pick up the MPEG sync nicely, I am trying to search for the MPEG sync bits from what BASS reports.

Thank you!

Best regards
3delite

Ian @ un4seen

  • Administrator
  • Posts: 20401
Re: Channel info MPEG version
« Reply #1 on: 9 May '16 - 17:25 »
You can use the sample rate (BASS_CHANNELINFO "freq" value) to detect the MPEG version: 32000-48000 Hz is MPEG-1, 16000-24000 Hz is MPEG-2, 8000-12000 Hz is MPEG-2.5.

3delite

  • Posts: 895
Re: Channel info MPEG version
« Reply #2 on: 10 May '16 - 02:47 »
Cool! Works nicely! :)

Thank you very much!

Best regards
3delite