Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Extract FLAC from MKV and Convert to AC3? (Read 18557 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

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!

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

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).

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.

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.

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.

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!

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?
Creature of habit.

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.

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.

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.

 

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").
It's only audiophile if it's inconvenient.