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 6th August 2010, 17:30   #1  |  Link
lloydsmart
Registered User
 
lloydsmart's Avatar
 
Join Date: May 2009
Location: UK
Posts: 4
LPCM to FLAC within MKV?

Hello. Hopefully my thread title makes it pretty clear what I'm trying to achieve. Basically, I have some MKVs that were created by MakeMKV from a bluray source. These MKVs contain 5.1 LPCM audio tracks, and I'd like to convert these to 5.1 FLAC to save space. I don't mind demuxing and remuxing the file, but I'm having trouble extracting the LPCM track from the MKV files so that it can be processed by the FLAC encoder.

I should mention that I'm running on Ubuntu 10.04 64-bit, but will also consider any software that will run properly under Wine.

Can anyone help me? I've tried mkvdemux, tsMuxeR, Avidemux, eac3to, and mplayer with the -dumpaudio flag. No luck so far in producing a "normal" wav file that FLAC can process.

Any hints would be greatly appreciated. Thanks!
lloydsmart is offline   Reply With Quote
Old 6th August 2010, 18:36   #2  |  Link
b66pak
Registered User
 
b66pak's Avatar
 
Join Date: Aug 2008
Location: The Land Of Dracula (Romania - EU)
Posts: 934
cut a sample (20mb) with mkvmerge and post it (use mediafire)...make sure is playing proper before posting it!
_
__________________
if you ask a question and somebody give you the correct answer don't forget to leave a "thank you" note...
Visit The Land Of Dracula (Romania - EU)!

Last edited by b66pak; 6th August 2010 at 19:48.
b66pak is offline   Reply With Quote
Old 6th August 2010, 19:22   #3  |  Link
Ghitulescu
Registered User
 
Ghitulescu's Avatar
 
Join Date: Mar 2009
Location: Germany
Posts: 5,769
You want actually to demux an LPCM track from an MKV using any available linux(Ubuntu) software or any software that works under wine subsystem. Is this your question?

Maybe I'm wrong, but is flac able to cope with more than 2 channels? Sorry, I used it only for CD audio, that's all I need.
Ghitulescu is offline   Reply With Quote
Old 6th August 2010, 19:49   #4  |  Link
nurbs
Registered User
 
Join Date: Dec 2005
Posts: 1,460
Quote:
Originally Posted by Ghitulescu View Post
Maybe I'm wrong, but is flac able to cope with more than 2 channels? Sorry, I used it only for CD audio, that's all I need.
Yes, and even if you don't know that 5 seconds going to wikipedia and looking for the flac article will answer that question.
nurbs is offline   Reply With Quote
Old 6th August 2010, 23:26   #5  |  Link
lloydsmart
Registered User
 
lloydsmart's Avatar
 
Join Date: May 2009
Location: UK
Posts: 4
Here's a clip from the file as requested.

http://www.mediafire.com/?dj0om0202p1nkor
lloydsmart is offline   Reply With Quote
Old 7th August 2010, 01:23   #6  |  Link
TinTime
Registered User
 
Join Date: Jan 2009
Location: UK
Posts: 403
Quote:
Originally Posted by lloydsmart View Post
I've tried mkvdemux, tsMuxeR, Avidemux, eac3to, and mplayer with the -dumpaudio flag. No luck so far in producing a "normal" wav file that FLAC can process
How about using eac3to to produce a flac file directly?
TinTime is offline   Reply With Quote
Old 7th August 2010, 03:57   #7  |  Link
roozhou
Registered User
 
Join Date: Apr 2008
Posts: 1,181
If your mplayer can play this mkv, use fifo and mplayer -ao pcm:fast:file=xxx where xxx is the name of fifo.

Or you can directly convert LPCM to flac using ffmpeg:
Code:
ffmpeg -i input.mkv -vn -sn -acodec flac audio.flac
After that remux to mkv using mkvmerge.
roozhou is offline   Reply With Quote
Old 7th August 2010, 08:52   #8  |  Link
lloydsmart
Registered User
 
lloydsmart's Avatar
 
Join Date: May 2009
Location: UK
Posts: 4
Quote:
Originally Posted by roozhou View Post
Code:
ffmpeg -i input.mkv -vn -sn -acodec flac audio.flac
Thanks roozhou, that seems to have worked!
lloydsmart is offline   Reply With Quote
Old 7th August 2010, 18:53   #9  |  Link
b66pak
Registered User
 
b66pak's Avatar
 
Join Date: Aug 2008
Location: The Land Of Dracula (Romania - EU)
Posts: 934
this work for me (in WinXP SP3):
Code:
eac3to v3.22
command line: eac3to clip.mkv clip.flac
------------------------------------------------------------------------------
MKV, 1 video track, 1 audio track, 1 subtitle track, 0:00:13, 24p /1.001
1: h264/AVC, English, 1080p24 /1.001 (16:9)
2: RAW/PCM, English, 5.1 channels, 16 bits, 48kHz, -330ms
   "3/2+1"
3: Subtitle (PGS), English
Track 2 is used for destination file "clip.flac".
[a02] Extracting audio track number 2...
[a02] Reading RAW/PCM...
[a02] Applying RAW/PCM delay...
[a02] Encoding FLAC with libFlac...
[a02] Creating file "clip.flac"...
[a02] The original audio track has a constant bit depth of 16 bits.
Video track 1 contains 625 frames.
eac3to processing took 1 second.
Done.
_
__________________
if you ask a question and somebody give you the correct answer don't forget to leave a "thank you" note...
Visit The Land Of Dracula (Romania - EU)!

Last edited by b66pak; 7th August 2010 at 19:47.
b66pak is offline   Reply With Quote
Reply

Tags
5.1, flac, linux, lpcm, mkv

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 11:06.


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