Skip to main content

Topic: Extract FLAC from MKV and Convert to AC3? (Read 12915 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • consultant
  • [*]
Extract FLAC from MKV and Convert to AC3?
I've having the toughest time figuring out how to extract the FLAC audio from an MKV and then convert it to AC3 so I can remux to a VOB or m2ts to play via USB HDD on my Playstation 3.

I tried the MKVExtract in MKVToolnix.  MKCEXtractGUI won't demux FLAC.  So I tried command line like this:

mkvextract --no-ogg source.mkv 1:video.264 2:audio.flac

It is interesting even though I used --no-ogg options the status message still says it is writting to ogg container. Does the no-ogg option not work so this is causing the problem?

Then I tried EAC2ToGUI and I get "the format of the source file cannot be detected"  I get a similar error if I try to play the .FLAC file in VLC but after it displays
the error, it plays fine anyway.

Help!

  • UED77
  • [*]
Extract FLAC from MKV and Convert to AC3?
Reply #1
I tried to reproduce your situation, but everything works fine for me. I'm using mkvextract v3.2.0 "Beginnings".

First, I created an MKV file with mkvmerge by importing the H.264 video from another MKV and a (native) FLAC file. Then I used for the following mkvextract command line:
Code: [Select]
C:\apps\mkvmerge>mkvextract tracks --no-ogg C:\test\muxed.mkv 2:"C:\test\demuxed.flac"

Extracting track 2 with the CodecID 'A_FLAC' to the file 'C:\test\demuxed.flac'.
Container format: raw data
Progress: 100%


The resulting file is a native FLAC file. Are you using the latest version of mkvtoolnix?
UED77
wavpack 4.50 -hx3; lame 3.97 -V4 --vbr-new

  • DVDdoug
  • [*][*][*][*][*]
Extract FLAC from MKV and Convert to AC3?
Reply #2
I don't know if it will work with your file, but SUPER[/color] (FREE!!!) has helped me with "difficult formats" a few times. (It does support MKV & FLAC).

  • probedb
  • [*][*][*][*][*]
Extract FLAC from MKV and Convert to AC3?
Reply #3
Have you tried Handbrake? That'll convert audio to AAC/MP3 which is compatible with the PS3 (or at least it'll play anyways). Not sure if Handbrake can deal with FLAC tho it is good with most stuff.

  • cathywht
  • [*]
Extract FLAC from MKV and Convert to AC3?
Reply #4
Google is your friend. Google search "Techisky convert MKV FLAC to AC3" to easy solve your issue.

  • Rollin
  • [*][*][*][*]
Extract FLAC from MKV and Convert to AC3?
Reply #5
ffmpeg
ffmpeg.exe -i file.mkv -vn -acodec ac3 -ab 320k file.ac3
You will get ac3 file with bitrate 320 kbps

Extract FLAC from MKV and Convert to AC3?
Reply #6
I've found XMedia Recode to be the best tool for this kind of thing.
Music washes away from the soul the dust of everyday life.

  • nastea
  • [*][*]
Extract FLAC from MKV and Convert to AC3?
Reply #7
I've having the toughest time figuring out how to extract the FLAC audio from an MKV and then convert it to AC3 so I can remux to a VOB or m2ts to play via USB HDD on my Playstation 3.

I tried the MKVExtract in MKVToolnix.  MKCEXtractGUI won't demux FLAC.  So I tried command line like this:

mkvextract --no-ogg source.mkv 1:video.264 2:audio.flac

It is interesting even though I used --no-ogg options the status message still says it is writting to ogg container. Does the no-ogg option not work so this is causing the problem?

Then I tried EAC2ToGUI and I get "the format of the source file cannot be detected"  I get a similar error if I try to play the .FLAC file in VLC but after it displays
the error, it plays fine anyway.

Help!


First of all, there's no flac-audio in an mkv file. Chances are that the sound is already stored as AC3 in the mkv file, with up to 6 channels.
Maybe its a good idea to extract the sound to wav, and afterwards convert the wav to the type of AC3 you need.
For extracting the sound of any video file, you might give these programs a try:
Quick Media Converter, Aura Video to Audio Converter
(they helped me out in similar situations)
Good luck!
  • Last Edit: 04 January, 2013, 07:30:36 AM by nastea

  • Soap
  • [*][*][*][*][*]
Extract FLAC from MKV and Convert to AC3?
Reply #8
First of all, there's no flac-audio in an mkv file.


Come again?

The simplest of Google searches would quickly show that this is an increasingly common situation with poor hardware and software decoding support (thus the question).  Or did you just think that all the other replies failed to catch such a blatant error?
  • Last Edit: 04 January, 2013, 07:26:32 AM by Soap
Creature of habit.

  • nastea
  • [*][*]
Extract FLAC from MKV and Convert to AC3?
Reply #9
First of all, there's no flac-audio in an mkv file.


Come again?

The simplest of Google searches would quickly show that this is an increasingly common situation with poor hardware and software decoding support (thus the question).  Or did you just think that all the other replies failed to catch such a blatant error?


I've just never seen it, all the mkv movies I ever played on my pc had AC3 or MPEG AAC Audio (mp4a) as soundstream.

  • Soap
  • [*][*][*][*][*]
Extract FLAC from MKV and Convert to AC3?
Reply #10
I've never seen a kangaroo, but if someone asked me how to extract a Joey from  its mother's pouch I wouldn't tell OP kangaroo's don't exist!
Creature of habit.

  • nastea
  • [*][*]
Extract FLAC from MKV and Convert to AC3?
Reply #11
I've never seen a kangaroo, but if someone asked me how to extract a Joey from  its mother's pouch I wouldn't tell OP kangaroo's don't exist!


Your kangaroo talk isn't really helping the OP.
But even if sometimes flac is used in mkv files that does not make much of a difference regarding the suggestions I did for how to extract the sound etc.
  • Last Edit: 04 January, 2013, 07:57:32 AM by nastea

  • Kohlrabi
  • [*][*][*][*][*]
  • Global Moderator
Extract FLAC from MKV and Convert to AC3?
Reply #12
I've never seen a kangaroo, but if someone asked me how to extract a Joey from  its mother's pouch I wouldn't tell OP kangaroo's don't exist!


Your kangaroo talk isn't really helping the OP.
How was your misinformation about MKV any more helpful? MKV can store virtually any audio or video codec, just because certain dubious sources use it to spread movies across the net with certain codecs doesn't mean it's limited to that.

Also, this thread already has a plethora of good solutions to the problem at hand. For completeness' sake, let's have the full ffmpeg commandline to mux to MPEG2-TS:
Code: [Select]
ffmpeg -i videofile -i audiofile.mkv -c:v copy -c:a ac3 -b:a 448k -c:s copy out.m2ts

If the MKV containing the FLAC does also contain the video stream, you can of course omit the "-i videofile". Also you may have to specify the number of channels for ac3 encoding if the FLAC is multichannel ("-ac 6").
  • Last Edit: 04 January, 2013, 08:30:22 AM by Kohlrabi
It's only audiophile if it's inconvenient.