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. |
20th August 2006, 15:48 | #1 | Link |
Registered User
Join Date: Sep 2002
Posts: 352
|
NicAUDIO bug report: 6Channel Ac3->MP4 under MEGUI
I was asked to post some samples from teh MEGUI forums.
Here is a small ac3 clip that failes. This clip has no errors in ac3filter(well, I cut it out so I hope it does not now) but it encodes FINE in BeSweet/BeHappy/NeroReCode. http://rapidshare.de/files/30053014/...ELAY-760ms.ac3 So this is the error. Encodes fine in nero or besweet. Channels=6, BitsPerSample=16, SampleRate=48000Hz C:\Program Files\Multimedia\Encoding\megui\tools\neroaacenc\neroAacEnc_SSE2.exe -ignorelength -q 0.5 -if - -of "F:\Star.Wars.ep3.DELAY-760ms.mp4"Error: MeGUI.AviSynthException: m2AudioAC3Source: error in file "F:\Star.Wars.ep3.DELAY-760ms.ac3" at MeGUI.AviSynthAudioEncoder.encode() |
20th August 2006, 19:52 | #4 | Link |
Registered User
Join Date: Dec 2004
Location: Melbourne, AU
Posts: 1,963
|
The link has been posted wrong. Corrected: http://rapidshare.de/files/30053014/...ELAY-760ms.ac3
|
20th August 2006, 19:54 | #5 | Link |
Moderator
Join Date: Feb 2005
Location: Spain
Posts: 6,915
|
The correct link is:
http://rapidshare.de/files/30053014/...ELAY-760ms.ac3 This file start like 5.1 but have a fragment (8 frames) of 2.0. See DelayCut log: Code:
====== PROCESSING LOG ====================== Time 00:00:04.768; Frame#= 150. Some basic parameters changed between Frame #1 and this frame Time 00:00:04.992; Frame#= 157. Some basic parameters changed between Frame #150 and this frame Other decoder/player produce an audible cut but continue. You can use DirectShowSource with MEGUI/BeHappy. Edit: NicAudio also crash with ac3 44.1 KHz and give the same error message. See a possible solution in this post Last edited by tebasuna51; 20th August 2006 at 20:33. |
22nd August 2006, 05:52 | #7 | Link |
Registered User
Join Date: Sep 2002
Posts: 352
|
BeSweet encodes it fine. So how did you find the errors? AC3Fix - on the whole file - shows zero errors. COuld I have induced these errors in the cutting to make it small. I can post the whole clip if you would like.
THe problem wtih directshow is the following - getting it to work right. Nero7 decoder does not work and ac3filter also fails - you just get 2 channel even if set to "AS IS". If you "Force 3/2" you still get 2 channel. RIght now I have ac3filter encoding every NON ac3 file to ac3 so I only need 1 digital audio connection. When I return to chicago I will try the projectx solution. |
22nd August 2006, 08:57 | #8 | Link |
Registered User
Join Date: Dec 2004
Location: Melbourne, AU
Posts: 1,963
|
This sort of thing normally happens with DVB broadcasts, the program has 6 channel sound but the advertisements only have stereo. So unless you cut in exactly the right spot when removing ads, you end up with a few frames of stereo audio which isn't exactly wrong but can confuse some programs.
AC3Filter should be able to handle it, I don't know why it's not working for you. |
22nd August 2006, 10:39 | #9 | Link | ||
Moderator
Join Date: Feb 2005
Location: Spain
Posts: 6,915
|
Quote:
DelayCut show a 5.1 stream and, trying to fix, show a problem between frame 150 and 157. If you cut a fragment between 4800 ms (32 ms/frame) and 5000 ms and open after in DelayCut show a 2.0 ac3 stream. A hard way to find the errors is analyze the frame headers with WinHex after 4.6 sec. (crash point of NicAudio). Quote:
|
||
23rd August 2006, 18:08 | #10 | Link |
Moderator
Join Date: Oct 2001
Location: England
Posts: 3,285
|
I'm looking into the issue. On that clip NicAudio.dll is throwing an exception to AviSynth to tell it that there was a problem reading a frame. This causes the crash strangely.
The main problem is there is an issue with that AC3 file. How I mask that is another question. I'll keep working on it. -Nic ps The exception is thrown because the "Flags" from the frame differ to what they should be. pps Does anyone have a small nice 44100khz AC3 file that breaks NicAudio too? That would help with my testing greatly. (I tried making a 44.1khz file in ffmpeg but that doesn't seem to have the alternating ac3 frame size, at least not on my test, so I do need an example file) ppps So I/you can find it easily, the thread where tebasuna51 talks of the 44.1 issue is here http://forum.doom9.org/showthread.ph...537#post860537 Last edited by Nic; 23rd August 2006 at 18:45. |
23rd August 2006, 21:28 | #11 | Link |
Moderator
Join Date: Oct 2001
Location: England
Posts: 3,285
|
Try this: http://nic.dnsalias.com/NicAudio_alpha.zip
Might be worse, could be better. Don't have enough bad AC3/44.1k files to test on. I'm away tomorrow till Monday so thought I may as well post this, so I've got feedback on my return. -Nic |
24th August 2006, 17:23 | #12 | Link |
Registered User
Join Date: Sep 2002
Posts: 352
|
I will be back from San Fran to home Friday and will test it nic. I about 50% of what I captured (through 1394) from NCB-Unviersal HD have these issues. I will also try the projectX fix.
So is nero and besweet just "reading past" the errors??? Thanks for looking into this. When this is fixed I will post it in the MEGUI thread about this issue. Best Steve |
24th August 2006, 18:29 | #13 | Link |
Moderator
Join Date: Oct 2001
Location: England
Posts: 3,285
|
Yup, as is azid. It's definitely an error and all decoders I had glitched on it slightly.
With the original NicAudio, any problems would cause it to throw an exception back to AviSynth. This new version should handle it better, but I need more test streams to make it bulletproof. -Nic |
25th August 2006, 03:45 | #16 | Link |
Mr. Sandman
Join Date: Sep 2003
Location: Haddonfield, IL
Posts: 11,768
|
Is this alpha stable enough to put it in the megui autoupdate server or should i wait for a beta or maybe a stable version?
__________________
MPEG-4 ASP Custom Matrices: EQM V1(old), EQM AutoGK Sharpmatrix (aka EQM V2), EQM V3HR (updated 01/10/2004), EQM V3LR, EQM V3ULR (updated 04/02/2005), EQM V3UHR (updated 17/12/2004) and EQM V3EHR (updated 05/10/2004) Info about my ASP matrices. MPEG-4 AVC Custom Matrices: EQM AVC-HR Info about my AVC matrices My x264 builds. Mooo!!! |
25th August 2006, 08:40 | #17 | Link | |
BeHappy/MeGUI developer
Join Date: Oct 2003
Location: Moscow, Russia
Posts: 1,727
|
Quote:
__________________
BeHappy - AviSynth-based audio transcoding tool Audio encoding via AviSynth On2 VP7 is great in quality but it is unusable for long-term video backup puposes! Sincerely Yours, MCPD/MCTS |
|
25th August 2006, 10:55 | #18 | Link | |
Moderator
Join Date: Feb 2005
Location: Spain
Posts: 6,915
|
Quote:
Include DRC control and 5-channel bugfix, but don't support NicMPG123Source then is based in sources previous to 1.5 NicAudio_25_dll_20060314. Based in last sources I know (20060314), I make a new m2audio_ac3.cpp modified. I think solve this thread bug and the 44.1 KHz bug. There are still a problem related with this Nic's comment: "The length of the stream is calculated by the filesize/framelength, if the framelength can be variable this can't work." In fact I make a mod with: Code:
FrameCount = int((StreamLength - StreamOffset) / FrameLength); If (Samplerate == 44100) FrameCount = int(0.5 + 147 * (StreamLength - StreamOffset) / (640 * Bitrate))); I detect the 44.1 KHz bug testing Aften with the wav sample provided by jruggle. I encoded the sample with Aften and also with SoftEncode at 192 Kb/s. NicAudio crash with Aften encoded just at the begining (frame 4) but with SoftEncoded crash at frame 118. Here is the ac3 samples. To maintain 192 Kb/s we need Framesize = 192 * 640 / 147 = 835,918... bytes, then we need a 4% of frames with 834 bytes and a 96% of frames with 836 bytes. The encoder must maintain the proportion between short and long frames in order to preview the FrameCount with the StreamLength in: FrameCount = (147 * StreamLength) / (640 * Bitrate) I make some 44.1 KHz test with this results: Code:
Nominal Theoretic Real Real Calculated ac3 Bitrate FrameSize FileLength Bitrate FrameCount FrameCount Error ----------- -------- --------- ---------- --------- ---------- ---------- ----- 0030_aften 192 kbps 835.918 720560 191.999 862 861.998 0 0030_aften 224 kbps 975.238 840654 223.999 862 861.998 0 0030_aften 448 kbps 1950.476 1681310 447.999 862 861.999 0 0242_aften 224 kbps 975.238 6776930 224.000 6949 6949.000 0 4409_aften 192 kbps 835.918 105933426 191.999 126727 126726.998 0 0030_soften 192 kbps 835.918 719696 191.769 862 860.964 1 0030_soften 224 kbps 975.238 840388 223.928 862 861.725 0 0030_soften 448 kbps 1950.476 1681726 448.110 862 862.213 0 0242_soften 224 kbps 975.238 6775224 223.943 6949 6947.251 2 4409_soften 192 kbps 835.918 105816846 191.788 126727 126587.535 139 For SoftEncode the average FrameSize is = 1 + 2 * int(Bitrate * 320 / 147), 835 bytes for 192 Kb/s, and now: FrameCount = StreamLength / (1 + 2 * int(Bitrate * 320 / 147)) What is the correct method? I don't find anything in specs. What do others encoders? Please provide ac3 44.1 KHz samples with others encoders than SoftEncode, Aften or free encoders. |
|
31st August 2006, 17:11 | #19 | Link |
Moderator
Join Date: Feb 2005
Location: Spain
Posts: 6,915
|
At Swedish Radio there are some free samples ddwav 44.1 KHz 5.1 640 Kb/s.
I don't know the encoder but must be a commercial one because DRC is present. The test: Code:
Nominal Real Real Calculated ac3 Bitrate FileLength Bitrate FrameCount FrameCount Error ----------- -------- ---------- ------- ---------- ---------- ----- SURROUNDTEST 640 Kb/s 10128544 639,999 3635 3634,999 0 BILJAKTEN_LOW 640 Kb/s 11719576 640,000 4206 4206,000 0 FIREBIRD 1 640 Kb/s 23815314 639,999 8547 8546,999 0 DEMO2_DD 640 Kb/s 26052790 640,000 9350 9350,000 0 FrameCount = int(0.5 + (147 * StreamLength) / (640 * Bitrate)) Any new version to test (Nic/Dimzon)? |
Thread Tools | Search this Thread |
Display Modes | |
|
|