Log in

View Full Version : Guide: Blu-ray MKV remux


Pages : 1 [2]

zgx
10th April 2007, 10:27
OK thanks.

Darth Pinous, I've been having the same problem with Prestige:
whatever I do, I keep getting just noice. Any input zgx how did you manage to get it correctly?- Xport did not give me a proper RAW PCM file so I used graphedit instead. File Async -> Sonic HD Demuxer -> Dump

- Since FLAC.EXE has a 2GB output limit I had to split the RAW PCM files into smaller files and encode them separately. When I just splitted the file at a random place I got broken samples (reported by FLAC.EXE). So I figured out that each sample is 18 bytes long (24 bit * 6 channels / 8) and then I made sure the size of the split was dividable by 18 bytes. Then it was fine. I used the linux command "split" for the split. But should be a compile available for Windows somewhere. I also think hjsplit should do the work just fine. Just make sure it's a RAW PCM file you are splitting and not a WAV PCM file. If it's a WAV PCM file you need to know the exact size of the header in order to not get a broken sample.

- In the end I had 4 smaller FLAC files that I merged into a MKV file with the append function in mkvmerge.


PS. I still don't trust "Sonic Audio Decoder" 100%.. I am paranoid about it doing something with the dynamic range or changing the audio in some other way. Because of that I rather do the extra work of rearanging the channels with wavewizard. But if you trust it you can put it in before "dump" in the graph.

ACrowley
25th April 2007, 21:33
@zgx

About your SonicAudioDecoder Paranoia.

I though about the same, when i want to encode DD+ to AC3 and use SonicAudioDecoder-Dump

But, when you extract the raw through Sonic , its without the Header which takes the informations , so it should be untouched

Greets

Neo Fagin
31st May 2007, 04:27
I'm going to resurrect this thread just to add some input. On Pirates of the Caribbean: Curse of the Black Pearl, the LPCM audio appears to be unworkable using any of these methods. Big-endian, little endian, sonic, xport, anything. Finally, however, doing this:

Creating a graph in graphedit - latest haali splitter on the main .m2ts -> AC3filter

Creating a 2-line avs:
directshowsource("audio.grf",video=false)
GetChannels(1,2,3,6,4,5)

bepipe --script "import(^audio.avs^)" - | sox.exe -t wav -c 6 - out.wav

This appears to work fine, but only if the LPCM is the first audio stream.

AC3filter also needs to be set up to use SPDIF output and passthrough with no changes and all DRC/etc off. If SPDIF output wasn't enabled, I'd only get stereo and not 5.1 output. This is on my system, dunno about anyone else's.

Darth Pinous
1st June 2007, 10:10
I'm going to resurrect this thread just to add some input. On Pirates of the Caribbean: Curse of the Black Pearl, the LPCM audio appears to be unworkable using any of these methods. Big-endian, little endian, sonic, xport, anything.

if you use xport, the output is big endian ; if you use a graph with Sonic and Dump, the output is little endian.
Now remember that Disney LPCM audio tracks are 24/48, not 16/48. So if you use zgx guide, correct flac command should be :

flac -0 --force-raw-format --endian=big --channels=6 --bps=24 --sample-rate=48000 --sign=signed -o "temp.flac" - < bits0001.mpa

Neo Fagin
2nd June 2007, 00:00
if you use xport, the output is big endian ; if you use a graph with Sonic and Dump, the output is little endian.
Now remember that Disney LPCM audio tracks are 24/48, not 16/48. So if you use zgx guide, correct flac command should be :

flac -0 --force-raw-format --endian=big --channels=6 --bps=24 --sample-rate=48000 --sign=signed -o "temp.flac" - < bits0001.mpa

This still produces fax machine static for me, alas. I'm unsure what I could be doing wrong, as the LPCM plays perfectly fine via AC3filter, Sonic or Nero's decoder in a graph.

As AC3filter can input and output 24-bit LPCM it and avisynth appear to be a much simpler method of getting the audio out.

madshi
2nd June 2007, 23:08
Guys, to make your life a bit easier, I've just added PCM support to my eac3to tool. Here's the eac3to thread:

http://forum.doom9.org/showthread.php?t=125966

With eac3to you should be able to do:

eac3to some.pcm some.flac -blu-ray
Eac3to should be able to automatically detect the bitdepth (16 or 24 bit). Also the channels will be remapped correctly. And the FLAC encoding is done without file size limits. The encoding without size limits has one negative side effect, though: The final FLAC file doesn't contain information about how long it plays, so seeking is not possible. But if you mux the FLAC into e.g. a MKV container, that problem goes away.

Roscoe62
24th June 2007, 04:10
I tried remuxing two Blu-Ray with H264 video to MKV.

Seeking is impossible in the resulting MKV no matter which way I use.

It won't work with MKVMerge, GDSMux, GraphEdit Haali Splitter => HaaliMuxer. Neither m2ts => MKV nor m2ts => 264|ac3|dts => mkv works

No idea whats wrong here.

Just reiterating what Drecksoft said earlier - I'm having the same issue. The resulting mkv file will NOT seek. If anyone else has had this issue and solved it, please let me know how you did it! I just want an mkv file with the original h264 video and LPCM audio that can seek OK.

Any help is appreciated!

Selur
24th June 2007, 13:29
Same problem here. :(

dchard
27th June 2007, 13:37
I used your guide to demux LPCm track.

I compressed the demuxed LPCm track to flac: OK.

But when i try to decompress to wav, i got:

temp.flac: ERROR: stream is too big to fit in a single WAVE file chunk

Is there any way to override it?

Dchard

foxyshadis
27th June 2007, 14:26
It's totally dependant on what you're using to write the wav. If you want to avoid any compatibility problems, find an option to write to six mono waves, otherwise find one that'll ignore file length.

If your software doesn't provide that, go with one that does. Besweet definitely works, but make sure you get an up-to-date version.

ACrowley
27th June 2007, 15:28
I used your guide to demux LPCm track.

I compressed the demuxed LPCm track to flac: OK.

But when i try to decompress to wav, i got:

temp.flac: ERROR: stream is too big to fit in a single WAVE file chunk

Is there any way to override it?

Dchard

@Dchard

The best way imho to decompress flac to wave is in Audacity 1.3.3

Open the flac (16 or 24bit) in Audacity 1.3.3. Audacity will now decode Flac 5.1 to 6 mono channel wave (2.0 flac to 2 mono ch)
When you export the waves the channelorder is L R C LFE SL SR

mkanet
10th September 2010, 01:14
My apologies if I didnt post in the right place. However, I thought with all the sharp people reading this thread, someone might haev some news.

99% of the time, all I really want to do is simply remove a stream from an MKV container. Not to be confused with extracting a stream. The author of TS Muxer really hit the nail on the head when he made the perfect tool to do just that; except using TS containers instead of MKV.

For years, I have had no alternative but to do this in a cumbersome 2 step process using MKVExtract GUI/MKVMerge GUI. I'm wondering if there's a simple self-contained Windows executable that does exactly what TS Muxer does this in one easy step in the works.

sneaker_ger
10th September 2010, 01:38
I'm not really sure I got you, but what's the second step in "removing" a stream from an mkv? You don't need to use MKVExtract (GUI) - simply add your mkv to mkvmerge GUI, deselect the unwanted track and click on "mux". :confused: