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 17th April 2015, 13:39   #1  |  Link
Ghitulescu
Registered User
 
Ghitulescu's Avatar
 
Join Date: Mar 2009
Location: Germany
Posts: 5,770
DVD-Audio to FLAC?

Well, I tried to rip a DVD-Audio with foobar and the associated plugin.

Everything went ok, apart from direct encoding to FLAC. I save the tracks as WAV and did some tests.

And this is why flac could not encode them: the channel map was not recognized. It should have been since revision 1.1.2. I downloaded the last version, 1.3.1, still the same.

Windows, foobar play the audio file as it should.
Hardware players however play only the rear L and rear R, which is a sort of cacophony .

I fired up flac manually with no channel map and went ok, the encoding.

The flacs were equally played back correctly by foobar, but not by vlc or hardware players.

Thinking it was a problem of foobar I fired up the freeware DVD audio explorer. I used merge groups to get a single file, and the resulting file was identical to foobars' one. There were two groups, one having L,R,LFE and the other one having the rear channels.

The file should be 4.1.

I gather that the inability of HW layers to play it comes from the lack of the proper channel identification, although foobar shows them having the right configuration, L-R-LFE-Lr-Rr.

Any ideas what to do before or after ripping? My player does understand DVD-Audio, just it has no digital out, the new one does not, so I would like to convert these files to multi-channel FLACs in order to play them on the new player.



This question has been asked several times (slightly differently) in the past but I found no answer.
__________________
Born in the USB (not USA)
Ghitulescu is offline   Reply With Quote
Old 17th April 2015, 15:21   #2  |  Link
pandy
Registered User
 
Join Date: Mar 2006
Posts: 1,049
Sample please...
pandy is offline   Reply With Quote
Old 17th April 2015, 15:31   #3  |  Link
filler56789
SuperVirus
 
filler56789's Avatar
 
Join Date: Jun 2012
Location: Antarctic Japan
Posts: 1,355
Probably your best choice is uncompressed multichannel .WAVs
(OR switch to "proprietary&&evil" stuff such as MLP and Pure-Lossless DTS-HD ).

FLAC has always sucked at multichannel audio. The format has serious design flaws, and the author doesn't want to fix them, apparently, because the "backward-compatibility" would have to be sacrificed, to begin with.
filler56789 is offline   Reply With Quote
Old 17th April 2015, 15:44   #4  |  Link
Ghitulescu
Registered User
 
Ghitulescu's Avatar
 
Join Date: Mar 2009
Location: Germany
Posts: 5,770
Quote:
Originally Posted by pandy View Post
Sample please...
How to cut multichannel files?
Quote:
Originally Posted by filler56789 View Post
Probably your best choice is uncompressed multichannel .WAVs
The problem is not (only) FLAC, if you read my message again, it concerns the WAV, too.
Quote:
Originally Posted by Ghitulescu View Post
... I saved the tracks as WAV and did some tests....
Windows, foobar play the audio file as it should.
Hardware players however play only the rear L and rear R, which is a sort of cacophony .
I fired up flac manually with no channel map and went ok, the encoding.
The flacs were equally played back correctly by foobar, but not by vlc or hardware players.
Quote:
Originally Posted by filler56789 View Post
FLAC has always sucked at multichannel audio. The format has serious design flaws, and the author doesn't want to fix them, apparently, because the "backward-compatibility" would have to be sacrificed, to begin with.
This I have read (there is here a thread about it) but still no solution.
-------============---------
Meanwhile, I've split the file into 5 channels and reinterleaved them back with MultiWav, hoping the file will be recreated with the correct channel sequence and identified as well (although no possibility to assign the channels seems to exist).
None of the 6 file has been recognized by foobar.

I am really clueless.
__________________
Born in the USB (not USA)
Ghitulescu is offline   Reply With Quote
Old 17th April 2015, 19:45   #5  |  Link
filler56789
SuperVirus
 
filler56789's Avatar
 
Join Date: Jun 2012
Location: Antarctic Japan
Posts: 1,355
Quote:
Originally Posted by Ghitulescu
The problem is not (only) FLAC, if you read my message again, it concerns the WAV, too.
My bad , apologies for reading too fast ^.^;

As for re-interleaving the mono .WAVs,
I think you should have tried sox

or Avisynth + wavi.exe, if you prefer to complicate things like I do

Quote:
This I have read (there is here a thread about it) but still no solution.
Thanks, I'm reading it right now.
filler56789 is offline   Reply With Quote
Old 18th April 2015, 14:40   #6  |  Link
SeeMoreDigital
Life's clearer in 4K UHD
 
SeeMoreDigital's Avatar
 
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,231
Quote:
Originally Posted by filler56789 View Post
As for re-interleaving the mono .WAVs, I think you should have tried sox
Personally, I'm still using WaveWizard to merge mono PCM.wav files together
__________________
| 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 20th April 2015, 11:00   #7  |  Link
pandy
Registered User
 
Join Date: Mar 2006
Posts: 1,049
Quote:
Originally Posted by Ghitulescu View Post
How to cut multichannel files?
ffmpeg -t ?

btw with ffmpeg "any" to flac works (works for me) - at least multichannel 7.1 and 88.2ksps 5.1 (don't have to many samples with multichannel, 24 bit and 96ksps).
@ffmpeg -threads %NUMBER_OF_PROCESSORS%*1.5 -i %1 -vn -c:a flac -compression_level 12 %1.flac

Last edited by pandy; 20th April 2015 at 15:22.
pandy is offline   Reply With Quote
Old 20th April 2015, 14:48   #8  |  Link
Ghitulescu
Registered User
 
Ghitulescu's Avatar
 
Join Date: Mar 2009
Location: Germany
Posts: 5,770


After demuxing to mono WAVs for each channel, they played correctly.

Now I have used the WaveWizard to interleave them again, but I can't test them until evening. Foobar (blindly) show that all channels are in use and alive.
__________________
Born in the USB (not USA)
Ghitulescu is offline   Reply With Quote
Old 21st April 2015, 09:01   #9  |  Link
Ghitulescu
Registered User
 
Ghitulescu's Avatar
 
Join Date: Mar 2009
Location: Germany
Posts: 5,770
Checked the WAVs (I made two versions, one with normal and one with old formats) and neither plays correctly.

I downloaded a test file 6 channels and it went however ok. The other test file, an 8 channel file, however behave the same - it seems to be played slowly (like it would be 48kHz instead of 96) in stereo.

I don't know what to think, 2 chn WAV and FLAC and MP3 and AC3 work as they should, 6 chn (5.1) too, but 4.1 (like this one) or other combinations seem to be unsupported.

To be even more strange, I couldn't play any file (including mono wav) on my BDplayer.

I am rather confused.
__________________
Born in the USB (not USA)
Ghitulescu is offline   Reply With Quote
Old 21st April 2015, 09:04   #10  |  Link
Ghitulescu
Registered User
 
Ghitulescu's Avatar
 
Join Date: Mar 2009
Location: Germany
Posts: 5,770
To add more, none of the files that do not play can be encoded to flac.




These are the errors:
  • 8 channels test file
    Code:
    8_channel_id.wav: ERROR: WAVEFORMATEXTENSIBLE chunk: channel mask 0x003F has unassigned channels (#channels=8)
  • original WAV (from foobar)
    Code:
    track-01_96000.wav: ERROR: WAVEFORMATEXTENSIBLE chunk with unsupported channel mask=0x0008
    Use --channel-map=none option to encode the input
  • old format WAV (from WaveWizard)
    Code:
    track-01_merge.normal.wav: WARNING: legacy WAVE file has format type 1 but bits-per-sample =24
    track-01_merge.normal.wav: ERROR: WAVE has >2 channels but is not WAVE_FORMAT_EXTENSIBLE; cannot assign channels
  • new format WAV (from WaveWizard)
    Code:
    track-01_merge.w-ex.wav: ERROR: WAVEFORMATEXTENSIBLE chunk with unsupported channel mask=0 x0000
    Use --channel-map=none option to encode the input
__________________
Born in the USB (not USA)

Last edited by Ghitulescu; 21st April 2015 at 09:26.
Ghitulescu is offline   Reply With Quote
Old 21st April 2015, 10:41   #11  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,978
From https://xiph.org/flac/format.html#def_STREAMINFO

Quote:
Channel assignment

0000-0111 : (number of independent channels)-1. Where defined, the channel order follows SMPTE/ITU-R recommendations. The assignments are as follows:
1 channel: mono
2 channels: left, right
3 channels: left, right, center
4 channels: front left, front right, back left, back right
5 channels: front left, front right, front center, back/surround left, back/surround right
6 channels: front left, front right, front center, LFE, back/surround left, back/surround right
7 channels: front left, front right, front center, LFE, back center, side left, side right
8 channels: front left, front right, front center, LFE, back left, back right, side left, side right
Without the parameter --channel-map=none, flac encoder reject any wav input with a channel-mask than don't match with:
Code:
Channels   Mask   MS channels order      
--------  ------  -----------------------
   1      0x0004  FC                     
   2      0x0003  FL FR                  
   3      0x0007  FL FR FC               
   4      0x0033  FL FR BL BR            
   5      0x0037  FL FR FC BL BR         
   6      0x003F  FL FR FC LF BL BR      
   7      0x070F  FL FR FC LF BC SL SR   
   8      0x063F  FL FR FC LF BL BR SL SR
- Then a 8 channels wav must have 0x063F like channel-mask
- A mono wav must have 0x0004 like channel-mask
- Old format WAV is not supported for >2 channels.
- Is know than WaveWizard put always 0 in WAVE_FORMAT_EXTENSIBLE channel mask. Use Sox instead or use a hex editor to put the correct channel-mask.

Also the 4.1 ( FL FR LF BL BR) is not supported. A workaround is put a empty FC channel and 0x003F (FL FR FC LF BL BR) to encode to flac.
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline   Reply With Quote
Old 21st April 2015, 12:40   #12  |  Link
Ghitulescu
Registered User
 
Ghitulescu's Avatar
 
Join Date: Mar 2009
Location: Germany
Posts: 5,770
Quote:
Originally Posted by tebasuna51 View Post
This I knew.
My problem also seems to reside in that I cannot manipulate the streams and somehow get the wrong results each time.

Is there any wav header manipulation software?

Quote:
Originally Posted by tebasuna51 View Post
Without the parameter --channel-map=none, flac encoder reject any wav input with a channel-mask than don't match...
This I didn't know. I thought it will default to a predefined matrix.
However, even with this trick I couldn't get the right sound, still defaulted to stereo.
Quote:
Originally Posted by tebasuna51 View Post
... with:
Code:
Channels   Mask   MS channels order      
--------  ------  -----------------------
   1      0x0004  FC                     
   2      0x0003  FL FR                  
   3      0x0007  FL FR FC               
   4      0x0033  FL FR BL BR            
   5      0x0037  FL FR FC BL BR         
   6      0x003F  FL FR FC LF BL BR      
   7      0x070F  FL FR FC LF BC SL SR   
   8      0x063F  FL FR FC LF BL BR SL SR
This matrix I was looking for ... Thanks.
Quote:
Originally Posted by tebasuna51 View Post
- Then a 8 channels wav must have 0x063F like channel-mask
- A mono wav must have 0x0004 like channel-mask
- Old format WAV is not supported for >2 channels.
- Is know than WaveWizard put always 0 in WAVE_FORMAT_EXTENSIBLE channel mask. Use Sox instead or use a hex editor to put the correct channel-mask.
Well, I didn't know this. I will try sox (I used it some 10 years ago, I hope it isn't a CLI anymore? )
Quote:
Originally Posted by tebasuna51 View Post
Also the 4.1 ( FL FR LF BL BR) is not supported. A workaround is put a empty FC channel and 0x003F (FL FR FC LF BL BR) to encode to flac.
Thanks, nice trick. I?ll check this out.
__________________
Born in the USB (not USA)
Ghitulescu is offline   Reply With Quote
Old 21st April 2015, 20:06   #13  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,978
Quote:
Originally Posted by Ghitulescu View Post
Is there any wav header manipulation software?
Read this: http://forum.doom9.org/showthread.ph...99#post1520399
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline   Reply With Quote
Old 21st April 2015, 20:56   #14  |  Link
SeeMoreDigital
Life's clearer in 4K UHD
 
SeeMoreDigital's Avatar
 
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,231
Ghitulescu,

Have you considered using UsEac3To (v1.1.5) to encode your stereo/multi-channel .mpl files into stereo/multi-channel .flac files?

Cheers
__________________
| 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 22nd April 2015, 05:49   #15  |  Link
Ghitulescu
Registered User
 
Ghitulescu's Avatar
 
Join Date: Mar 2009
Location: Germany
Posts: 5,770
Thank you both for suggestions.
__________________
Born in the USB (not USA)
Ghitulescu is offline   Reply With Quote
Old 23rd April 2015, 19:42   #16  |  Link
Ghitulescu
Registered User
 
Ghitulescu's Avatar
 
Join Date: Mar 2009
Location: Germany
Posts: 5,770
I did some tests.

1. deinterlace the tracks directly from from DVDA Explorer
2. process one track in AUdacity - fill with silence and save as Center
3. remux all 6 tracks in WaveWizard, observing the L R C LFE Ls Rs order (and channel matrix)

Now, all tracks are recognized and played in full 6 channel - directly as WAV or as FLAC (with foobar). No patching was necessary.

Apparently 4.1 needs a DVDA player ....

Thanks Tebatsuna for the "blank" center channel idea.

Thanks SeeMoreDigital for the GUI idea.
__________________
Born in the USB (not USA)
Ghitulescu is offline   Reply With Quote
Old 24th April 2015, 10:40   #17  |  Link
pandy
Registered User
 
Join Date: Mar 2006
Posts: 1,049
Perhaps stupid question but are you able to provide information about ffmpeg behavior?
pandy is offline   Reply With Quote
Old 25th April 2015, 06:43   #18  |  Link
Ghitulescu
Registered User
 
Ghitulescu's Avatar
 
Join Date: Mar 2009
Location: Germany
Posts: 5,770
I can't use ffmepeg.

In fact I am not allowed to use any software that leaves "prints" in the system or any installer.
__________________
Born in the USB (not USA)
Ghitulescu is offline   Reply With Quote
Old 28th April 2015, 14:27   #19  |  Link
pandy
Registered User
 
Join Date: Mar 2006
Posts: 1,049
Quote:
Originally Posted by Ghitulescu View Post
I can't use ffmepeg.

In fact I am not allowed to use any software that leaves "prints" in the system or any installer.
IMHO ffmpeg don't need to be installed and there no sign of any activity you mentioned - this is plainly command line tool - single exe .
pandy 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 23:28.


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