Log in

View Full Version : open source MLP/TrueHD decoder


jruggle
20th October 2007, 00:43
Hi,

I just wanted to point out that there is a thread on FFmpeg-devel with a patch to decode MLP/TrueHD audio. It has not yet been included in FFmpeg and is still being revised by the author, Ian Caulfield, but it's still interesting to experiment with in the meantime.

Check out the thread here:
http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2007-October/thread.html#36628

madshi
20th October 2007, 00:55
Wow, this is unexpected!! :eek:

Absolutely great - though...

http://madshi.net/icon_crazy.gif

Mc Onyx
20th October 2007, 12:05
Awesome, that's really wonderfull news! I dream of FFDShow combined with E-AC3 and TruHD decoders from FFMPEG, someday...
Thanks for the news...

Thunderbolt8
20th October 2007, 13:48
is eac3 already supported or is this "only" planned yet to be done?
any information about dts-hd? is there anything related planned to be able to decode the full track and not only the core sometime in the future? then the complete audio support for HD DVDs and Blue-Rays would be perfect with ffdshow :)

edit: just to be 100% sure, when the final version is done it is planned to work without applying DRC, downconverting to 16-bit and applying dialog normalization, right?

Wilbert
21st October 2007, 14:00
Great stuff! I was afraid we needed to wait a long time for this, but i guess Xmas is early this year :)

patul
22nd October 2007, 02:51
What an excellent news.. the wait will finally over soon..

Thanks for the news..

Adub
22nd October 2007, 06:10
yeah eac3 is supported through a patch to mplayer and ffmpeg, it just hasn't been added completely, and ffdshow still hasn't added it yet either. So it's there just not being used all of the way yet.

qyot27
25th October 2007, 06:12
Awesome. I suppose that DVD-Audio tools can come to better fruition now as a result also.

On the flip side, I wonder how long it'll take to get a working open-source encoder for it.

qubic
28th October 2007, 00:08
Hi

Anyone successfully patched ffmpeg/mplayer?

regards qubic

Kurtnoise
30th October 2007, 17:37
Anyone successfully patched ffmpeg/mplayer?
http://kurtnoise.free.fr/index.php?dir=misc/

Thunderbolt8
30th October 2007, 19:34
wow, does that mean MLP and eac3 do work now already properly in this version, without applying DRC and normalization?

will DTS-HD also be supported in the future? would be great, then we got all new HD sounds covered :)

nightcity
3rd December 2007, 18:14
I added Kurtnoise's eac3 code into ffdshow on my pc, it works, but there is noise in left channel, the other 4 channels are all ok(I tested it on 2 HD-DVD discs), does any one has any idea with the problem?

Jjeje007
3rd December 2007, 19:34
Hi,

The ffmpeg team included the true-hd/mlp patch into the main branch five days ago :D

Jjeje007

Wilbert
3rd December 2007, 21:40
The ffmpeg team included the true-hd/mlp patch into the main branch five days ago
They included the parser, not the decoder.

Adub
3rd December 2007, 22:17
Why not include the decoder as well? What good is the parser without the decoder?

Is it that they don't think it is quite "ready"?

Wilbert
3rd December 2007, 22:53
Is it that they don't think it is quite "ready"?
Yes, indeed. They are still discussing and correcting it:

http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2007-December/038902.html

sl1pkn07
4th December 2007, 16:26
http://kurtnoise.free.fr/index.php?dir=misc/

thanks for the ffmpeg pach!

Jjeje007
4th December 2007, 17:12
They included the parser, not the decoder.

Oups i thought they included both :o
Any way, i think this will append soon (hope so)

Jjeje007

sl1pkn07
4th December 2007, 18:37
@kurtnoise13

your patch failed on rev. 11162


sl1pkn07@SpinFlo:~/aplicaciones/ffmpeg-svn$ cat ffmpeg_eac3_mlp_r11045.patch | patch -p0 --dry-run
patching file ffmpeg.c
Hunk #1 succeeded at 1621 (offset 1 line).
patching file libavcodec/aac_ac3_parser.c
patching file libavcodec/aac_ac3_parser.h
patching file libavcodec/aac_parser.c
patching file libavcodec/ac3.c
patching file libavcodec/ac3.h
patching file libavcodec/ac3_parser.c
patching file libavcodec/ac3dec.c
Hunk #2 FAILED at 66.
Hunk #6 FAILED at 230.
Hunk #8 FAILED at 368.
3 out of 25 hunks FAILED -- saving rejects to file libavcodec/ac3dec.c.rej
patching file libavcodec/ac3dec.h
patching file libavcodec/ac3enc.c
patching file libavcodec/ac3tab.c
patching file libavcodec/ac3tab.h
patching file libavcodec/allcodecs.c
Hunk #2 FAILED at 286.
1 out of 2 hunks FAILED -- saving rejects to file libavcodec/allcodecs.c.rej
patching file libavcodec/avcodec.h
Hunk #1 succeeded at 274 (offset 1 line).
patching file libavcodec/eac3.h
patching file libavcodec/eac3dec.c
patching file libavcodec/Makefile
Hunk #3 FAILED at 321.
1 out of 3 hunks FAILED -- saving rejects to file libavcodec/Makefile.rej
patching file libavcodec/mlp_parser.c
patching file libavcodec/mlp_parser.h
patching file libavcodec/mlpdec.c
patching file libavformat/allformats.c
Hunk #1 succeeded at 72 with fuzz 1 (offset -3 lines).
Hunk #2 succeeded at 94 (offset -3 lines).
patching file libavformat/Makefile
Hunk #1 succeeded at 41 (offset -2 lines).
Hunk #2 succeeded at 75 (offset -2 lines).
patching file libavformat/raw.c
patching file libavformat/wav.c
sl1pkn07@SpinFlo:~/aplicaciones/ffmpeg-svn$

Kurtnoise
5th December 2007, 16:10
well...wait a couple of days. the decoder should be committed in the svn soon.

Jjeje007
13th December 2007, 12:36
Hi,

Here is the updated patch for the TrueHD/mlp decoder for mplayer svn :

http://www.db-instable.org/misc/truehd-decoder.patch

It compil fine this the latest mplayer svn but how to enable it (in codecs.conf ?) ?

Jjeje007

rack04
19th December 2007, 16:14
Where can I get the latest ffmpeg that includes the latest patches?

KpeX
6th January 2008, 17:46
It compil fine this the latest mplayer svn but how to enable it (in codecs.conf ?)

Something like this is working here:

audiocodec ffmlp
info "MLP"
status buggy
format 0x0
driver ffmpeg
dll "mlp"

Then playback with mplayer -demuxer lavf -ac ffmlp gives output similar to the following:

==========================================================================
Forced audio codec: ffmlp
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
[mlp @ 0xd4b940]Extracting 2 channel downmix from substream 0. Further substreams will be skipped.
AUDIO: 48000 Hz, 2 ch, s16le, 0.0 kbit/0.00% (ratio: 0->192000)
Selected audio codec: [ffmlp] afm: ffmpeg (MLP)
==========================================================================

qubic
24th January 2008, 10:08
hi

any video samples, with TrueHD, somewhere?

and what is the command line for mplayer?

regards qub

frenchglen
27th January 2008, 08:57
I can't wait for this to be finished! I am going to convert all my DVD-Audio discs to MLP and have a HD music library! No need for FLAC!

madshi
27th January 2008, 10:25
I can't wait for this to be finished! I am going to convert all my DVD-Audio discs to MLP and have a HD music library! No need for FLAC!
What advantage does MLP have over FLAC for your needs?

frenchglen
27th January 2008, 12:19
What advantage does MLP have over FLAC for your needs?
One less step in the ripping process. Saves time, and the (always present if extremely unlikely) possibility of digital error (since I have a fair amount of discs - I'm a DVD-A fan).

+ it will let me easily tell in my media library which files are from dvd-audio and which are all my lower resolution ones. It's an added bonus to set them apart because they're very special anyway. :p

And essentially, MLP has quite a good compression rate already (since it was made to fit on a disc), so FLAC doesn't really become necessary if all I want to do is play these files back in my media library on a HTPC. An MLP file of 213MB becomes about a 200MB FLAC file with eac3to.

madshi
27th January 2008, 17:13
One less step in the ripping process. Saves time, and the (always present if extremely unlikely) possibility of digital error (since I have a fair amount of discs - I'm a DVD-A fan).

+ it will let me easily tell in my media library which files are from dvd-audio and which are all my lower resolution ones. It's an added bonus to set them apart because they're very special anyway. :p

And essentially, MLP has quite a good compression rate already (since it was made to fit on a disc), so FLAC doesn't really become necessary if all I want to do is play these files back in my media library on a HTPC. An MLP file of 213MB becomes about a 200MB FLAC file with eac3to.
Ok, makes sense.

But you cannot add meta data to MLP, right? I mean things like artist name, album name, title name etc.

frenchglen
28th January 2008, 23:53
Ok, makes sense.

But you cannot add meta data to MLP, right? I mean things like artist name, album name, title name etc.
That's interesting, didn't think of that. That brings back a need for FLAC then. :o I might convert them one day but I'm liking the prospect of just ripping to MLP for now, as a first step.

--

But what I'm wondering and hoping, is when there will be an open source MLP encoder? It would be integrated into eac3to, but even better, dvda-author, which its coder Dave Chapman started to work on again just a few months ago. Inability to encode MLP (cheaply/freely) has been the one thing to set back DVD-A authoring the way it should be.

If the guys at FFmpeg have reverse-engineer MLP, then surely they can write an encoder for it, right? Wouldn't it be great to finally be able to burn off your own tracks to DVD-A as easily as a CD. Yeah, there's the watermarking detection in standalone players, but I've come to realise that [at least for music, at the moment], physical media is going right out and downloadable files will be the new standard - we just need the flexibility to author our own DVD-As now.

bertox
29th January 2008, 05:16
Flac is the most...but an MLP directshow decoder.., i could use it for previewing my ripped DVD-As before encoding to flac and listen with the marvellous foobar2000 KernelStreaming Output.

I wait for it.

madshi
29th January 2008, 09:09
But what I'm wondering and hoping, is when there will be an open source MLP encoder?
I'm not aware of anyone working on such a thing.

If the guys at FFmpeg have reverse-engineer MLP, then surely they can write an encoder for it, right?
Yeah, maybe. But someone would have to invest a lot of his free time to make this happen.

bertox
29th January 2008, 15:09
free time....jajajaj:D

fenton06
21st February 2008, 21:25
has anyone gotten this to work on mplayer? I have the eac3 working w/o issues, now I jstu need to get the TrueHD going and I'll be set

I applied the patch, and added this to codecs.conf.:

audiocodec ffmlp
info "MLP"
status buggy
format 0x0
driver ffmpeg
dll "mlp"

I have a problem though, using:

mplayer -ac help | grep ffmlp

doesn't work

thanks!

Wilbert
5th July 2008, 23:19
well...wait a couple of days. the decoder should be committed in the svn soon.
The decoder is committed (http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2008-July/049456.html)!!!
Ramiro will even make an encoder :)

Snowknight26
5th July 2008, 23:27
TrueHD decoder in ffmpeg? <3

Inventive Software
6th July 2008, 15:44
Sweeeeeeeeeeeeet! :D

Snowknight26
6th July 2008, 16:58
Is it a whole new library or is it part of an existing one, say libavcodec?

Inventive Software
6th July 2008, 18:42
I think it's part of libavcodec. :)

kkloster21
12th October 2008, 01:59
has anybody actually been able to use mplayer to decode and play (stream) a trueHD track (while playing a blu-ray disc for example)?

i've tried to use

$ mplayer -aid 4352 -ac ffmlp -channels 6 -

to play from stdin, but it doesn't work. i get video but it says "NO AUDIO!"

Jjeje007
21st October 2008, 20:14
has anybody actually been able to use mplayer to decode and play (stream) a trueHD track (while playing a blu-ray disc for example)?

i've tried to use

$ mplayer -aid 4352 -ac ffmlp -channels 6 -

to play from stdin, but it doesn't work. i get video but it says "NO AUDIO!"

Should work better like this :

$ mplayer -demuxer lavf -aid [1-x] -ac ffmlp -channels 6 -

the -aid switch with lavf demuxer start at "1" ;)

EDIT : And yes, i already been able to play TrueHD track

Jjeje007

kkloster21
21st October 2008, 21:07
@Jjeje007: I've tried that before too, with the lavf demuxer and starting the aid at 1 (or 2, 3, etc.) but i can never get any audio. what version of mplayer and ffmpeg are you running? svn of both? what sound card are you using? i'm starting to wonder if its the drivers for my sound card.

i've started a thread about this here:

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

there is some more info on the problems i'm having. if you have time to look and give me some feedback i'd really appreciate it.

I'm interested in hearing more about your setup Jjeje007 since you have it working.

it's encouraging to hear that somebody has got TrueHD playing!

kkloster21
10th November 2008, 18:38
is there anyone else who has successfully decoded and played a trueHD track with the MLP/TrueHD decoder that has been integrated into ffmpeg?

I've tried to do it in mplayer with and without the lavf demuxer. is the lavf demuxer necessary to decode trueHD? the lavf demuxer just halts mplayer in the console for most blu-rays that i have tried so i've tried not specifying a demuxer and that doesn't work either. I am using the svn mplayer.

any suggestions or advice from anyone? any help is appreciated.

madshi
10th November 2008, 18:59
eac3to uses the ffmpeg MLP/TrueHD decoder and so does a beta of ffdshow. eac3to works just fine. Not sure about ffdshow, but I think it works, too.

kkloster21
10th November 2008, 19:02
thanks for the reply madshi.

so it only works so far for apps that extract or rip data (video or audio) from blu-ray movies, not for apps that play (stream) movies from stdin as they are decrypted (mplayer for example)?

madshi
10th November 2008, 19:47
ffdshow is a DirectShow decoder package, not a ripping tool.

kkloster21
10th November 2008, 22:36
sorry, my mistake.

it looks like ffdshow is only for windows but if the core of ffdshow is the libavcodec library than shouldn't ffmpeg (which i think uses the same library) have the same capability (i.e. be able to decode trueHD tracks)?

i am running linux and trying to find a way to play blu-rays that have trueHD tracks (but play them from the disc).

madshi
10th November 2008, 22:48
Cannot help you with Linux. You can try posting to the ffmpeg/libav users newslist. Maybe they can help...

880
10th June 2009, 04:52
Can this decoder decode 24-bit TrueHD?

The answer is yes.