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 21st March 2010, 19:51   #1081  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 5,402
Quote:
Originally Posted by Midzuki View Post
...
--- if someone intends to create a multichannel AC3 Audio CD, it's better that they know they shouldn't be using Aften for doing that.
For what?
With spdifer.exe (ac3filter_tools_0_31b) I obtain the same filesize, framesizes and headers when convert to ddwav a 5.1 wav encoded to ac3 with Aften or Soft Encoder.

Quote:
P.S.: So, ¿¿¿ is there any better alternative to spdifer.exe ???
I don't know.
__________________
BeHappy, AviSynth audio transcoder, in Doom9 forums. NicAudio, BassAudio, audio decoders.
tebasuna51 is offline   Reply With Quote
Old 21st March 2010, 20:11   #1082  |  Link
Midzuki
Unavailable
 
Join Date: Mar 2009
Location: offline
Posts: 1,477
Quote:
Originally Posted by tebasuna51 View Post
With spdifer.exe (ac3filter_tools_0_31b) I obtain the same filesize, framesizes and headers when convert to ddwav a 5.1 wav encoded to ac3 with Aften or Soft Encoder.
Quote:
I have some 5.1 ddwav and the size isn't the size of the wav sources. Is the size of the ac3 x 2.2
Something is wrong, then.

Quote:
Maybe spdifer don't work properly with stereo files.
It DOES work with every stereo .ac3 @ 32 and 48kHz I have tested so far.

What are you trying to say, man?

P.S.: Another test --- stereo WAV @ 44.1kHz, encoded with AC3 ACM via VirtualDub; resulting file was "RIFF-stripped", and then given to spdifer.exe;
DDWAV file size = 36.3MB, as it should be.
----------------------------------------------
UPDATE:

Just downloaded and tested the latest version of spdifer, and
this time, it did produce a DDWAV with correct-length from an Aften 44.1kHz file

So,

1) the real problem was in the old version of spdifer.exe, OK ;

2) BIG QUESTION: what would be the "magic" differences between the 44.1kHz outputs from Aften and the ones from the other encoders ???

Last edited by Midzuki; 21st March 2010 at 20:28.
Midzuki is offline   Reply With Quote
Old 22nd March 2010, 21:42   #1083  |  Link
jruggle
Registered User
 
Join Date: Jul 2006
Posts: 276
Quote:
Originally Posted by Midzuki View Post
2) BIG QUESTION: what would be the "magic" differences between the 44.1kHz outputs from Aften and the ones from the other encoders ???
My first guess is that some other encoders do not vary the frame size. The frame size can be the base frame size or +16 bits at 44.1kHz per the AC-3 spec. Aften uses this option to make sure the average bitrate is exact. Otherwise it would be slightly less than the nominal bitrate. This is not an issue for 48kHz or 32kHz because the math is nice and even. Maybe the old version of spdifer did not take this into account?

If you want a reference, see document ATSC A/52B Table 5.18.
jruggle is offline   Reply With Quote
Old 22nd March 2010, 22:03   #1084  |  Link
Midzuki
Unavailable
 
Join Date: Mar 2009
Location: offline
Posts: 1,477
Quote:
Originally Posted by jruggle View Post
My first guess is that some other encoders do not vary the frame size. The frame size can be the base frame size or +16 bits at 44.1kHz per the AC-3 spec. Aften uses this option to make sure the average bitrate is exact. Otherwise it would be slightly less than the nominal bitrate. This is not an issue for 48kHz or 32kHz because the math is nice and even. Maybe the old version of spdifer did not take this into account?

If you want a reference, see document ATSC A/52B Table 5.18.
Thanks for answering.

Yes, I had already looked at the "top-secret" .PDF.
But, as you can see, it appears it was NOT ONLY spdifer.exe that didn't consider the «better» possibility. I mean, it seems Aften was/is the first/only "well-known" AC3 encoder to use two different frame sizes for the 44.1kHz sampling rate.

Again,
Midzuki is offline   Reply With Quote
Old 23rd March 2010, 00:54   #1085  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 5,402
Quote:
Originally Posted by Midzuki View Post
... I mean, it seems Aften was/is the first/only "well-known" AC3 encoder to use two different frame sizes for the 44.1kHz sampling rate.
Nope, the test I make before encoding the same wav 44.1KHz file:

Aften: 3161 frames (2536 "short" + 625 "long"), precise bitrate
Soft Encode: 3161 frames (1585 "short" + 1576 "long"), imprecise bitrate
__________________
BeHappy, AviSynth audio transcoder, in Doom9 forums. NicAudio, BassAudio, audio decoders.
tebasuna51 is offline   Reply With Quote
Old 23rd March 2010, 01:26   #1086  |  Link
Midzuki
Unavailable
 
Join Date: Mar 2009
Location: offline
Posts: 1,477
Quote:
Originally Posted by tebasuna51 View Post
Nope, the test I make before encoding the same wav 44.1KHz file:

Aften: 3161 frames (2536 "short" + 625 "long"), precise bitrate
Soft Encode: 3161 frames (1585 "short" + 1576 "long"), imprecise bitrate
for the accurate info.

*THUMBS UP*
Midzuki is offline   Reply With Quote
Old 13th May 2010, 20:22   #1087  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 5,645
I wanted to add support for aften inside Hybrid but ran into the problem that aften doesn't show progress when I pipe into it from ffmpeg.
Here are the command lines I use:
Code:
ffmpeg -v -10 -threads 4 -i "input.ac3" -acodec pcm_s16le -ac 6 -ar 48000 -f wav - | aften -b 256 -readtoeof 1 - "output.ac3"
and
Code:
ffmpeg -threads 4 -v -10 -y -i "input.ac3" -f u16le -acodec pcm_s16le - | sox --temp "D:\Encoding Temp" -t raw -e signed-integer -2 -c6 -r48000 - -t wav - remix -m 1v0.2646,3v0.1870,4v0.1870,5v0.2291,6v0.1323 2v0.2646,3v0.1870,4v0.1870,5v-0.1323,6v-0.2291 norm | aften -b 128  -readtoeof 1 - "output.ac3"
I know that when feeding aften directly with a file progress works, but since I want to be able to filter with sox and not use intermediate files I really would like too stay with the piping the inptu into aften.

I know that '-v' shows me the current frame processed, but I don't know if I can somehow judge from the frame number to the current position processed.

So if someone knows how to get aften to show progress (e.g. through altering my command line) or knows how to conclude from the current frame to the current position any help is welcome.

Cu Selur

Ps.: Only way to get current position atm I can think of it to get it from ffmpeg output.
__________________
Hybrid here in the forum, homepage

Last edited by Selur; 13th May 2010 at 20:26.
Selur is offline   Reply With Quote
Old 13th May 2010, 22:21   #1088  |  Link
jruggle
Registered User
 
Join Date: Jul 2006
Posts: 276
Quote:
Originally Posted by Selur View Post
I wanted to add support for aften inside Hybrid but ran into the problem that aften doesn't show progress when I pipe into it from ffmpeg.
Aften needs to know the total number of samples in order to show progress. It can get it 2 ways. For raw audio it is determined from the file size. For wav, aiff, etc, it is determined from the header. When ffmpeg sends output to a pipe, the file size cannot determined. When ffmpeg writes a wav file, the header is not updated with the data size until the end of encoding.

It appears that sox actually writes a valid data size in the header even when streaming to a pipe, if it knows it. Obviously if you're streaming from ffmpeg to sox to aften then sox cannot know the duration either so it cannot pass it to aften.

One workaround might be to add an option to aften so the user can specify the total number of input samples, overriding information from the file size or header if present. Then your program or script could get the duration from ffmpeg (or ffprobe) and multiply by the sample rate. If that option would be useful, I would consider adding it.
jruggle is offline   Reply With Quote
Old 14th May 2010, 07:53   #1089  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 5,645
So sample rate * time in seconds = frame count ? If so you don't need to add such an option since I already got the duration in seconds and calculating the progress from the output I get when calling with '-v' as parameter isn't a problem.

Cu Selur
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 14th May 2010, 09:25   #1090  |  Link
Anima123
Registered User
 
Join Date: Jun 2005
Posts: 418
Hi jruggle,

Any plan for introducing psychoacoustic model in your encoder? I am the one who have offered you some e-books at the hydrogenaudio forum.

Regards,
Anima123 is online now   Reply With Quote
Old 14th May 2010, 10:05   #1091  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 5,402
Quote:
Originally Posted by Selur View Post
So sample rate * time in seconds = frame count ? If so you don't need to add such an option since I already got the duration in seconds and calculating the progress from the output I get when calling with '-v' as parameter isn't a problem.

Cu Selur
Exactly:
sample rate * time in seconds = sample count

Frames, in compressed audio, can have many samples, for instance a frame in standard ac3 have 1536 samples.
__________________
BeHappy, AviSynth audio transcoder, in Doom9 forums. NicAudio, BassAudio, audio decoders.
tebasuna51 is offline   Reply With Quote
Old 14th May 2010, 10:13   #1092  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 5,645
Quote:
Exactly:
sample rate * time in seconds = sample count

Frames, in compressed audio, can have many samples, for instance a frame in standard ac3 have 1536 samples.
when using '-v' aften shows each frame's stats assuming these are ac3 frames:
(sample rate * time in seconds)/1536 would provide me the number of frames aften will show for piped input, right?

Cu Selur
__________________
Hybrid here in the forum, homepage

Last edited by Selur; 14th May 2010 at 11:28.
Selur is offline   Reply With Quote
Old 14th May 2010, 11:18   #1093  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 5,605
Look at the number closely! 1536 = 0600h.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 14th May 2010, 11:20   #1094  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 5,645
hups, thanks for the correction! (fixed it in the above post)
-> it's working !!
__________________
Hybrid here in the forum, homepage

Last edited by Selur; 14th May 2010 at 11:29.
Selur is offline   Reply With Quote
Old 14th May 2010, 18:36   #1095  |  Link
jruggle
Registered User
 
Join Date: Jul 2006
Posts: 276
Quote:
Originally Posted by Anima123 View Post
Any plan for introducing psychoacoustic model in your encoder? I am the one who have offered you some e-books at the hydrogenaudio forum.
Eventually. I got it working once but I wasn't satisfied with it. I have very limited time, but it's still on my todo list.
jruggle is offline   Reply With Quote
Old 18th June 2010, 18:05   #1096  |  Link
Vincent Vega
Registered User
 
Join Date: Feb 2004
Location: the tiny bubble of Creation
Posts: 185
output from encoder

can't find an explanation for encoder output log, like these lines i get in megui:

Quote:
progress: 100% | q: 333.5 | bw: 38.0 | bitrate: 192.0 kbps
progress: 100% | q: 284.0 | bw: 38.0 | bitrate: 192.0 kbps
what does q and bw (bitwriter?) mean? somewhere i can read about it?
Vincent Vega is offline   Reply With Quote
Old 18th June 2010, 23:39   #1097  |  Link
Abradoks
Registered User
 
Join Date: Mar 2008
Posts: 71
Quote:
Originally Posted by Vincent Vega View Post
what does q and bw (bitwriter?) mean? somewhere i can read about it?
Quality and bandwidth. Try "aften -longhelp".
Abradoks is offline   Reply With Quote
Old 19th June 2010, 17:46   #1098  |  Link
Vincent Vega
Registered User
 
Join Date: Feb 2004
Location: the tiny bubble of Creation
Posts: 185
thanks man
Vincent Vega is offline   Reply With Quote
Old 25th June 2010, 14:06   #1099  |  Link
video_magic
Registered User
 
Join Date: Jan 2005
Posts: 368
Quote:
Originally Posted by Kurtnoise View Post
Just found this at HA.org...and it sounds promizing.

In this first post, I have noticed that the wizodev link is a 404. Could you update to point to:
http://win32builds.sourceforge.net/

That seems current, thanks.
__________________
Thankyou!, I am grateful for any help
video_magic is offline   Reply With Quote
Old 25th June 2010, 14:25   #1100  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 5,605
Please note:

http://sourceforge.net/projects/win32builds/files/
Quote:
As of 2008-05-10 0:00:00 GMT, this project is no longer under active development.
And http://kurtnoise.free.fr is just as dead.

So - where is a really "current" alternative?
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH 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 03:15.


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