View Full Version : DVD-Audio to FLAC?
Ghitulescu
17th April 2015, 13:39
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.
pandy
17th April 2015, 15:21
Sample please...
filler56789
17th April 2015, 15:31
Probably your best choice is uncompressed multichannel .WAVs
(OR switch to "proprietary&&evil" :rolleyes: stuff such as MLP and Pure-Lossless DTS-HD :D ).
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.
Ghitulescu
17th April 2015, 15:44
Sample please...
How to cut multichannel files?
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.
... 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.
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 (http://forum.doom9.org/showthread.php?t=120871) 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.
filler56789
17th April 2015, 19:45
The problem is not (only) FLAC, if you read my message again, it concerns the WAV, too.
My bad :o , 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 :)
This I have read (there is here (http://forum.doom9.org/showthread.php?t=120871) a thread about it) but still no solution.
Thanks, I'm reading it right now.
SeeMoreDigital
18th April 2015, 14:40
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 ;)
pandy
20th April 2015, 11:00
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
Ghitulescu
20th April 2015, 14:48
http://i62.tinypic.com/15p4xv4.png
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.
Ghitulescu
21st April 2015, 09:01
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.
Ghitulescu
21st April 2015, 09:04
To add more, none of the files that do not play can be encoded to flac.
These are the errors:
8 channels test file
8_channel_id.wav: ERROR: WAVEFORMATEXTENSIBLE chunk: channel mask 0x003F has unassigned channels (#channels=8)
original WAV (from foobar)
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)
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)
track-01_merge.w-ex.wav: ERROR: WAVEFORMATEXTENSIBLE chunk with unsupported channel mask=0 x0000
Use --channel-map=none option to encode the input
tebasuna51
21st April 2015, 10:41
From https://xiph.org/flac/format.html#def_STREAMINFO
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:
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.
Ghitulescu
21st April 2015, 12:40
From https://xiph.org/flac/format.html#def_STREAMINFO
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?
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.
... with:
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.
- 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? :) )
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.
tebasuna51
21st April 2015, 20:06
Is there any wav header manipulation software?
Read this: http://forum.doom9.org/showthread.php?p=1520399#post1520399
SeeMoreDigital
21st April 2015, 20:56
Ghitulescu,
Have you considered using UsEac3To (v1.1.5) to encode your stereo/multi-channel .mpl files into stereo/multi-channel .flac files?
Cheers
Ghitulescu
22nd April 2015, 05:49
Thank you both for suggestions.
Ghitulescu
23rd April 2015, 19:42
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:
Thanks SeeMoreDigital for the GUI idea.
pandy
24th April 2015, 10:40
Perhaps stupid question but are you able to provide information about ffmpeg behavior?
Ghitulescu
25th April 2015, 06:43
I can't use ffmepeg.
In fact I am not allowed to use any software that leaves "prints" in the system or any installer.
pandy
28th April 2015, 14:27
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 .
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.