How to convert PCM into Flac

MKV playback, recompression, remuxing, codec packs, players, howtos, etc.
steagle
Posts: 12
Joined: Sat Dec 31, 2011 6:05 pm

Re: How to convert PCM into Flac

Post by steagle » Wed Jan 18, 2012 4:43 am

That worked, thanks. Unfortunately the cleaned mkv still doesn't display a feature list in eac3to :( The file pays back fine in VLC, but because of that LPCM track, I can't get any audio via my receiver & Popcorn Hour. Guess ffmpeg is my last option.

Romansh
Posts: 872
Joined: Sat Jan 22, 2011 7:09 pm

Re: How to convert PCM into Flac

Post by Romansh » Wed Jan 18, 2012 12:05 pm

If you want to extract the audio to a file using a GUI, this *might* work:

http://www.macupdate.com/app/mac/23764/imkvextract

steagle
Posts: 12
Joined: Sat Dec 31, 2011 6:05 pm

Re: How to convert PCM into Flac

Post by steagle » Sat Feb 25, 2012 6:40 am

That worked! :D With iMkvExtract I was able to extract just the PCM track, which created a file with a .??? extension in Mac OS. I then renamed the extension to .wav and was able to encode to other formats. Thanks for the tip!

steagle
Posts: 12
Joined: Sat Dec 31, 2011 6:05 pm

Re: How to convert PCM into Flac

Post by steagle » Mon Mar 12, 2012 3:44 pm

Bummer, I'll have to take that back... I didn't test the file thoroughly when I posted that. MKVExtract did extract the PCM track successfully, but after encoding to DTS-HD MA with the same number of channels (in this case it was 1.0 Mono), I just get garbled noise in the remuxed MKV. It probably has to do with the fact that I added the .wav extension to the extracted PCM track. But without giving it a usable extension, Windows wouldn't recognize the original file at all and thus the DTS encoding suite wouldn't load it. Anyone else have any experience with these sets of programs?

Romansh
Posts: 872
Joined: Sat Jan 22, 2011 7:09 pm

Re: How to convert PCM into Flac

Post by Romansh » Tue Mar 13, 2012 12:02 am

Can you post the MediaInfo report for the extracted audio track?

steagle
Posts: 12
Joined: Sat Dec 31, 2011 6:05 pm

Re: How to convert PCM into Flac

Post by steagle » Fri Mar 16, 2012 3:07 am

General
Wave: 613 MiB, 1h 51mn
1 Audio stream: PCM

Audio
768 Kbps, 48.0 KHz, 16 bits, 1 channel, PCM

Romansh
Posts: 872
Joined: Sat Jan 22, 2011 7:09 pm

Re: How to convert PCM into Flac

Post by Romansh » Fri Mar 16, 2012 2:22 pm

For LPCM Mono or Stereo, MakeMKV defaults to storing raw PCM rather than WAV-in MKV - so mkvextract's output will also be raw PCM, not WAV. You'll have to convert it to WAV somehow before loading it in other software.

Example FFmpeg/Libav usage:

Code: Select all

ffmpeg -i input.mkv -vn -sn -c:a copy output.wav

Code: Select all

avconv -i input.mkv -vn -sn -c:a copy output.wav
Where input.mkv is the path to MakeMKV's output and output.wav is the desired output path for the WAV file.

steagle
Posts: 12
Joined: Sat Dec 31, 2011 6:05 pm

Re: How to convert PCM into Flac

Post by steagle » Mon Mar 19, 2012 3:48 pm

Thanks Romansh! I'll give that a try soon. I know I should have just bitten the bullet and used ffmpeg to begin with. These GUIs are always lacking one or two things that I want to do. Wouldn't it be nice if there was one program that combined the best MakeMKV, mkvtoolnix, tsmuxer, eac3to and ffmpeg features together in one simple, attractive GUI - now that I would pay big bucks for.

angelgraves13
Posts: 91
Joined: Thu Jun 06, 2013 9:36 pm

Re: How to convert PCM into Flac

Post by angelgraves13 » Tue Sep 17, 2013 11:47 pm

I prefer LPCM to DTS-HD MA, but to each his own.

steagle
Posts: 12
Joined: Sat Dec 31, 2011 6:05 pm

Re: How to convert PCM into Flac

Post by steagle » Fri Jan 10, 2014 8:22 pm

Neither of my Popcorn Hours (A-200 and C-200) support LPCM playback so any time I encounter a BD title with LPCM it has to be converted to a lossless format. DTS-HD MA is nice as it's supported on all modern receivers. I'm fine with FLAC too, but since I have the DTS-HD encoder I just use that.

Romanash - Just wanted to say thanks again - I was able to successfully transcode the LPCM stream to WAV using your ffmpeg command. Then I converted the WAV to DTS-HD MA using DTS-HD Master Audio Suite Encoder. Finally I muxed the DTS-HD MA track into the original MKV using mkvmerge. A little time consuming, but great to know how to do this for future BD's.

ultradj83
Posts: 2
Joined: Sun May 22, 2016 5:55 am

Re: How to convert PCM into Flac

Post by ultradj83 » Sun May 22, 2016 6:21 am

Dears,
I'm trying to rip a Bluray Audio disc to FLAC.
This disc contains a video track just showing titles and a 96kHz 24bits 5.1 channels LPCM audio track.
There's only 1 title splitted in 9 chapters, each one containing a song as usual, and here's the issue.
I want to rip each song to a FLAC file, but chapter markers are only seen by players (ex. VLC, Media Player Classic, etc.), while any rip software (ex. Handbrake, MakeMKV) sees a single chapter.
I'm not in touch with Bluray structures, but I've always been able to rip Bluray disc, all the times but this.
On this disk the structure is in the IISVPL/00000.vps file containing this:
[INDENT]MPLS0100 : ¦ 8 h `00000M2TS ›üÀ øðç > A €deng eng Ž
›üÀÿÿ ý¹úÿÿ D^Yÿÿ ‚Z ÿÿ Ñûÿÿÿ ì jÿÿ |þRÿÿ ì ÿÿ iŠöÿÿ CD4ÿÿ PLEX D Þ ÿÿ ( #& Yes - Fragile (multiAVCHD) –
( #&
00:00:00 ÿÿÿÿ ( #&
00:08:35 ÿÿÿÿ ( #&
00:10:18 ÿÿÿÿ ( #&
00:11:48 ÿÿÿÿ ( #&
00:19:57 ÿÿÿÿ ( #&
00:20:35 ÿÿÿÿ ( #&
00:24:06 ÿÿÿÿ ( #&
00:26:48 ÿÿÿÿ ( #&
00:29:50 ÿÿÿÿ ( #&
00:41:20 ÿÿÿÿ $ [/INDENT]


How can I rip any chapters to the related FLAC file?

Thanks and best regards.

Woodstock
Posts: 5372
Joined: Sun Jul 24, 2011 11:21 pm

Re: How to convert PCM into Flac

Post by Woodstock » Sun May 22, 2016 1:40 pm

If it were a DVD, you could manually specify that it rip by chapter, but that's not available for BD at this point.

Were I doing this, I would go ahead and rip the entire file to MKV, then use an application like Audacity to export the individual songs to their own file. This actually allows better precision than chapter markers.
How to aid in finding the answer to your problem: https://www.makemkv.com/faq/item/8

paulster
Posts: 194
Joined: Sat Aug 20, 2011 6:54 pm

Re: How to convert PCM into Flac

Post by paulster » Fri Nov 11, 2016 2:51 pm

MKVtoolnix can split by chapter. So you can use MakeMKV to generate the MKV file and MKVtoolnix to split into chapter files. Then use something like eac3to to pull the FLAC files out of each chapter MKV.

Post Reply