How to convert PCM into Flac
-
- Posts: 70
- Joined: Sat Mar 07, 2009 10:12 am
How to convert PCM into Flac
There are a handful of movies out there that don't contain any TrueHD or DTS-MA audio track but have a high definition PCM audio track which various media players will have problems with. You can convert the audio stream into lossless Flac to improve compatibility, this will also work on TrueHD and DTS-MA also if you wish to move away from those codecs but keep audio quality.
1) Rip movie with MakeMKV taking only the PCM audio track.
2) Download FFmpeg binary and open a command prompt (in windows hold shift then right click on the folder).
4) Enter in ffmpeg -i filename.mkv -acodec flac filename.flac
5) Start MKVmerge and add both the original mkv file and your new flac audio track to mux a new file
No more problems after that, hope that helps some others who ran into this problem.
(Thx skittle for tip)
1) Rip movie with MakeMKV taking only the PCM audio track.
2) Download FFmpeg binary and open a command prompt (in windows hold shift then right click on the folder).
4) Enter in ffmpeg -i filename.mkv -acodec flac filename.flac
5) Start MKVmerge and add both the original mkv file and your new flac audio track to mux a new file
No more problems after that, hope that helps some others who ran into this problem.
(Thx skittle for tip)
Last edited by Icanseestars on Mon May 16, 2011 11:10 am, edited 2 times in total.
Re: How to convert PCM into Flac
or just skip the mkvmerge/mkvextract process and use ffmpeg directly, it can even mux everything while transcoding to save time.
Re: How to convert PCM into Flac
Can you be more specific with the ffmpeg shortcut? Here is my mkv content
filename = movie.mkv
track01 - main video/movie
track02 - ac3 5.1 audio track
track03 - pcm 5.1 audio track
track04 - subtitle
How do you transcode track03 to flac format and mux it back at the same time with ffmpeg? Thanks
filename = movie.mkv
track01 - main video/movie
track02 - ac3 5.1 audio track
track03 - pcm 5.1 audio track
track04 - subtitle
How do you transcode track03 to flac format and mux it back at the same time with ffmpeg? Thanks
Re: How to convert PCM into Flac
This may work:
Code: Select all
ffmpeg -i movie.mkv -vcodec copy -acodec copy -acodec flac -ac 6 -scodec copy output_file.mkv
Re: How to convert PCM into Flac
wow good god! how did you get that? I had been reading the official guideline but I never get that kind of insight... wow u guys are really smart... thanks
btw, I also find that after converting pcm -> flac audio, (command = ffmpeg -i pcm_track.mka -acodec flac flac_track.mka) the resulted flac track is downsampled from 24-bit to 16-bit... is that a problem? is there anyway to preserve the 24-bit? or does it really matter here?
thanks
btw, I also find that after converting pcm -> flac audio, (command = ffmpeg -i pcm_track.mka -acodec flac flac_track.mka) the resulted flac track is downsampled from 24-bit to 16-bit... is that a problem? is there anyway to preserve the 24-bit? or does it really matter here?
thanks
Re: How to convert PCM into Flac
Other than reduced audio quality, no.cpmame wrote:is that a problem?
TBH I have no idea.cpmame wrote:is there anyway to preserve the 24-bit?
-
- Posts: 86
- Joined: Thu Nov 11, 2010 5:58 pm
Re: How to convert PCM into Flac
You should use eac3to to convert LPCM to flac. It will do a full lossless conversion.
The easiest way is to rip the movie with MakeMKV > use eac3to to convert LPCM to flac > remux with mkvmerge. You can use eac3to in command line, or there are a few GUI's.
The easiest way is to rip the movie with MakeMKV > use eac3to to convert LPCM to flac > remux with mkvmerge. You can use eac3to in command line, or there are a few GUI's.
-
- Posts: 70
- Joined: Sat Mar 07, 2009 10:12 am
Re: How to convert PCM into Flac
You can use Staxrip as a UI to eac3to, just set the video to "just mux" so it will copy the stream, it will retain subtitles and chapter data from the original mkv file too. You will have to create a Flac profile in the audio section and you can do 24-bit Flac.
Re: How to convert PCM into Flac
Hey guys, sorry for bumping an old thread, but I'm in desperate need of help. I've got a particular MKV that contains a LPCM track, and I've never had trouble before now in using the HdBrStreamExtractor GUI for eac3to to extract a LPCM track to separate WAV files. However this particular MKV simply will not load in any of the eac3to front ends, so I'd like to try and use ffmpeg. But I am a total noob with it and not sure how to even get to the point where I can run commands, because I'm not sure how to install it or use it. The ffmpeg website itself seems geared towards developers and coders and simply beyond my understanding. Can someone simplify what I need to do to get this working? Many thanks
Re: How to convert PCM into Flac
File information:
Extract first audio track to a single wav file:
eac3to should be able to split that, I think.
Code: Select all
ffmpeg -i /path/to/mkv/file
Code: Select all
ffmpeg -i /path/to/mkv/file -vn -sn -acodec copy /path/to/output/file.wav
Re: How to convert PCM into Flac
I've encountered this before. Try running mkclean --remux <mkv file> and then use eac3to against the cleaned file.steagle wrote:However this particular MKV simply will not load in any of the eac3to front ends
mkclean is a free download.
Re: How to convert PCM into Flac
Thanks guys, but I'm kind of back where I started, in not being familiar with how to build/install these programs in order to run them at the command line. I'm a front end kind of guy what can I say Paulster, if you wouldn't mind could you explain how to install Mkclean?
Re: How to convert PCM into Flac
You can download mkclean from http://www.matroska.org/downloads/mkclean.html
It doesn't need installing, just extracting to a folder.
So, if for example, you extract it to C:\TEMP then you'd do the following to clean it:
Start -> Run -> cmd (this will bring up a DOS prompt)
cd \<folder where your mkv file is> e.g. cd \mkvs\newmovie
c:\temp\mkclean --remux <mkv filename>.mkv
This will give you a second mkv file called clean.<original filename> in the same folder.
If your mkvs are on a different drive then the first command after opening the DOS prompt will be the drive letter followed by a colon, so for instance if the mkvs were on drive F: then you'd type the following:
Start -> Run -> cmd (this will bring up a DOS prompt)
F:
cd \<folder where your mkv file is> e.g. cd \mkvs\newmovie
c:\temp\mkclean --remux <mkv filename>.mkv
It doesn't need installing, just extracting to a folder.
So, if for example, you extract it to C:\TEMP then you'd do the following to clean it:
Start -> Run -> cmd (this will bring up a DOS prompt)
cd \<folder where your mkv file is> e.g. cd \mkvs\newmovie
c:\temp\mkclean --remux <mkv filename>.mkv
This will give you a second mkv file called clean.<original filename> in the same folder.
If your mkvs are on a different drive then the first command after opening the DOS prompt will be the drive letter followed by a colon, so for instance if the mkvs were on drive F: then you'd type the following:
Start -> Run -> cmd (this will bring up a DOS prompt)
F:
cd \<folder where your mkv file is> e.g. cd \mkvs\newmovie
c:\temp\mkclean --remux <mkv filename>.mkv
Last edited by paulster on Sun Jan 15, 2012 2:10 am, edited 1 time in total.
Re: How to convert PCM into Flac
Thanks! For Mac OS, it's not liking the double dash before remux. Is there a different command for Terminal users?
Re: How to convert PCM into Flac
I'm not familiar with MacOS but I just noticed the mistake in my post (now corrected) that I left a space after the double dash. There shouldn't be; it should be --remux.
Hope that helps.
Hope that helps.