Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > General > Audio encoding
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 11th December 2007, 18:52   #161  |  Link
Jjeje007
Registered User
 
Join Date: Mar 2006
Posts: 28
Hi,

Here is the updated patch which compil ok against the latest mplayer svn

http://www.db-instable.org/misc/eac3v4.patch

Jjeje007
Jjeje007 is offline   Reply With Quote
Old 12th December 2007, 04:01   #162  |  Link
skygod
Registered User
 
Join Date: Dec 2007
Posts: 12
Quote:
Originally Posted by Jjeje007 View Post
Here is the updated patch which compil ok against the latest mplayer svn

http://www.db-instable.org/misc/eac3v4.patch

Jjeje007
Thanks a million Both patch apply and mplayer compile was clean. Quick 'n dirty 2channel downmix testing on "sample-matrix2.evo" worked.
skygod is offline   Reply With Quote
Old 13th December 2007, 02:20   #163  |  Link
Jjeje007
Registered User
 
Join Date: Mar 2006
Posts: 28
Hi,

Just to let we know, i removed all the hacks regarding channel mapping done by tebasuna51. It look like that the devs started to rearrange channel mapping output in mplayer (i just check the log quickly).

Any way, the others hacks :

- Dialog Normalization attenuation disabled
- Dynamic Range Compression disabled
- Frames with "transient pre-noise processing" accepted and no more error (remove the fprint )

Are always done

Jjeje007
Jjeje007 is offline   Reply With Quote
Old 14th December 2007, 03:26   #164  |  Link
jruggle
Registered User
 
Join Date: Jul 2006
Posts: 276
Quote:
Originally Posted by Jjeje007 View Post
Hi,
Any way, the others hacks :

- Dialog Normalization attenuation disabled
- Dynamic Range Compression disabled
- Frames with "transient pre-noise processing" accepted and no more error (remove the fprint )
Do you have any E-AC3 samples which use transient pre-noise processing? If so, could you send a small snippet to ftp://upload.mplayerhq.hu/MPlayer/incoming ? It would help in implementing the missing feature.

Thanks,
Justin
jruggle is offline   Reply With Quote
Old 14th December 2007, 09:13   #165  |  Link
madshi
Registered Developer
 
Join Date: Sep 2006
Posts: 9,140
@Justin, is there a central place somewhere where we can always get the latest version of the E-AC3 decoder patches? That would be very helpful, as long as the decoder is not in the ffmpeg source tree yet. Thanks!
madshi is offline   Reply With Quote
Old 14th December 2007, 09:53   #166  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,915
Quote:
Originally Posted by jruggle View Post
Do you have any E-AC3 samples which use transient pre-noise processing? If so, could you send a small snippet to ftp://upload.mplayerhq.hu/MPlayer/incoming ? It would help in implementing the missing feature.
I use the sample-matrix2.evo from this Jjeje007 post
tebasuna51 is online now   Reply With Quote
Old 14th December 2007, 23:24   #167  |  Link
jruggle
Registered User
 
Join Date: Jul 2006
Posts: 276
Quote:
Originally Posted by madshi View Post
@Justin, is there a central place somewhere where we can always get the latest version of the E-AC3 decoder patches? That would be very helpful, as long as the decoder is not in the ffmpeg source tree yet. Thanks!
svn://svn.mplayerhq.hu/soc/eac3

I will routinely update it to current SVN until it is included in FFmpeg. Right now it's updated to work with FFmpeg-SVN r11200.

The checkout.sh script will always show what revision the patch should be applied against.
jruggle is offline   Reply With Quote
Old 15th December 2007, 09:30   #168  |  Link
madshi
Registered Developer
 
Join Date: Sep 2006
Posts: 9,140
Quote:
Originally Posted by jruggle View Post
svn://svn.mplayerhq.hu/soc/eac3

I will routinely update it to current SVN until it is included in FFmpeg. Right now it's updated to work with FFmpeg-SVN r11200.

The checkout.sh script will always show what revision the patch should be applied against.
Great - thanks!
madshi is offline   Reply With Quote
Old 16th December 2007, 12:46   #169  |  Link
baudi
Registered User
 
Join Date: Apr 2002
Posts: 34
New request

Could you implement a new functionality in ffmpeg_evo so that one can transform a DD+ or DTS-HD track inside an .EVO file applying PAL speedup (from 24fps to 25fps) over the target sound file on the fly?

Similar to eac3to.exe -speedup parameter.

Thanks.
baudi is offline   Reply With Quote
Old 16th December 2007, 16:42   #170  |  Link
jruggle
Registered User
 
Join Date: Jul 2006
Posts: 276
Quote:
Originally Posted by Jjeje007 View Post
Any way, the others hacks :

- Dialog Normalization attenuation disabled
- Dynamic Range Compression disabled
I'm working on a fix for this for FFmpeg. Dynamic range compression will not be disabled because the specification requires that it not be ignored. But the user will be given the option to adjust how much to apply, from 0% to 100%.

As far as dialog normalization, it will not be applied in the decoder, but simply transmitted to the user level.

Quote:
- Frames with "transient pre-noise processing" accepted and no more error (remove the fprint )
This one is now fixed in FFmpeg-SoC SVN.

Thanks,
Justin
jruggle is offline   Reply With Quote
Old 18th December 2007, 17:18   #171  |  Link
madshi
Registered Developer
 
Join Date: Sep 2006
Posts: 9,140
Quote:
Originally Posted by jruggle View Post
Dynamic range compression will not be disabled because the specification requires that it not be ignored. But the user will be given the option to adjust how much to apply, from 0% to 100%.
How can my program (which uses avcodec.dll) switch DRC on/off? Is there an API/function for that?

Quote:
Originally Posted by jruggle View Post
As far as dialog normalization, it will not be applied in the decoder, but simply transmitted to the user level.
I've just checked the latest SVN of the E-AC3 decoder and the output level is too low compared to the reference decoder (Nero). Is this DRC? Can't really be dialnorm cause the track I was testing had dialnorm set to 0.

Thanks!
madshi is offline   Reply With Quote
Old 19th December 2007, 00:04   #172  |  Link
jruggle
Registered User
 
Join Date: Jul 2006
Posts: 276
Quote:
Originally Posted by madshi View Post
How can my program (which uses avcodec.dll) switch DRC on/off? Is there an API/function for that?
Not yet. Although I am FFmpeg AC3 maintainer, adding a parameter to the public API adds changes to files which I do not maintain. My patch is currently pending review. It will probably be something like AVCodecContext->drc_scale with values of 0.0 to 1.0 to apply a percentage of DRC during decoding.

Quote:
I've just checked the latest SVN of the E-AC3 decoder and the output level is too low compared to the reference decoder (Nero). Is this DRC? Can't really be dialnorm cause the track I was testing had dialnorm set to 0.
It's probably the DRC. I hope it's the DRC. Are you referring to 5.1 decoding, stereo, or both?
jruggle is offline   Reply With Quote
Old 19th December 2007, 09:09   #173  |  Link
madshi
Registered Developer
 
Join Date: Sep 2006
Posts: 9,140
Quote:
Originally Posted by jruggle View Post
Not yet. Although I am FFmpeg AC3 maintainer, adding a parameter to the public API adds changes to files which I do not maintain. My patch is currently pending review. It will probably be something like AVCodecContext->drc_scale with values of 0.0 to 1.0 to apply a percentage of DRC during decoding.
Don't know how long "pending review" takes. But if it takes a bit longer, wouldn't it make sense to disable DRC temporarily - as long as there's no way to disable it manually? At least for my purposes (eac3to = audio transcoding) DRC is really bad. For transcoding I need the audio to be totally unprocessed.

Quote:
Originally Posted by jruggle View Post
Not yet. Although I am FFmpeg AC3 maintainer, adding a parameter to the public API adds changes to files which I do not maintain. My patch is currently pending review. It will probably be something like AVCodecContext->drc_scale with values of 0.0 to 1.0 to apply a percentage of DRC during decoding.

It's probably the DRC. I hope it's the DRC. Are you referring to 5.1 decoding, stereo, or both?
5.1 decoding. Didn't check anything else yet. If you want I can send you a WAV comparison sample between ffmpeg and Nero.

Last edited by madshi; 19th December 2007 at 09:13.
madshi is offline   Reply With Quote
Old 19th December 2007, 12:24   #174  |  Link
jruggle
Registered User
 
Join Date: Jul 2006
Posts: 276
Quote:
Originally Posted by madshi View Post
Don't know how long "pending review" takes. But if it takes a bit longer, wouldn't it make sense to disable DRC temporarily - as long as there's no way to disable it manually? At least for my purposes (eac3to = audio transcoding) DRC is really bad. For transcoding I need the audio to be totally unprocessed.
It won't take long. and committing something temporarily is not an option. but I can throw together a quick patch that can be applied on top of the E-AC3 patch.

Quote:
5.1 decoding. Didn't check anything else yet. If you want I can send you a WAV comparison sample between ffmpeg and Nero.
That would be helpful, yes.
jruggle is offline   Reply With Quote
Old 19th December 2007, 12:35   #175  |  Link
madshi
Registered Developer
 
Join Date: Sep 2006
Posts: 9,140
Quote:
Originally Posted by jruggle View Post
It won't take long. and committing something temporarily is not an option. but I can throw together a quick patch that can be applied on top of the E-AC3 patch.
A quick patch would be welcome, but if your real DRC patch won't take long to be accepted then I could also wait. Thanks.
madshi is offline   Reply With Quote
Old 20th December 2007, 00:54   #176  |  Link
jruggle
Registered User
 
Join Date: Jul 2006
Posts: 276
Quote:
Originally Posted by madshi View Post
A quick patch would be welcome, but if your real DRC patch won't take long to be accepted then I could also wait. Thanks.
Get a temporary patch here. This is for soc/eac3 SVN-r1607.

Code:
svn co svn://svn.mplayerhq.hu/soc/eac3 -r 1607
cd eac3
./checkout.sh
cd ffmpeg
patch -p0 <ffmpeg_eac3_drc_scale.patch.txt
./configure --enable-gpl
make
Then you can set the libavcodec or ffmpeg option, drc_scale, to 0.0 to disable DRC.
Attached Files
File Type: txt ffmpeg_eac3_drc_scale.patch.txt (2.6 KB, 102 views)

Last edited by jruggle; 20th December 2007 at 00:57.
jruggle is offline   Reply With Quote
Old 21st December 2007, 10:50   #177  |  Link
madshi
Registered Developer
 
Join Date: Sep 2006
Posts: 9,140
Thanks much for the DRC patch!

-------

Is it intentional that when using ffmpeg SVN plus E-AC3 soc SVN the AC3 decoder stops working?

Code:
C:\msys\local\bin>ffmpeg -i channeltest.ac3 test.wav
FFmpeg version SVN-r11260, Copyright (c) 2000-2007 Fabrice Bellard, et al.
  configuration: --enable-shared --disable-static --enable-memalign-hack
  libavutil version: 49.6.0
  libavcodec version: 51.49.0
  libavformat version: 52.2.0
  built on Dec 18 2007 15:52:49, gcc: 4.2.1-sjlj (mingw32-2)
Input #0, ac3, from 'channeltest.ac3':
  Duration: 00:01:00.0, bitrate: 448 kb/s
    Stream #0.0: Audio: 0x0000, 48000 Hz, 5:1, 448 kb/s
Output #0, wav, to 'test.wav':
    Stream #0.0: Audio: pcm_s16le, 48000 Hz, 5:1, 4608 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
Unsupported codec (id=86020) for input stream #0.0
Another question: Is there any chance to support the "USE_HIGHPRECISION" or "CONFIG_AUDIO_NONSHORT" flag to support 32bit output? The new TrueHD/MLP decoder does that and it works just fine. I know that ffmpeg officially doesn't support anything other than 16bit audio yet. But offering a special switch like the TrueHD decoder does shouldn't harm, right?

Ok, I know, I'm getting gready... Sorry about that. But I thought asking wouldn't harm. You can still simply say "no", of course!
madshi is offline   Reply With Quote
Old 21st December 2007, 12:36   #178  |  Link
jruggle
Registered User
 
Join Date: Jul 2006
Posts: 276
Quote:
Originally Posted by madshi View Post
Is it intentional that when using ffmpeg SVN plus E-AC3 soc SVN the AC3 decoder stops working?
It works fine for me. Did you use "configure --enable-gpl" ?

Quote:
Another question: Is there any chance to support the "USE_HIGHPRECISION" or "CONFIG_AUDIO_NONSHORT" flag to support 32bit output? ... You can still simply say "no", of course!
No. FFmpeg doesn't support 32-bit because the API is currently setup for only 16-bit audio. The audio API will have to be changed to support other sample formats. This will happen eventually, just don't know when...
jruggle is offline   Reply With Quote
Old 21st December 2007, 12:54   #179  |  Link
madshi
Registered Developer
 
Join Date: Sep 2006
Posts: 9,140
Quote:
Originally Posted by jruggle View Post
It works fine for me. Did you use "configure --enable-gpl" ?
Nope. Didn't know about that switch. Thank you...

Quote:
Originally Posted by jruggle View Post
No.


Quote:
Originally Posted by jruggle View Post
FFmpeg doesn't support 32-bit because the API is currently setup for only 16-bit audio. The audio API will have to be changed to support other sample formats. This will happen eventually, just don't know when...
I see. So the TrueHD decoder optionally outputting 32bit is probably an extremely ugly hack then? Works just fine for my needs, though... <shrug>
madshi is offline   Reply With Quote
Old 22nd December 2007, 00:08   #180  |  Link
jruggle
Registered User
 
Join Date: Jul 2006
Posts: 276
Quote:
Originally Posted by madshi View Post
I see. So the TrueHD decoder optionally outputting 32bit is probably an extremely ugly hack then? Works just fine for my needs, though... <shrug>
It's a hack, but it's not extremely ugly...it just won't work within FFmpeg, only in libavcodec. The function for audio decoding is:
int avcodec_decode_audio2(AVCodecContext *avctx, int16_t *samples, int *frame_size_ptr, uint8_t *buf, int buf_size);

As you can see, the output samples are presumed to be an array of 16-bit signed integers. The MLP decoder just treats the output as a void * and then casts to either int16_t or int32_t depending on the source. This works just fine when using libavcodec alone because the user can look at AVCodecContext.sample_fmt to decide what to cast the array as.

But it's really supposed to be int16_t. And internally, FFmpeg assumes that is the case. The exception is an ugly hack within ffmpeg.c that allows for only raw pcm to be encoded using formats other than 16-bit.

The most likely fix to this will be to change the audio encoders and decoders to use an AVFrame instead of a sample array, which is how the video codecs work.

Anyway, that's probably more than you wanted to know...
jruggle is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 21:23.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.