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 5th May 2006, 11:40   #81  |  Link
dimzon
BeHappy/MeGUI developer
 
dimzon's Avatar
 
Join Date: Oct 2003
Location: Moscow, Russia
Posts: 1,727
Quote:
Originally Posted by Ivan Dimkovic
It does not work ATM as it would be somewhat complicated to support that - but we will see if there is a way to do it.
As I said before caller can send double-sized original to encoder's stdin (repeat original twice) and provide valid samplecount via command line. So You can write something like this

Code:
readWavHeaderFromStdIn();
int64 sampleCount = getInt64ArgumentFromCommandLine("sampleCount")
Initialize1stPassEncoder();
for(i=0;i<sampleCount;i++)
{
 readSampleFromStdInAndFeedItTo1stPassEncoder()
}
Finalize1stPassEncoder();
Initialize2ndPassEncoder();
for(i=0;i<sampleCount;i++)
{
 readSampleFromStdInAndFeedItTo2ndPassEncoder()
}
Finalize2ndPassEncoder();
dimzon is offline   Reply With Quote
Old 5th May 2006, 11:46   #82  |  Link
dimzon
BeHappy/MeGUI developer
 
dimzon's Avatar
 
Join Date: Oct 2003
Location: Moscow, Russia
Posts: 1,727
Quote:
Originally Posted by killerhex
anyone have a GUI for this or can make one hving trouble wih comandline
BeHappy
dimzon is offline   Reply With Quote
Old 5th May 2006, 11:56   #83  |  Link
GmorG McRoth
Registered User
 
Join Date: Jan 2006
Posts: 137
I have problem with behappy when I try to encode ac3 file (using nicaudio plugin from behappy site) to ND AAC CBR @ 224 kbps it fails on me with this log
nero encoder and decoder are in same dir as BeHappy
Code:
Starting job King Kong T01 3_2ch 448Kbps DELAY 0ms.ac3->audio.m4a
Found Audio Stream
Channels=6, BitsPerSample=16, SampleRate=48000Hz
neroAacEnc.exe -cbr 224000 -ignorelength -if - -of "D:\Moje wideo\DVD\King Kong\audio.m4a"
Writing RIFF header to encoder's StdIn
Writing PCM data to encoder's StdIn
Error: System.IO.IOException: Potok został zakończony.

   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.WriteCore(Byte[] buffer, Int32 offset, Int32 count)
   at System.IO.FileStream.Write(Byte[] array, Int32 offset, Int32 count)
   at BeHappy.Encoder.encode()
#### Encoder StdOut ####
ERROR: could not parse WAV file

#### Encoder StdErr ####
*************************************************************
*                                                           *
*  Nero Digital Audio Reference MPEG-4 & 3GPP Audio Encoder *
*  Copyright (C) 2006 Nero AG                               *
*  All Rights Reserved Worldwide                            *
*                                                           *
*  Package build date: May  1 2006                          *
*                                                           *
*  See -help for a complete list of available parameters.   *
*                                                           *
*************************************************************
__________________
I'm sick of following my dreams. I'm just going to ask them where they're goin', and hook up with them later.
---Mitch Hedberg
GmorG McRoth is offline   Reply With Quote
Old 5th May 2006, 12:09   #84  |  Link
Sirber
retired developer
 
Sirber's Avatar
 
Join Date: Oct 2002
Location: Canada
Posts: 8,978
woot woot!

thanks!
__________________
Detritus Software
Sirber is offline   Reply With Quote
Old 5th May 2006, 12:12   #85  |  Link
dimzon
BeHappy/MeGUI developer
 
dimzon's Avatar
 
Join Date: Oct 2003
Location: Moscow, Russia
Posts: 1,727
Quote:
Originally Posted by GmorG McRoth
ERROR: could not parse WAV file
Hmmm... Seems like something is wrong in Nero encoder itself! Because BeHappy produce 100% valid WAV HEADER (and it was tested multiple times!)

Ivan, can You check it or at least provide binary wich produce additional diagnostic output (not only "could not parse WAV file")

Add: this is some code wich I'm using to create WAV header: http://forum.doom9.org/showthread.ph...659#post758659
take look @ FAAD_MAGIC_VALUE usage. Maybe it's a reason (according source filename "King Kong T01 3_2ch 448Kbps DELAY 0ms.ac3" I think it produce WAV > 4GB so 0xFFFFFF00 is used instead actual data size).

Last edited by dimzon; 5th May 2006 at 12:21.
dimzon is offline   Reply With Quote
Old 5th May 2006, 12:16   #86  |  Link
Ivan Dimkovic
Registered User
 
Join Date: Feb 2003
Posts: 67
Dimzon,

We will look into the issue - please send us the wave file itself that causes problems (you can dump it to the file) and we will check
Ivan Dimkovic is offline   Reply With Quote
Old 5th May 2006, 12:20   #87  |  Link
Sirber
retired developer
 
Sirber's Avatar
 
Join Date: Oct 2002
Location: Canada
Posts: 8,978
Added on digg:
http://www.digg.com/technology/Nero_...d_Line_Encoder

@Ivan Dimkovic
I used a bit of your first post
__________________
Detritus Software
Sirber is offline   Reply With Quote
Old 5th May 2006, 12:23   #88  |  Link
dimzon
BeHappy/MeGUI developer
 
dimzon's Avatar
 
Join Date: Oct 2003
Location: Moscow, Russia
Posts: 1,727
Quote:
Originally Posted by Ivan Dimkovic
Dimzon,

We will look into the issue - please send us the wave file itself that causes problems (you can dump it to the file) and we will check
please read this post again (it was updated) http://forum.doom9.org/showthread.ph...850#post823850
I beleive reason is bcz uncompressed ac3 file is bigger than 4GB!
This is the problem for the wav limit 4 GB. And 2 GB limit is for soft using 'signed long int' for these fields.
The faad decoder (aac) can generate 'invalid' wav's > 4 GB, and fill these fields (RiffLength and DataLength) with 0xFFFFFF00.
Foobar also make 'invalid' wav's > 4 GB, and fill these fields with the 4 low order bytes.
I prefer the faad method (0xFFFFFF00) because Foobar method can be confused with valid fields.

Last edited by dimzon; 5th May 2006 at 12:26.
dimzon is offline   Reply With Quote
Old 5th May 2006, 12:35   #89  |  Link
GmorG McRoth
Registered User
 
Join Date: Jan 2006
Posts: 137
Quote:
Originally Posted by dimzon
please read this post again (it was updated) http://forum.doom9.org/showthread.ph...850#post823850
I beleive reason is bcz uncompressed ac3 file is bigger than 4GB!
This is the problem for the wav limit 4 GB. And 2 GB limit is for soft using 'signed long int' for these fields.
The faad decoder (aac) can generate 'invalid' wav's > 4 GB, and fill these fields (RiffLength and DataLength) with 0xFFFFFF00.
Foobar also make 'invalid' wav's > 4 GB, and fill these fields with the 4 low order bytes.
I prefer the faad method (0xFFFFFF00) because Foobar method can be confused with valid fields.
yes I decompressed it to wav and file has over 6GB size and is not properly played by foobar (shows only 2 hours run time and ac3 is 3 hours).
__________________
I'm sick of following my dreams. I'm just going to ask them where they're goin', and hook up with them later.
---Mitch Hedberg
GmorG McRoth is offline   Reply With Quote
Old 5th May 2006, 12:47   #90  |  Link
Ivan Dimkovic
Registered User
 
Join Date: Feb 2003
Posts: 67
Are you using -ignorelength for setting up the AAC encoder commandline in case of this file?
Ivan Dimkovic is offline   Reply With Quote
Old 5th May 2006, 13:01   #91  |  Link
GmorG McRoth
Registered User
 
Join Date: Jan 2006
Posts: 137
Quote:
Originally Posted by Ivan Dimkovic
Are you using -ignorelength for setting up the AAC encoder commandline in case of this file?
No actually did not used that switch when I was experimenting with that file, but it's not the case since I probably won't use direct from wav encoding since it's not convenient. I'm more interested in making BeHappy work (and BeHappy uses this switch).

I just made a test just for fun with this command line

Code:
"C:\Program Files\Moje Programy\AAC nero\neroAacEnc.exe" -br 224000 -2pass -ignorelength -if "D:\Moje wideo\DVD\King Kong\King Kong T01 3_2ch 448Kbps DELAY 0ms.wav" -of "D:\Moje wideo\DVD\King Kong\King Kong T01 3_2ch 448Kbps DELAY 0ms.m4v"
and there is "could not parse the wav file" error

sidenote (I renamed sse2 version to not sse2 version name to not need to change all settings I made in foobar2000)
__________________
I'm sick of following my dreams. I'm just going to ask them where they're goin', and hook up with them later.
---Mitch Hedberg

Last edited by GmorG McRoth; 5th May 2006 at 13:08.
GmorG McRoth is offline   Reply With Quote
Old 5th May 2006, 13:03   #92  |  Link
Ivan Dimkovic
Registered User
 
Join Date: Feb 2003
Posts: 67
@Dimzon,

Could you please confirm that you set -ignorelength in case of this file? Because if the -ignorelength is specified, encoder ignores the WAV headers with regards to length.
Ivan Dimkovic is offline   Reply With Quote
Old 5th May 2006, 13:12   #93  |  Link
buzzqw
HDConvertToX author
 
Join Date: Nov 2003
Location: Cesena,Italy
Posts: 6,552
could be possible to implement direct ac3 input support ?



BHH
__________________
HDConvertToX: your tool for BD backup
MultiX264: The quick gui for x264
AutoMen: The Mencoder GUI
AutoWebM: supporting WebM/VP8
buzzqw is offline   Reply With Quote
Old 5th May 2006, 13:15   #94  |  Link
dimzon
BeHappy/MeGUI developer
 
dimzon's Avatar
 
Join Date: Oct 2003
Location: Moscow, Russia
Posts: 1,727
Quote:
Originally Posted by Ivan Dimkovic
@Dimzon,

Could you please confirm that you set -ignorelength in case of this file?
Yes. As You can see above in BeHappy log actual command line is
Code:
neroAacEnc.exe -cbr 224000 -ignorelength -if - -of "D:\Moje wideo\DVD\King Kong\audio.m4a"
dimzon is offline   Reply With Quote
Old 5th May 2006, 13:17   #95  |  Link
Ivan Dimkovic
Registered User
 
Join Date: Feb 2003
Posts: 67
Quote:
could be possible to implement direct ac3 input support ?
No this is not possible - it is very hard to provide free codecs when there are royalties that have to be paid - please take into consideration that Nero Command Line AAC encoder is licensed AAC distribution - we do pay for that.

@Dimzon, thx - I informed the engineers about this problem.
Ivan Dimkovic is offline   Reply With Quote
Old 5th May 2006, 13:25   #96  |  Link
Sharktooth
Mr. Sandman
 
Sharktooth's Avatar
 
Join Date: Sep 2003
Location: Haddonfield, IL
Posts: 11,768
Great work Ivan!
Nice to see Nero is still a friendly company
Sharktooth is offline   Reply With Quote
Old 5th May 2006, 13:25   #97  |  Link
dimzon
BeHappy/MeGUI developer
 
dimzon's Avatar
 
Join Date: Oct 2003
Location: Moscow, Russia
Posts: 1,727
Quote:
Originally Posted by buzzqw
could be possible to implement direct ac3 input support ?
Use foobar2000 or behappy to transcode ac3
or (if You need 100% CLI solution) pipeline decoding via ffmpeg to neroaacenc
dimzon is offline   Reply With Quote
Old 5th May 2006, 14:30   #98  |  Link
buzzqw
HDConvertToX author
 
Join Date: Nov 2003
Location: Cesena,Italy
Posts: 6,552
thanks to both Ivan and Dimzon

Quote:
(if You need 100% CLI solution) pipeline decoding via ffmpeg to neroaacenc
nice tips (but is ffmpeg supporting 5ch to stdout?, i will try)

BHH
__________________
HDConvertToX: your tool for BD backup
MultiX264: The quick gui for x264
AutoMen: The Mencoder GUI
AutoWebM: supporting WebM/VP8
buzzqw is offline   Reply With Quote
Old 5th May 2006, 14:46   #99  |  Link
Rockaria
nobody's nobody
 
Join Date: Mar 2005
Location: The Sun, somewhere around
Posts: 553
Quote:
Quote:
btw. Ivan why 2pass not work with stdin. This is powerfull option for long encodings can't be used for movies. I am not crazy to convert ac3->5.1wav
It does not work ATM as it would be somewhat complicated to support that - but we will see if there is a way to do it.
The ideal way would be 1st pass analysis-> rewind -> 2nd pass encoding like what avisynth is doing with 2 pass volume gain.
For a temporary gui integration work around, foobar2k's %s(instead of -) input file definition for the cli encoding(-br 128000 -2pass -if %s -of %d) will use a temporary wav in the destination folder, which would be a lot faster if you can use the ram disk large enough depending on the available extra ram(the virtual memory use would be a lot smoother though).

Quote:
- What bit-rate mode are you using? (abr/cbr/vbr/2-pass)
-br/-cbr but no -abr/-vbr
-2pass/-2passperiod but why no -1passperiod for -br?
-segment/period size for -cbr(the segment seems not be 1 sample)/-abr/-vbr(entire length segmented abr?)
The reason why I asked for the clarification of the bit rate options in my previous post is that we seem to use different terms for the unclarified similar phenomena.
As both quality based & bitrate based options are widely used for VBR(ie. vorbis, lame...). The difference between the ABR and VBR for the bitrate based option seems to be lying in the segment/period size(samples/ms).
Also check, the CBR for AAC seems to be natively ABR(nSamples for the unit segment), which can be verified watching the dynamic bit rate status within the foobar2k or ffdshow. Any inputs?
__________________
u know everything in the end, or now if aligned... no right(x).right(y) pls. it's confusing... : phase-shift /Jun.2006
Rockaria is offline   Reply With Quote
Old 5th May 2006, 14:49   #100  |  Link
dimzon
BeHappy/MeGUI developer
 
dimzon's Avatar
 
Join Date: Oct 2003
Location: Moscow, Russia
Posts: 1,727
Quote:
Originally Posted by Rockaria
The ideal way would be 1st pass analysis-> rewind -> 2nd pass encoding like what avisynth is doing with 2 pass volume gain.
It's impossible for STDIN...
dimzon 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 21:43.


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