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 24th November 2002, 02:28   #1  |  Link
Arkay
Registered User
 
Join Date: Oct 2002
Posts: 78
Avi with AC3 why isn't there a better way?

There's been a thread http://forum.doom9.org/showthread.php?s=&threadid=36094 that talks about muxing AC3 into avi (divx specifically).

I've been using nandub to interleave ac3 into avi and have found it trial and error the same as everyone else although the "recommended" settings in the audio faq do work 90% of the time, there's always one every now and then that doesn't though.

Then along comes a prog called avimux that claims to mux AC3 properly (although I'm not sure what criteria was used to judge that nandub doesn't do it right).

I've tried avimux and had great results on my encoding machine (can see the added smoothness and lesser HD/CD activity). Until I went and played it with SPDIF out. For some reason the AC3 codec doesn't switch my AMP to DD and I get a fast pulsing very loud static instead. I have to go into the codec, select stereo, then reselect SPDIF to get it to work. I don't get this problem with Nandub, all files play audio correctly when loaded although the "random" nature of nandubs interleave settings means I can and do get stuttery playback on some panning scenes on some rips. I am unable to fix this on my encoding machine (everything looks fine) but I don't have AC3 SPDIF capability to test it there. My playback machine isn't as quick but can play an avi stream with AC3 5.1 no problems if the interleave settings are right in the first place.

So, the question is. Why is the AC3 interleaving in AVI such a great mystery? Why isn't these something that can do it right, each and every time and why do avimux interleaved avi's not play properly.

My playback hardware config is:

P3 733
G400 Tv out
Sb Audigy (I know.. but it does work for AC3 with Nandub interleaving).
Intervideo codec (also tried others, same problems).

Surely there must be some explanations to all this. Why should it vary from one soundcard to the next or from one machine to the next?

If it truly can't be sorted out what is the point in divx with AC3 if we can't be gauranteed the same playback from one machine to the next. Not very future proof?

Ok.. There's my beef. Can someone please explain and can the author of avimux shed some light on why the first few frames of AC3 when used with that tool screwes playback?

There must be a way to figure out this mess. Alternately, what other formats could be used to contain divx with AC3? These problems don't occur with VOB's... Why not?

Cheers,
Arkay.
Arkay is offline   Reply With Quote
Old 24th November 2002, 07:02   #2  |  Link
ChristianHJW
Matroska Team
 
ChristianHJW's Avatar
 
Join Date: Nov 2002
Location: Bavaria - Germany
Posts: 1,341
Re: Avi with AC3 why isn't there a better way?

Quote:
Originally posted by Arkay There must be a way to figure out this mess. Alternately, what other formats could be used to contain divx with AC3? These problems don't occur with VOB's... Why not? Cheers, Arkay.
There are no proper standards to use AC3 in AVI, thats the problem. AVI normally only supports audio through the ACM interface API, and there is no such thing as an AC3.ACM codec, so everybody is using his own little 'hack' to mux it in ( same as VBR MP3 ) and in the end there is no compatibility.

MCF will solve this problem finally, as AC3 audio is a part of the specs and the container is based on timestamps for each block, so syncing will be guaranteed in any case.

Please dont ask me now when you will be able to use it, the specs are in final discussion and likely to be frezed soon, and we have an alpha of Suiryc's VdubmodMCF being tested. But there is still a hell lot of work for the team, i'd like to motivate anybody to contribute, especially people with c/c++ programming skills .

http://mcf.sf.net
ChristianHJW is offline   Reply With Quote
Old 24th November 2002, 12:25   #3  |  Link
Arkay
Registered User
 
Join Date: Oct 2002
Posts: 78
ChristianHJW,

Thanks for the reply. Just checked out the link and MCF would appear to be everything that is needed. I congratulate you on getting stuck into something of this magnitude.

Good luck with the project. I'll be watching keenly for the first beta's. I'd offer to alpha/beta test for you but you probably have more than enough people doing that already.

Looks like for now I'll stick with nandub for AC3 until MCF is available.

Cheers,
Arkay.
Arkay is offline   Reply With Quote
Old 24th November 2002, 19:18   #4  |  Link
janosch
Registered User
 
Join Date: Aug 2002
Posts: 21
Re: Avi with AC3 why isn't there a better way?

Quote:
Originally posted by Arkay

...Until I went and played it with SPDIF out. For some reason the AC3 codec doesn't switch my AMP to DD and I get a fast pulsing very loud static instead. I have to go into the codec, select stereo, then reselect SPDIF to get it to work.....
Cheers,
Arkay.

i have the same problem with AVImux, although all says it works better than Virtualdub_ac3 or nandub.
What you have done exactly to fix the problem, which codec, the output control of your soundcard or what ?

CU

Last edited by janosch; 24th November 2002 at 19:23.
janosch is offline   Reply With Quote
Old 25th November 2002, 06:00   #5  |  Link
Arkay
Registered User
 
Join Date: Oct 2002
Posts: 78
What I did to fix the problem was to go back to using nandub and hoping the interleave settings I'm using are right for a particular clip.. Of course, when I go to play it on my playback machine with SPDIF it may not be. Unfortunately until I get my home network finished I won't be able to test play anything without burning to CD first which is most annoying.

Cheers,
Arkay.
Arkay is offline   Reply With Quote
Old 25th November 2002, 11:35   #6  |  Link
alexnoe
Banned
 
alexnoe's Avatar
 
Join Date: Aug 2002
Location: Germany
Posts: 1,737
@Arkay:

I've received a second report about the same problem.

The criterion used to judge NanDubs interleave method was that it cuts AC3 frames in the middle.

I still have no idea where the problem comes from, but did you try AVI-Mux GUI with small interleave values (e.g. 3 frames)? Did you try both rec-lists being switched on and off?
That's not a solution, it's just a test
alexnoe is offline   Reply With Quote
Old 25th November 2002, 12:05   #7  |  Link
Arkay
Registered User
 
Join Date: Oct 2002
Posts: 78
I haven't tried any other settings other that the defaults which looked perfect on my encoding machine. I tested it on a panning scene that I just couldn't get right in nandub and it looked perfect. It wasn't until I burned a CD and tried it on the playback machine that I noticed the problem.

I might have a go at getting Avimux working properly when I get the network connected to my playback machine and don't have to cut a cd for every test. (I don't have a Rewritable burner unfortunately).

Interestingly though if I switched the codec back to stereo, then back to SPDIF it fixed the problem and playback was smooth. It appears to me to be something at the very beginning of the AC3 that possibly got thrown at my soundard too quickly? Maybe it has to do with the preload number. With nandub I use 64/64 or 128/128 with most rips. Maybe 500/75 caused the problem.

Cheers,
Arkay.
Arkay is offline   Reply With Quote
Old 25th November 2002, 12:11   #8  |  Link
alexnoe
Banned
 
alexnoe's Avatar
 
Join Date: Aug 2002
Location: Germany
Posts: 1,737
I have a trace. DirectShow might misinterprete the dwSuggestedBufferSize and dwInitialFrames values in the audio header.

I've adapted these values to be the same as for NanDub output (i.e. dwInitialFrames=1, dwSuggestedBufferSize = 2*AC3-Framesize).

These values do not mean anything for the SPDIF-out. If they fix the problem, then this is another thing where muxing programs have to take care of DirectShow bugs

http://www-user.tu-chemnitz.de/~noe/...ux_GUI-Eng.exe
alexnoe is offline   Reply With Quote
Old 25th November 2002, 12:26   #9  |  Link
Arkay
Registered User
 
Join Date: Oct 2002
Posts: 78
Hehe... Man.. That was quick turnaround time. If you have ICQ send me an email and I'll give you my number. Looks like you're up at the same time as me so I can maybe run some tests while we chat.

I'm about to burn a 100MB clip to test with. I've used settings of 128/128 (just to make sure about the AC3 frame size being multiples of 32). I'll go test it in a minute.

Cheers,
Arkay.

Last edited by Arkay; 25th November 2002 at 12:59.
Arkay is offline   Reply With Quote
Old 25th November 2002, 13:11   #10  |  Link
alexnoe
Banned
 
alexnoe's Avatar
 
Join Date: Aug 2002
Location: Germany
Posts: 1,737
Don't use AVI-Mux GUI with an interleave of 128. I've found that this doesn't make sense.

About the multiple of 32: That is only important for NanDub.
alexnoe is offline   Reply With Quote
Old 25th November 2002, 13:59   #11  |  Link
Arkay
Registered User
 
Join Date: Oct 2002
Posts: 78
Ok.. I've run some test. Burned 7 clips to a cd with differing interleave values on a panning scene, including variations of reclist/noreclist, opendml or not, legacy or not.

All of them exibited the failing to switch to DD on the amp and the resultant static. Switching to stereo then back to SPDIF fixed it so I could check the actual panning scene with correct audio.

I found that with the SPDIF all the interleave settings worked quite nicely. Some strained the CD more than others but none were jerky (even 128/128 was good).

What I then tried was changing the default output device of the intervideo codec.

You'll be glad to know the problem seems to be related to sound card drivers and the way they pass through AC3.

I have a shitty SB Audigy. With nandub files and output set to default wave out everything works fine (except for the interleave jerkiness problems). With avimux default waveout doesn't work. Neither does any other setting either though (tried directsound) and I do get sound, without the static but in PCM, not AC3.

Also tried the cyberlink codec and got the same symptoms.
Tried bsplayer, powerdivx and powerdvd's open media file.

Nandub does something different on those first few frames that hit the soundcard driver. If you can nail what that might be you'll be laughing. Obviously this only occurs on very few soundcards and probably SB cards at that.

I'm going to look if creative have yet managed to write a decent driver. I'd be very interested to see if linux playback on the Audigy would be any better. If I can find a small drive big enough for linux I'll build a player on that one day soon and see what we get then...

Ok.. Hope that helps a little.

Cheers,
Arkay.
Arkay is offline   Reply With Quote
Old 25th November 2002, 15:48   #12  |  Link
ChristianHJW
Matroska Team
 
ChristianHJW's Avatar
 
Join Date: Nov 2002
Location: Bavaria - Germany
Posts: 1,341
Quote:
Originally posted by Arkay ChristianHJW,
Thanks for the reply. Just checked out the link and MCF would appear to be everything that is needed. I congratulate you on getting stuck into something of this magnitude.
Thanks for the motivating words mate. I just hope we are NOT stuck, and in fact it seems we are finally progressing nicely, after a long period of a 'creative break' ...

Quote:
Good luck with the project. I'll be watching keenly for the first beta's. I'd offer to alpha/beta test for you but you probably have more than enough people doing that already.
Thanks for the offer. In fact this is not the case, we still accept alpha testers for VdubModMCF, especially people with a bit of technical background. Just drop in on irc.openprojects.net , #mcf or #uci during the European evening hours, we will meet there with high probability.

Much more than people wanting to contribute as alpha testers we are searching for supporters of the project in general, and there is still a lot to do, even tasks that dont require C/C++ coding skills, like php coding, Java, website updating, etc. .... in fact, one of the most important motivations for me to tell people about MCF again and again is the fact that our team is sinmply too small for the big task we accepted. Any help is highly appreciated, however small it will be.

Quote:
Looks like for now I'll stick with nandub for AC3 until MCF is available
Even if you would decide to join the alpha testing team, you still had to use nandub or VirtualdubMod for the time being, because the MCF files created with the existing alpha tools will not be spec compliant once we update libmcf to meet with latest specs ( which can be found here : http://mcf.sf.net/EBMLed/
), so all the old existing MCF files will be broken, non-playable files :-( .
ChristianHJW is offline   Reply With Quote
Old 25th November 2002, 18:30   #13  |  Link
dvd2svcd
Moderator
 
dvd2svcd's Avatar
 
Join Date: Oct 2001
Location: On top of the world!
Posts: 1,837
OT:

Isn't there enough developers on EW's forum, huh? I mean since you've re-registered here you haven't done anything but trying to promote MCF and getting developers to join the MCF team. Don't misunderstand me, MCF is a good (albeit huge) idea. But, I'd like to see a few posts from you here on this board where you're actually helping other users without mentioning MCF. I mean, the basic idea of this forum is to help other people with their problems, not inviting developers to join any teams. I'd say that this borders to breaking rule number 5. I'd call your posts intelligent spam.

Anybody who thinks this is uncalled for just search and read all ChristanHJW's posts. It's like listening to a broken record.
__________________
Cheers,
dvd2svcd

Last edited by dvd2svcd; 26th November 2002 at 00:36.
dvd2svcd is offline   Reply With Quote
Old 25th November 2002, 19:10   #14  |  Link
alexnoe
Banned
 
alexnoe's Avatar
 
Join Date: Aug 2002
Location: Germany
Posts: 1,737
The cause for the trouble is isolated. I'll add a workaround to make shitty-SB-compliant AC3 audio.

Try this:
http://www-user.tu-chemnitz.de/~noe/...ux_GUI-Eng.exe

Last edited by alexnoe; 25th November 2002 at 20:26.
alexnoe is offline   Reply With Quote
Old 25th November 2002, 23:56   #15  |  Link
Arkay
Registered User
 
Join Date: Oct 2002
Posts: 78
Alex,

Excellent, thanks for the update. I'll try it out tonight when I get home from work.. Stay tuned.

-Arkay
Arkay is offline   Reply With Quote
Old 26th November 2002, 04:18   #16  |  Link
Arkay
Registered User
 
Join Date: Oct 2002
Posts: 78
Alex,

Ok. Tried it out at home at lunch. Everything is fine.. Thanks!!
Amp switches direct to DD as we expected.

I used the default 500/75 settings and was amazed at how little the cdrom accessed to read. Awesome.. and smooth too!!

As you say this is a workaround should I wait for a stable release before I go and do all my avi's this way? Or do you mean that it's fixed and won't change in future releases?

Thanks for the help.

Cheers,
Arkay.
Arkay is offline   Reply With Quote
Old 26th November 2002, 08:24   #17  |  Link
alexnoe
Banned
 
alexnoe's Avatar
 
Join Date: Aug 2002
Location: Germany
Posts: 1,737
I don't intend to change it again, unless more reports about bad SB drivers arrive
alexnoe is offline   Reply With Quote
Old 26th November 2002, 09:37   #18  |  Link
ookzDVD
DVD Rebuilder!
 
ookzDVD's Avatar
 
Join Date: Oct 2001
Posts: 1,147
@Arkay,

I think you should give .ogm a try,
you gonna love it.
ookzDVD is offline   Reply With Quote
Old 26th November 2002, 15:25   #19  |  Link
Arkay
Registered User
 
Join Date: Oct 2002
Posts: 78
Quote:
Originally posted by ookzDVD
@Arkay,

I think you should give .ogm a try,
you gonna love it.
Could you elaborate a little more for me? Is that the ogg container format? I've seen a few posts here and there but ignored them cause my brain couldn't handle any more!

I could use some clarification. I understand ogg audio is pretty good but how can you get 5.1 SPDIF with it? If ogg and ogm are even related. I've been trying to avound learning any new tools having just gone through a couple of brain numbing months of learning avs scripting, filter usage, AC3 encoding/decoding/interleaving, interlacing, NTSC Telecine and IVTC, Pal deinterlacing etc etc.. basically I new nothing about 2 months ago :-)

I still dunno if my brain is up to it yet

Cheers,
Arkay.
Arkay is offline   Reply With Quote
Old 27th November 2002, 03:24   #20  |  Link
ookzDVD
DVD Rebuilder!
 
ookzDVD's Avatar
 
Join Date: Oct 2001
Posts: 1,147
@Arkay,

Sure,

.ogm it's just a container which could mux many types of media,
if you want to get 5.1 SPDIF output, you can keep the .ac3 file,
and mux the .ac3 to the .avi just like nandub does without worry
about interleave setting

the other advantages are with the .ogm format, you can mux not just
the video (.avi soundless) and audio (.ogg / .mp3 / or .ac3) but
you even can mux the subtitle (.srt) and chapter info (which
generated by ChapterExtractor), those can't be done by (nandub).

the most powerful ogm muxer is Cyrius's Ogmuxer, which you can
get from his website : http://cyrius.bunkus.org

and for playback you should install the Tobias DirectShow Filter,
which you can download it from : http://tobias.everwicked.com

Goodluck.
ookzDVD 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 10:29.


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