Extracting LPCM from MKV?
#1
Question 
Hello.

I'm in the process of trying to convert a few files and need some help.

The files I'm trying to convert are MKV files created with MakeMKV from a Bluray source, and have LPCM sound. What I'm trying to do is to convert these LPCM sound tracks to FLAC.

I'm using Ubuntu 10.04, 64-bit, and any advice on what software to use would be greatly appreciated. If I can transcode within the mkv, then great, if not, could someone please recommend a working way to demux the sound track so I can use the FLAC encoder on it, then remux with mkvtoolnix?

Thanks. Smile
Reply
#2
Try avidemux.
Reply
#3
Thanks for the help but unfortunately that doesn't seem to work. I loaded the mkv into avidemux, and selected "Audio --> Save", but got the following error:

Code:
Assert failed :nbLaces<MKV_MAX_LACES
at line 213, file /build/build-avidemux_2.5.3-1~getdeb1-amd64-aSAHqC/avidemux-2.5.3/avidemux/ADM_inputs/ADM_matroska/ADM_mkv_audio.cppADM_backTrack
mkvAudio::getPacket(unsigned char*, unsigned int*, unsigned int*, unsigned int*)
mkvAudio::getPacket(unsigned char*, unsigned int*, unsigned int*)
ADM_Composer::getAudioPacket(unsigned char*, unsigned int*, unsigned int*)
A_saveAudio(char*)
A_audioSave(char*)
FileSel_ReadWrite(void (*)(char const*), int, char const*, char const*)
avidemux2_gtk() [0x540138]
HandleAction(Action)
guiCallback(_GtkMenuItem*, void*)
g_closure_invoke

g_signal_emit_valist
g_signal_emit
gtk_widget_activate
gtk_menu_shell_activate_item


g_closure_invoke

The program seemed a bit complex for what I'm trying to achieve anyway. All I really need is a way to extract the LPCM to a separate file (WAV or AIFF or whatever) so I can use the FLAC encoder on it.

Any more suggestions?
Reply
#4
You could probably use mkvextract not used it in linux myself ?
Reply
#5
mplayer with the -dumpaudio flag comes to mind.
Reply
#6
@X, I tried mkvextract, but it seems to have a problem with the LPCM track.

@bobo1on1, thanks for the tip. I'll try that and see what happens.
Reply
#7
Exclamation 
Ok, I tried mplayer -dumpaudio, and I got a file of the correct size, but it won't play in anything and FLAC won't work on it. The command I used was:
Code:
mplayer -dumpaudio -dumpfile audio.lpcm myfile.mkv

Did I do something wrong?
Reply
#8
That would dump the audio encoded i suspect.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#9
Encoded as what? I thought PCM was pretty much uncompressed? What format should it be dumped into for FLAC to be able to encode it, and can I do that with mplayer?
Reply
#10
*bump* - Anyone?
Reply
#11
ffmpeg -i someinfile -acodec flac -o someoutfile.flac
That should work.
Reply
#12
Thanks bobo1on1 - that worked!
Reply
#13
why was this necessary?

I'm curious because I use makemkv to do lossless rips and I like it that way.. however, my only two LPCM blu's I've done so far do not produce any audio in XBMC.

Even after finally getting the DTS-MA and TrueHD logos to appear on my AVR I still get the silent treatment from the LPCM mkv's.. MPC plays the same files perfectly.. my AVR just says "PCM" though?

hmm..
Reply

Logout Mark Read Team Forum Stats Members Help
Extracting LPCM from MKV?0