justdan96 / tsMuxer

tsMuxer is a transport stream muxer for remuxing/muxing elementary streams, EVO/VOB/MPG, MKV/MKA, MP4/MOV, TS, M2TS to TS to M2TS. Supported video codecs H.264/AVC, H.265/HEVC, VC-1, MPEG2. Supported audio codecs AAC, AC3 / E-AC3(DD+), DTS/ DTS-HD.
Apache License 2.0
854 stars 144 forks source link

FLAC support #515

Closed czappiotr closed 2 years ago

czappiotr commented 2 years ago

Hello Is it possible for tsMuxer to see the FLAC audio decoder. ???

There are a lot of old blu-ray movies with a FLAC audio decoder and now the program cannot see them. It rejects this decoder.

It's nice if tsMuxer can see and mux with this audio decoder. greetings

lighterowl commented 2 years ago

The only way to incorporate FLAC into tsMuxer's Blu-Ray output (if I understand your request correctly) is to decode FLAC to PCM before its inclusion in the Blu-Ray transport stream. I don't think there's any way to stuff FLAC into a normal transport stream, let alone a Blu-Ray one - that codec is (sadly) completely unknown to the BR specification and thus even if we made TSes with FLAC audio tracks (not that it's possible or has been tried by anyone, AFAIK), no Blu-Ray player would be able to read them back anyway.

czappiotr commented 2 years ago

Oh, I understand. In fact, when I rip from the original, it is then PCM. The FLAC decoder appears in BDremux in the MKV format.

The question is whether tsMuxer can decode from FLAC to PCM and that the output should be PCM Decoder?

jcdr428 commented 2 years ago

Hi @czappiotr, tsMuxer is a muxer, not a transcoder. You can transcode the Flac stream to LPCM with ffmpeg, then mux into the m2ts with tsMuxer.

czappiotr commented 2 years ago

thank you but I can't run it. I downloaded the file but I don't have any application. I don't know how to convert to PCM. Can you help

lighterowl commented 2 years ago

Just use the command line to execute ffmpeg -i foobar.flac foobar.wav. If the FLAC track that you're trying to include is in a MKV container already, then you can just run ffmpeg -i foobar.mkv foobar.wav and ffmpeg will select the first audio track and decode it. Assuming that the first audio track in your MKV is the FLAC one that you're interested in, this will work. Otherwise, you'll have to use the -map argument to point ffmpeg to use the correct track, or use mkvextract to extract the FLAC to a stand-alone file, and then decode it.