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

Reply
 
Thread Tools Search this Thread Display Modes
Old 31st August 2006, 11:41   #201  |  Link
Gabriel_Bouvigne
L.A.M.E. developer
 
Gabriel_Bouvigne's Avatar
 
Join Date: Dec 2001
Location: Paris - France
Posts: 276
Quote:
Originally Posted by jruggle
I really do not want to include a decoder with Aften, so either I will make an attempt to do a basic parsing to get exponents only or I might create a completely separate program which would use the liba52 decoder, analyze for dialnorm/DRC, then output modified ac3 frames.
I think that it would be quite nice to be able to compute the "dialog level" directly during encoding. This would allow live encoding.
I think that it sould be possible to obtain a good approximation of dialog level using exponents values (weighted according to freq band)
Gabriel_Bouvigne is offline   Reply With Quote
Old 31st August 2006, 18:00   #202  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
Quote:
Originally Posted by Gabriel_Bouvigne
I think that it would be quite nice to be able to compute the "dialog level" directly during encoding. This would allow live encoding.
I don't agree with this comment and similar.
- This force to 2 pass encoding, and not live encoding.
- Automatic Dialog Normalization can work maybe with modern music, but never with movie tracks. The correct DialNorm must be calculated over a selected fragment with dialogs presents, not over the full track with aleatory silences.
- There are enough tools to calculate this parameter over the source to be encoded, and the related DRC type (film, music, speech, ...) I don't know how can be selected automatically.
tebasuna51 is offline   Reply With Quote
Old 31st August 2006, 20:40   #203  |  Link
jruggle
Registered User
 
Join Date: Jul 2006
Posts: 276
Quote:
Originally Posted by Gabriel_Bouvigne
I think that it would be quite nice to be able to compute the "dialog level" directly during encoding. This would allow live encoding.
I think that it sould be possible to obtain a good approximation of dialog level using exponents values (weighted according to freq band)
The DRC can be done while encoding, but the dialog level is a trickier thing because it is supposed to be constant across the entire stream.

Like Tebasuna said, the dialog level should be measured using just an excerpt which typifies the dialog level of the whole stream. I can modify the wavrms utility program to accept a time or sample range and improve the dialnorm calculation as well...and/or include it in Aften as a 2-pass option.

A possible solution for live encoding might be to add some sort of "dialog calibration" functions in libaften. Something like start_calibration(), append_calibration(audio samples), end_calibration(). This could be used by a live encoder app to do a sort of microphone test. Or it could be used by a production app by passing a user-selected dialog range. Extending that idea to modifying existing AC3 streams, it could optionally take ac3 frames as input and analyze the exponents.

I'm just throwing ideas out here... I need to get the DRC actually working before jumping into any of these.
jruggle is offline   Reply With Quote
Old 1st September 2006, 02:48   #204  |  Link
Mug Funky
interlace this!
 
Mug Funky's Avatar
 
Join Date: Jun 2003
Location: i'm in ur transfers, addin noise
Posts: 4,555
with live stuff, the level should already be sorted before it hits the encoder

so i can't see it hurting to just enter a number in the CLI, then let the DRC handle the rest. if it's a little off it shouldn't hurt too bad. considering other encoders rely on user input, there's no reason aften can't too

perhaps a "-live" switch or similar could be added so aften knows how many passes to do? or perhaps 2-pass should be specified explicitly (that's probablythe way to do it).
__________________
sucking the life out of your videos since 2004
Mug Funky is offline   Reply With Quote
Old 1st September 2006, 15:39   #205  |  Link
Gabriel_Bouvigne
L.A.M.E. developer
 
Gabriel_Bouvigne's Avatar
 
Join Date: Dec 2001
Location: Paris - France
Posts: 276
Quote:
Originally Posted by jruggle
The DRC can be done while encoding, but the dialog level is a trickier thing because it is supposed to be constant across the entire stream.
...
I'm just throwing ideas out here... I need to get the DRC actually working before jumping into any of these.
sorry, I mixed both (and it's now more clear due to your comments), mainly because I am not fluent with the AC3 standard.

At the Paris AES convention, some people from Swedish TV explained (roughly) how they are proceding:
DRC is computed on the fly, while dialog level is selected based on the content type (a set of standard values for movies/news/sports/advertising/...).
If we assume that this represent a typical use case, then what is needed is dynamic DRC and ability to manually specify dialog level (even while encoding).
Gabriel_Bouvigne is offline   Reply With Quote
Old 2nd September 2006, 00:51   #206  |  Link
jruggle
Registered User
 
Join Date: Jul 2006
Posts: 276
Quote:
Originally Posted by Gabriel_Bouvigne
sorry, I mixed both (and it's now more clear due to your comments), mainly because I am not fluent with the AC3 standard.

At the Paris AES convention, some people from Swedish TV explained (roughly) how they are proceding:
DRC is computed on the fly, while dialog level is selected based on the content type (a set of standard values for movies/news/sports/advertising/...).
If we assume that this represent a typical use case, then what is needed is dynamic DRC and ability to manually specify dialog level (even while encoding).
That's a good point. There are probably many values (mostly metadata) that it might be good to read from the user context when encoding each frame instead of just at start of encoding. That way the user can change them during encoding without having to reinitialize.
jruggle is offline   Reply With Quote
Old 3rd September 2006, 17:57   #207  |  Link
mean
Registered User
 
Join Date: Jan 2002
Posts: 206
private field

Hello,
Could you rename the private field of aftencontext to something else ?
It is c++ unfriendly

Thank you
mean is offline   Reply With Quote
Old 3rd September 2006, 19:29   #208  |  Link
jruggle
Registered User
 
Join Date: Jul 2006
Posts: 276
Quote:
Originally Posted by mean
Hello,
Could you rename the private field of aftencontext to something else ?
It is c++ unfriendly

Thank you
Thanks for the info. I just changed it in SVN.
jruggle is offline   Reply With Quote
Old 13th September 2006, 03:45   #209  |  Link
ADLANCAS
Registered User
 
ADLANCAS's Avatar
 
Join Date: Apr 2003
Location: Brazil
Posts: 247
I´ve made a small batch file that uses the aplication wavrms.exe presents on Aften v0.05 package.

With this batch we can use Aften with a "automatic measure of parameter Dialog Normalization".

Code:
rem This batch works on Win-XP
@echo off
setlocal enabledelayedexpansion
wavrms.exe video1.wav | find "Dialnorm" > "Dialnorm.txt"

for %%F in (Dialnorm.txt) do (
    for /F "usebackq tokens=1 delims=B" %%J in ("%%F") do (
      set char=%%J
      set char=!char:~12,2!
      echo Dialnorm = - !char! dB
      aften -b 224 -dnorm !char! -acmod 2 -bwfilter 1 -dcfilter 1 video1.wav video1.ac3
    )
)
I hope that can be useful for community.
ADLANCAS is offline   Reply With Quote
Old 13th September 2006, 07:44   #210  |  Link
raquete
Registered User
 
Join Date: Nov 2004
Location: Brazil
Posts: 745
hi ADLANCAS
Quote:
"automatic measure of parameter Dialog Normalization".
...rem This batch works on Win-XP
i'm horrible in command lines and need to ask you if works in 2K too.

so much.

ps:
are you from SP,MG,RJ,CE,RS...? (BR here too)

regards.
raquete is offline   Reply With Quote
Old 13th September 2006, 14:37   #211  |  Link
ADLANCAS
Registered User
 
ADLANCAS's Avatar
 
Join Date: Apr 2003
Location: Brazil
Posts: 247
Quote:
i'm horrible in command lines
Me too

It should also run in 2K.

(Here is SP)
ADLANCAS is offline   Reply With Quote
Old 14th September 2006, 23:46   #212  |  Link
Chainmax
Huh?
 
Chainmax's Avatar
 
Join Date: Sep 2003
Location: Uruguay
Posts: 3,103
What is currently being worked on?
__________________
Read Decomb's readmes and tutorials, the IVTC tutorial and the capture guide in order to learn about combing and how to deal with it.
Chainmax is offline   Reply With Quote
Old 15th September 2006, 01:58   #213  |  Link
jruggle
Registered User
 
Join Date: Jul 2006
Posts: 276
Quote:
Originally Posted by Chainmax View Post
What is currently being worked on?
DRC, dialnorm, and speed. Also, I'm trying to make up my mind on changing the build system.

I just applied a simplification of the dialnorm calculation in wavrms. Instead of using the sort/percentile approach as in replaygain, I chose something a bit simpler. Now it does averaging of RMS, but throws out values which are outside of a reasonable dialog range. Some testing has shown that it works pretty well. I'd really like to get some feedback on it though. Since it was applied today, it will show up in tomorrow's daily build.

-Justin

Last edited by jruggle; 15th September 2006 at 02:01.
jruggle is offline   Reply With Quote
Old 15th September 2006, 02:05   #214  |  Link
ADLANCAS
Registered User
 
ADLANCAS's Avatar
 
Join Date: Apr 2003
Location: Brazil
Posts: 247
You could see his blog:
http://aftenblog.blogspot.com/

Last edited by ADLANCAS; 15th September 2006 at 02:13. Reason: Oh, sorry! I posted in the same time as jruggle posted.
ADLANCAS is offline   Reply With Quote
Old 15th September 2006, 02:14   #215  |  Link
Chainmax
Huh?
 
Chainmax's Avatar
 
Join Date: Sep 2003
Location: Uruguay
Posts: 3,103
Oh, I forgot about the blog . Justin, do you think channel coupling might be a possibility in the future?
__________________
Read Decomb's readmes and tutorials, the IVTC tutorial and the capture guide in order to learn about combing and how to deal with it.
Chainmax is offline   Reply With Quote
Old 16th September 2006, 21:06   #216  |  Link
raquete
Registered User
 
Join Date: Nov 2004
Location: Brazil
Posts: 745
@ jruggle,

Quote:
I just applied a simplification of the dialnorm calculation in wavrms.
i can't wait to use, just waiting for Kurt new Gui with that feature.
Quote:
Instead of using the sort/percentile approach as in replaygain, I chose something a bit simpler.
jruggle,you left the idea to use replaygain in Aften?

thanks.
raquete is offline   Reply With Quote
Old 19th September 2006, 18:18   #217  |  Link
NorthPole
Registered User
 
Join Date: Jan 2006
Posts: 141
Quote:
Originally Posted by jruggle View Post
Inline resampling is on my TODO list. Also, optionally downmixing or upmixing the number of channels is on the TODO list. The list just keeps growing!

-Justin
@justin
I know you probably have a long TODO list but... Any chance that you have made any progress on inline resampling? Like from 44100 to 48000.
NorthPole is offline   Reply With Quote
Old 19th September 2006, 21:04   #218  |  Link
Exl
Registered User
 
Join Date: May 2006
Posts: 5
Aften is looking great so far, but I have a file on which it generates bad output. The wav source is this 20 second excerpt:
http://members.home.nl/meuwissenth/0.0.0.wav
Which sounds just fine. Once I run it through Aften with the parameters -b 192 -acmod 2 or even just either one of them, it outputs this:
http://members.home.nl/meuwissenth/0.0.0.ac3
Which plays back with pauses and the seeker bar visibly skipping in VLC Media Player. Am I doing something wrong here?
Exl is offline   Reply With Quote
Old 20th September 2006, 02:15   #219  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
Quote:
Originally Posted by Exl View Post
Which plays back with pauses and the seeker bar visibly skipping in VLC Media Player. Am I doing something wrong here?
Seems only VLC are doing something wrong, because Winamp, Foobar, Bsplayer and PowerDVD play correctly the file.
Azid and the new NicAudio (is a 44100 Hz) can decode the 0.0.0.ac3 without problems.

The same wav resampled to 48000 play ok with VLC, and other ac3 44100 Hz have the same problem in VLC.

Edit: my vlc version is 0.8.2
tebasuna51 is offline   Reply With Quote
Old 20th September 2006, 03:54   #220  |  Link
jruggle
Registered User
 
Join Date: Jul 2006
Posts: 276
Quote:
Originally Posted by raquete View Post
jruggle,you left the idea to use replaygain in Aften?
Yes, sort of. The basic RMS calculation is still there. Replaygain does not have anything to do with dialog level though, it has to do with _overall_ perceived loudness. The 95% point does a good job for that measurement, but for dialog in a movie, for example, it isn't as good. I was adjusting it down by a fixed amount as an educated guess based on sample data...this really was not very accurate though. The new method throws out very quiet and very loud sections, which can occur pretty often in movies, but rarely include normal dialog. Also, the specification of a time range gives the user more control to select a good section of audio which has typical dialog.
jruggle is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 17:00.


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