Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > General > Audio encoding

Reply
 
Thread Tools Search this Thread Display Modes
Old 6th March 2012, 11:18   #1  |  Link
dil
Registered User
 
Join Date: Feb 2012
Posts: 13
MPEG2 extension

Hi all,

How can i identify whether an MPEG2 audio(layer 1, 2 or 3) has multichannel extension or not?

Thanks in advance
dil is offline   Reply With Quote
Old 6th March 2012, 14:46   #2  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,821
Is there such a thing as multichannel mpeg2 audio? I thought it only came in mono or stereo flavors.

MediaInfo should be able to tell you what you're dealing with.
hello_hello is offline   Reply With Quote
Old 6th March 2012, 16:48   #3  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
Quote:
Originally Posted by hello_hello View Post
Is there such a thing as multichannel mpeg2 audio? I thought it only came in mono or stereo flavors.
MPEG Multichannel is an extension to the MPEG-1 Layer II audio compression specification, as defined in the MPEG-2 Audio standard (ISO/IEC 13818-3), which allows it provide up to 5.1-channels (surround sound) of audio. To maintain backwards compatibility with the older 2-channel (stereo) audio specification, it uses a channel matrixing scheme, where the additional channels are mixed into the two backwards compatible channels. Extra information in the data stream (ignored by older hardware) contains signals to process extra channels from the matrix.
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊
LoRd_MuldeR is offline   Reply With Quote
Old 6th March 2012, 16:54   #4  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,821
Well you learn something every day.....
Is it ever used?
hello_hello is offline   Reply With Quote
Old 6th March 2012, 18:17   #5  |  Link
SeeMoreDigital
Life's clearer in 4K UHD
 
SeeMoreDigital's Avatar
 
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,217
Quote:
Originally Posted by hello_hello View Post
Well you learn something every day.....
Is it ever used?
It's use never really caught on...

As far as compressed multi-channel audio formats go, AC3 took the high ground very quickly. Most probably because hardware decoders were already available.
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
SeeMoreDigital is offline   Reply With Quote
Old 6th March 2012, 18:28   #6  |  Link
setarip_old
Registered User
 
setarip_old's Avatar
 
Join Date: Aug 2005
Posts: 16,267
If I remember correctly, the HD-DVD release of "Rain in the Mountains" contained such an audiostream together with MPEG2 video...
setarip_old is offline   Reply With Quote
Old 8th March 2012, 05:52   #7  |  Link
dil
Registered User
 
Join Date: Feb 2012
Posts: 13
anyone knows how to identify the multichannel extension?
dil is offline   Reply With Quote
Old 8th March 2012, 06:44   #8  |  Link
kypec
User of free A/V tools
 
kypec's Avatar
 
Join Date: Jul 2006
Location: SK
Posts: 826
Did you try MediaInfo yet? If not then why are you bumping your thread with same question? If yes then you should post your results and possibly tell us what's wrong with that approach!
kypec is offline   Reply With Quote
Old 8th March 2012, 08:16   #9  |  Link
dil
Registered User
 
Join Date: Feb 2012
Posts: 13
I dint try mediainfo. I dont need a software instead i need a method to identify multichannel extension.
Do i get that info in any of the desciptors or should i parse the audio frame?
I dont want to parse the audio frame (except header) because it takes lots of resource in my hardware. I can parse header if required.
dil is offline   Reply With Quote
Old 8th March 2012, 11:21   #10  |  Link
kypec
User of free A/V tools
 
kypec's Avatar
 
Join Date: Jul 2006
Location: SK
Posts: 826
MediaInfo is an open-source project. If it provides info you're looking for you can look into its source code how does it do it.
kypec is offline   Reply With Quote
Old 14th December 2023, 18:37   #11  |  Link
modus-ms325c
Registered User
 
Join Date: Dec 2023
Posts: 4
resurrecting the thread to provide some news

i tried MediaInfo on an actual MPEG Multichannel file, and here's what it gave me
Quote:
General
Complete name : C:\[REDACTED]\ring-of-gundam[5.1ch].mp2
Format : MPEG Audio
File size : 15.4 MiB
Duration : 5 min 36 s
Overall bit rate mode : Constant
Overall bit rate : 384 kb/s

Audio
Format : MPEG Audio
Format version : Version 1
Format profile : Layer 2
Duration : 5 min 36 s
Bit rate mode : Constant
Bit rate : 384 kb/s
Channel(s) : 2 channels
Sampling rate : 48.0 kHz
Frame rate : 41.667 FPS (1152 SPF)
Compression mode : Lossy
Stream size : 15.4 MiB (100%)

ReportBy : MediaInfoLib - v23.10
CreatedOn : UTC 2023-12-14 17:35:29
MediaInfo reports this as a 2-channel MPEG Audio Version 1 Layer 2 file

however, this file was encoded from a lossless 5.1ch wav file to a mp2 file using one of the MPEG Multichannel encoders available on this site

Last edited by modus-ms325c; 14th December 2023 at 20:36. Reason: oops can't show off my private info here, sorry my mistake
modus-ms325c is offline   Reply With Quote
Old 15th December 2023, 02:43   #12  |  Link
j7n
Registered User
 
j7n's Avatar
 
Join Date: Apr 2006
Posts: 136
Maybe look at the amount of ancillary data using Mp3GuessEnc. Other software like radio playout systems may write some extra data, but is usually less. The Fraunhofer encoder doesn't format unspent bytes as ancillary, but Lame does.

Quote:
Originally Posted by pub_enc.exe
Multi channel stream : yes
MPEG-2 Audio Multichannel parameters.
Audio bitstream extension : no
LFE : yes
Channels : 3
Multi lingual channels : 0
Channel configuration : 3/2

Ancillary data
Total amount : 5984838 bytes (51.2%)
Bitrate : 196.4 kbps
Min packet : 302 bytes
Max packet : 756 bytes
Padding used : no
Quote:
Originally Posted by mp3sEncoder.exe
Ancillary data
Total amount : 580800 bytes (6.0%)
Bitrate : 19.1 kbps
Min packet : 29 bytes
Max packet : 77 bytes
Max reservoir : 0 bytes
Scalefactor scaling used : yes
Scalefactor selection information used : no
Padding used : no

Maybe this file is encoded by Fraunhofer IIS mp3Surround 5.1 encoder
Where do you encounter multichannel MPEG today or even back in 2012? It seems to have not enough bitrate for decent quality. In case of mp3, it's something akin to parametric stereo coding at only 19 kbit/s.
j7n is offline   Reply With Quote
Old 15th December 2023, 03:03   #13  |  Link
ivanb
Registered User
 
Join Date: May 2023
Posts: 23
Quote:
however, this file was encoded from a lossless 5.1ch wav file to a mp2 file
Can you share the file so I would try to improve the analyzer?
ivanb is offline   Reply With Quote
Old 15th December 2023, 04:33   #14  |  Link
modus-ms325c
Registered User
 
Join Date: Dec 2023
Posts: 4
Quote:
Originally Posted by j7n View Post
Maybe look at the amount of ancillary data using Mp3GuessEnc. Other software like radio playout systems may write some extra data, but is usually less. The Fraunhofer encoder doesn't format unspent bytes as ancillary, but Lame does.
so i just tested mp3guessenc. a modest exe inside win32 folder was all i needed. here's how that went:
Quote:
Reading `C:\Users\Amon\Desktop\ffmpeg\bin\ring-of-gundam[5.1ch].mp2'...
First frame found at 0 (0x00000000).

Detected MPEG stream version 1 layer II, details follow.
File size : 16144128 bytes
Audio stream size : 16144128 bytes
Length : 0:05:36.336 (336.336 seconds)
Data rate : 384.0 kbps
Number of frames : 14014
Audio samples per frame : 1152
Audio frequency : 48000 Hz
Encoding mode : stereo
Multi channel stream : yes
MPEG-2 Audio Multichannel parameters.
Audio bitstream extension : no
LFE : yes
Channels : 3
Multi lingual channels : 0
Channel configuration : 3/2
Flags
Error protection : yes (check passed)
Copyrighted : yes
Original : yes
Emphasis : none

Ancillary data
Total amount : 8783152 bytes (54.4%)
Bitrate : 208.9 kbps
Min packet : 442 bytes
Max packet : 722 bytes
Padding used : no

Frame histogram
384 kbps : 14014 (100.0%), size distr: [14014 x1152 B]

0 header errors.
LAME only supports mono and stereo input files, so if we're taking about *other* ancillary data then we're practically being off-topic
Quote:
Originally Posted by j7n View Post
Where do you encounter multichannel MPEG today or even back in 2012? It seems to have not enough bitrate for decent quality. In case of mp3, it's something akin to parametric stereo coding at only 19 kbit/s.
this is a self-crafted file, actual multichannel MPEG are hard to come by and even then they're all reported as having only stereo (2 channels) anyways
Quote:
Originally Posted by ivanb View Post
Can you share the file so I would try to improve the analyzer?
sure thing, i'll PM you shortly

Last edited by modus-ms325c; 15th December 2023 at 04:51. Reason: address ivanb's reply and
modus-ms325c is offline   Reply With Quote
Old 15th December 2023, 04:50   #15  |  Link
j7n
Registered User
 
j7n's Avatar
 
Join Date: Apr 2006
Posts: 136
Ancillary data is where extensions to the mpeg audio format are saved. If you can't parse it, you can guess by the size. MPEG multichannel has about 192 kbit/s for the stereo downmix, and 192 kbit for the extension.

Sample files: http://j7n.sytes.net/temp/mpegsurround/

I could only get the pub_enc encoder to accept a 16-bit 6ch AIFF input file.

You could look at how mp3guessenc for an example, since it is open source. It detects multichannel in Layer II.

Last edited by j7n; 15th December 2023 at 04:53.
j7n is offline   Reply With Quote
Old 15th December 2023, 04:53   #16  |  Link
modus-ms325c
Registered User
 
Join Date: Dec 2023
Posts: 4
Quote:
Originally Posted by j7n View Post
Ancillary data is where extensions to the mpeg audio format are saved. If you can't parse it, you can guess by the size. MPEG multichannel has about 192 kbit/s for the stereo downmix, and 192 kbit for the extension.
yeah i get it. ancillary data in MPEG Multichannel's case can be ignored for decoders that cannot actually decode said data, though i have yet to see a software decoder (besides what's available on that .fr site) tackle MPEG Multichannel files beyond instinctively focusing on the stereo downmix part.
Quote:
Originally Posted by j7n View Post
I could only get the pub_enc encoder to accept a 16-bit 6ch AIFF input file.
again, i used a GUI program that deals with encoding multichannel files to MPEG Multichannels ones, and relies on pub_enc to get the job done. i even linked to the site where said program can be downloaded from.
Wav2Mpg. ring a bell?

Quote:
Originally Posted by j7n View Post
You could look at how mp3guessenc for an example, since it is open source. It detects multichannel in Layer II.
i opened up a executable binary on the command-line terminal in a rush. it's how i was able to find out what that mp2 file looked like.
i tried to compile it myself (using both MSYS2 MINGW32 and MSYS2 MINGW64, respectively) but it threw up an error instead.

Last edited by modus-ms325c; 15th December 2023 at 05:00.
modus-ms325c is offline   Reply With Quote
Old 29th December 2023, 16:14   #17  |  Link
SeeMoreDigital
Life's clearer in 4K UHD
 
SeeMoreDigital's Avatar
 
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,217
Quote:
Originally Posted by modus-ms325c View Post

MediaInfo reports this as a 2-channel MPEG Audio Version 1 Layer 2 file

however, this file was encoded from a lossless 5.1ch wav file to a mp2 file using one of the MPEG Multichannel encoders available on this site
So you got a 2-channel MP2 encode instead of a 6-Channel MP2 encode... But why anyone would want to encode multi-channel audio to MP2 instead of Dolby Digital is beyond me!
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |

Last edited by SeeMoreDigital; 29th December 2023 at 16:18.
SeeMoreDigital is offline   Reply With Quote
Old 29th December 2023, 16:35   #18  |  Link
modus-ms325c
Registered User
 
Join Date: Dec 2023
Posts: 4
Quote:
Originally Posted by SeeMoreDigital View Post
So you got a 2-channel MP2 encode instead of a 6-Channel MP2 encode... But why anyone would want to encode multi-channel audio to MP2 instead of Dolby Digital is beyond me!
fun fact, that site also has a Dolby Digital encoder of its own
modus-ms325c is offline   Reply With Quote
Old 29th December 2023, 17:08   #19  |  Link
SeeMoreDigital
Life's clearer in 4K UHD
 
SeeMoreDigital's Avatar
 
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,217
Quote:
Originally Posted by modus-ms325c View Post
fun fact, that site also has a Dolby Digital encoder of its own
Here's another 'fun fact'... Multi-channel MP2 is rubbish and was abandoned not long after DVD players were launched - more than 25 years ago!

Even as a 2-channel format, it's rubbish!
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
SeeMoreDigital is offline   Reply With Quote
Old 29th December 2023, 20:25   #20  |  Link
j7n
Registered User
 
j7n's Avatar
 
Join Date: Apr 2006
Posts: 136
Decoding with pub_dec from the linked site (hosted on really rare wares) yields a multichannel output with a separate LFE with low sampling rate. There is some crosstalk. And the bandwidth is limited to 14-15k, which is what you'd expect from 192 kbit/s.

This format doesn't seem to have reason for existing. At the time MPEG multichannel was created, AC-3 was already mature and widely supported, and it was a step backwards with the non discrete downmix approach. Why pick it out today, just to pick a fight. I was surprised that the mp3guessenc dev has deciphered the headers.
j7n is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:36.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.