Log in

View Full Version : Mux AVI with AC3 and MP3 (VBR or not), which is the correct way to do it?


kwyjibo99
30th July 2003, 21:56
That's what I got:

An original AVI file, FPS 23.976 and an AC3 audio track 448 kbps

An extracted AVI part from the original, with the same FPS, now 20:30 length

An extracted AC3 audio from the original (to fit the extracted AVI)

A (future) MP3 audio file extracted from a 25 FPS AVI and 44100 Hz (now is PCM wav, waiting to be compressed to CBR or VBR or ABR)

I want to MUX the extracted AVI with the extracted AC3 and the MP3...

But I found this situations:

If I mux the extracted AVI with the extracted AC3 everything is alright, no problems with sync (that's logical)

If I mux the extracted AVI with the extracted MP3 everything is alright too

If I mux the extracted AVI with the AC3 as first audio track, and the MP3 as the second, first track sounds ok, but second:
- With ABR and CBR from BeSweet (lame), sync get lost...
- With CBR (Fraunhoffer saved from CoolEdit), everything seems ok, but only for a few minutes, then sound stops suddenly, when I seek the sound returns but only for the same few minutes... And

If I mux the extracted AVI with the MP3 as first audio track, and the AC3 as the second, first track have same problems as before, and also, second track now sounds creepy (with artifacts)

I've used VirtualDubMod for muxing, but also I tried NanDub, AviMux, and Oggmux with the same results.

What's the problem? Maybe AVI container must have both audio tracks with the same format? Any solutions?

bond
30th July 2003, 22:17
there is a change framerate option in besweet (25000 -> 23976)! use it while transcoding the mp3 (i would use abr)

wierd that the ac3 has "artifacts" when muxed as second audio...
you can also try matroska (and .ogm too in the future)

kwyjibo99
30th July 2003, 22:36
I'm trying your suggestion, but without that modification (and only with the mp3 track) the sync was correct...

Edit:

I tried it, and it losts sync...

kwyjibo99
30th July 2003, 23:14
Well... I don't know what I've done, but now both tracks sounds well and sync'd. The problem now is that the avi don't play as fluent as other (I think is not proccessor capablilitie problem)...

kwyjibo99
31st July 2003, 15:25
The problem now is that MP3 track stops when it has been playing for a minute (come back when I seek with the scroll bar to stop again in a minute) and AC3 track has strange noise (like frying a egg, but only when muxed) and runs faster. Sync is ok in both tracks and there's no problem muxing only one track.

Those problems are present in Windows Media Player, not in other players like Media Player Classic... In addition, I try to uninstall Morgan Stream Switch, thus both tracks played ok (but simultaneously).

Any idea why I get sound stopped?

bond
31st July 2003, 15:44
wmp is crap, if it works fine in other players stay with them...

otherwise

1) try playing the file in graphedit -> if it works there, you can be sure that the file is fine and should work in every good (!) directshow based player!

2) open the file in virtualdubmod and scan for frame errors (under video tab i think)

kwyjibo99
31st July 2003, 16:30
graphedit has the same problems as wmp... because is using morgan stream switcher... (I think this is the problem, because both wmp and graphedit were using morgan stream switcher but media player classic has it own switcher...)

Is there any other switcher?

(Sorry for my funny english ;))

bond
31st July 2003, 16:35
interesting,

other players like bsplayer and zoomplayer have also their own switchers inbuild
to my knowledge there is no alternative standalone switcher available, but the sources from gabest's one are available here (http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/guliverkli/guliverkli/src/filters/switcher/audioswitcher/)! perhaps you can bug gabest so he compiles it and up it on his page...

brute
2nd August 2003, 20:25
by the way...

which program do you use to mux the avi with audio?

If you're using nandub, try AviMux (http://www-user.tu-chemnitz.de/~noe/Video-Zeug/AVIMux%20GUI/AVI-Mux_GUI-1.14.exe)

It'*s much better and easier, and you haven't to set interleaving, as AviMux uses it automatically...

kwyjibo99
4th August 2003, 15:36
I used AviMux...

I'm sure is a Morgan Stream Switcher problem. Now it's open source, so I hope they fix it soon.

Morgan Stream Switcher Open Source Project (http://corecodec.org/projects/mmswitch)