View Full Version : ac3source
Marc FD
8th December 2002, 12:46
Hi ^^
i coded it last WE, and i've totally fixed synchronisation now.
it's fast-coded, but it works very well on regular demuxed ac3 streams.
i can attach a preview with stereo mode if anybody is interessed.
and i can add multichannel support (all downmixes possibles) and dynamic reduction.
Regards,
MarcFD
Richard Berg
8th December 2002, 13:16
No link provided -- is it attached to your post? (Guess we'll have to wait for a mod.)
I'm sure the AVS 2.5 folks will be very interested in testing the new multichannel support, so if you're looking for which feature to add next that's my suggestion.
Guest
8th December 2002, 15:11
Nothing was attached.
Marc FD
8th December 2002, 17:12
i've attached nothing because i'm not sure it'll be usefull for anybody.
and you know i'm very very short in time ^^
it's why i ask if it's interressing someone.
1) i created this because i like to play my DVDs with
MPEG2Dec3+ac3source to BSplayer without having 1.5 Gb wav files (my HDD is too small)
2) stereo is enough for me.
3) i don't have 5.1 harware.
so i'll release it, and maybe implement multichannel support and other stuff, only if there are users for it.
(yes i'm too lazy to pack my filters ^^.but i'll do an effort for my 3d filter)
Xenoproctologist
9th December 2002, 04:28
I know I'd definitely find it useful for my fansubbing. If I could leave the .ac3 intact, it'd remove my need to compress intermediate audio steps for temporary storage. Granted, LAME alt-preset extreme isn't exactly a major quality loss, but it'd make me feel better if I didn't have to do it.
And a stereo-only preview would be wonderful. :)
neo_sapien
9th December 2002, 05:46
So this would direct stream the intact ac3 file, or would it always decode during playback/virtualdub?
I'm very interested, I just don't understand what limitations there would be. What I'm interested in is something that could let me do this:
Video=mpeg2source("project.d2v")
Audio=ac3source("audio.ac3")
Audiodub(Video,Audio)
Movie=trim(0,50000)
#Intermission=trim(50001,60000)#--I want to cut this part out
Movie_Again=trim(60001,100000)
Return Movie+Movie_Again
Would that AVS script return video+intact ac3, or video+decoded ac3 (wav)?
Thanks for your efforts :)
Richard Berg
9th December 2002, 09:47
Avisynth currently has no facilities to manipulate or output compressed video, so I imagine the same holds for compressed audio.
I asked earlier if "direct stream copy" was a feature we should support and didn't get any positive responses, but perhaps the possibility of doing it with audio is changing minds? It shouldn't be too difficult: we'd need to add a parameter to Source filters which sets the video and/or audio framebuffers to read-only (since they'd be filled with what essentially looked like garbage), then set the FOURCC of the outgoing fake-AVI appropriately.
Wilbert
9th December 2002, 11:29
and i can add multichannel support (all downmixes possibles) and dynamic reduction.
That would really be nice.
It would be better if we can extract the uncompressed 6 ch. wav from dvd2avi and downmix it in AviSynth itself (is that possible?). Tom can you modify dvd2avi, making this possible?
I asked earlier if "direct stream copy" was a feature we should support and didn't get any positive responses
I don't see the need for this, otherwise that muxing/demuxing in Virtualdub would not be necessary. If we are going to do this, must commands like Trim be modified?
Nic
9th December 2002, 11:42
@MarcFD:
If you throw me the source ill put in direct vob support ;) Sorry for not replying to your last email, ill send the new mpegdecoder source soon (I dont know who came up with only 24hrs in a day, but it was not very pragmatic of them ;) )
@wilbert: Ive never liked ac3dec used in d2a for quality, my version of it uses BeSweet.dll for the decode. its still alpha but if you need it for anything like that Ill send it your way (I could do with the external testing ;) )
-Nic
sh0dan
9th December 2002, 11:43
IMO opinion we should add wave export functions to AviSynth. This would allow you to trim, edit and do all kinds of other stuff to the video, and still get the sound out right. A PCM wave writer shouldn't be that hard, IIRC.
Marc FD
9th December 2002, 13:44
>it'd remove my need to compress intermediate audio steps for temporary storage.
that's why i coded it ^^
>And a stereo-only preview would be wonderful.
okay i'm gonna pack that.
>If you throw me the source ill put in direct vob support
>Sorry for not replying to your last email, ill send the new mpegdecoder source soon
i'm waiting for the reply.
i think it'ld be a good idea to merge the 2 projects, because ac3source can _only_ seek on demuxed streams (ac3 is cbr).
but the vob parsing could feed ac3 frames to the decoder during MPEG-2 decoding. that's how we can keep synch and seeking and speed ^^.
>(I dont know who came up with only 24hrs in a day, but it was not very
>pragmatic of them )
yep. maybe that's why i'm not really "slow".
Marc FD
9th December 2002, 15:29
here you have.
enjoy ^_^
(attached "ac3source preview.zip")
Nic
9th December 2002, 15:37
I hope, if it is based on liba52 or similar...you'll be complying to GPL & releasing the source with it ;) :devil: lol
Take Care,
-Nic
Marc FD
9th December 2002, 15:51
>I hope, if it is based on liba52 or similar...
you guess right.
>you'll be complying to GPL & releasing the source with it
that's why it's a preview !!
you all know i do opensource developement, i'm just to lazy to release source who nobody will look at ^^.
BTW, i'll give you the source when i would reply to the mail you would send to me as a reply to the mail i send to you ^_^
Nic
9th December 2002, 16:14
Thats not quite how GPL works is it? ;) Oh well mate, be in touch soon.
-Nic
Marc FD
9th December 2002, 16:49
GPL says sources should public. if anyone wants them, i'll e-mail them.
happy ?
Nic
9th December 2002, 17:15
Ok then, I want them. :D You've got my address :)
Then im happy. :)
-Nic
Richard Berg
9th December 2002, 19:42
I don't see the need for this, otherwise that muxing/demuxing in Virtualdub would not be necessary. If we are going to do this, must commands like Trim be modified?
VirtualDub is able to trim in direct-stream mode so it's possible, just requires more work. (If trimming's not necessary, all we need is to hold a pointer to a big chunk of "I don't know how to deal with this stuff" memory, and let the invoking program write that to disk or feed it to a codec or whatever.)
Wilbert
11th December 2002, 16:43
@Marc FD,
Could you add multichannel support (and include downmix as an option). This stereo downmix, is that similar as Dolby Pro Logic I (my audio knowledge is bad, so it's probably a stupid question)?
Marc FD
11th December 2002, 18:52
> Could you add multichannel support (and include downmix as an option).
okay, i'll see that next WE.
>This stereo downmix, is that similar as Dolby Pro Logic I (my audio
>knowledge is bad, so it's probably a stupid question)?
it's the stereo downmix specified in the ac3 specs i think.
Stabmaster-Arson
12th December 2002, 23:56
Outputting the final wav file, trimmed etc, would be killer!
Marc FD
13th December 2002, 17:04
> Outputting the final wav file, trimmed etc, would be killer!
you can do that. frameserve to VDub. that's how i trim many anime on one DVD for exemple. that's always some GBs temp wav less ^_^
Shootist
23rd December 2002, 21:52
Hi,
I have got a little problem with the syntax of ac3source.dll. I use this script:
# PLUGINS
LoadPlugin("D:\Programme\DVD-Utilities\Avisynth\avisynth2.5x_dlls\MPEG2Dec3.dll")
LoadPlugin("D:\Programme\DVD-Utilities\Avisynth\avisynth2.5x_dlls\ac3source.dll")
LoadPlugin("D:\Programme\DVD-Utilities\Avisynth\avisynth2.5x_dlls\Convolution3DYV12.dll")
#
# SOURCE
Video=Mpeg2Source("D:\Save\Star Wars Episode II\vts_01.d2v")
#
# CROPPING
Video=Crop(Video,4,72,716,434)
#
# RESIZING
Video=lanczosresize(Video,544,224)
#
#Convolution 3d
Video=Convolution3D(Video, 0, 3, 4, 3, 4, 2.8, 0)
#
# FINISH
return ac3source(Video, "D:\Save\Star Wars Episode II\swe2.ac3")
The ac3 is loaded into Vdub and VdubMod. But after encoding only the right channel plays sound, not the left. I tried the normal syntax written in the readme but with an "invalid arguements error". Use the Ac3filter0.62b to play in Zoomplayer. I discussed this little problem with Wilbert in this thread:
http://forum.doom9.org/showthread.php?s=&threadid=41059
Marc FD
29th December 2002, 22:44
huh ? strange...
honestly, i dunno why it doesn't work ^^.
did you try on others ac3 files ?
Shootist
30th December 2002, 13:11
will try, but I don`t think this is be the problem
luders
14th January 2003, 22:15
So I tried using ac3source with avisource and a false parameter to cancel the avi sound but it did not work. Only for use with mpeg2source? -Aaron
Shootist
15th January 2003, 07:36
definetly not the ac3 tried other
luders
15th January 2003, 08:05
Sorry, what does that mean?
Wilbert
15th January 2003, 10:27
So I tried using ac3source with avisource and a false parameter to cancel the avi sound but it did not work. Only for use with mpeg2source?
Can you give your script? I didn't try it but I think you don't need to remove the sound of your avi.
video=avisource(blabla)
AC3Source(video,"c:\audio.ac3")
should work fine even if blabla has an audio stream, I guess.
luders
17th January 2003, 08:56
loadplugin("C:\Program Files\AviSynth2\plugins\ac3source.dll")
video=avisource("c:\dvd\towers\towers.avi")
ac3source(video, "c:\dvd\towers\ac3_fixed01_fix.ac3")
I tried with and without the loadplugin as it should be loaded automatically. I tried with and without false on the avisource to cancel its audio. I tried with and without video= and video, where it would just be
avisource...blah
ac3source...blah
Currently I recieve:
ACM failed to suggest compatible PCM format.
Any ideas. -Aaron
kitsaros2000
30th January 2003, 18:39
I can hear only the background voices. There is a problem downmixing the ac3 i think ...
Pls any help ?
sh0dan
30th January 2003, 19:21
This is a general issue - but since Marc hasn't put up the sources (as he actually is supposed to), there isn't much we can do.
kitsaros2000
30th January 2003, 19:26
i see...
Is there any other method to put an ac3 in avisynth (with downmix) ?
I just dont want to convert ac3 to wav ...
For istance can i use azid/besweet somehow with avisynth ?
Thx for your time
sh0dan
30th January 2003, 19:28
Not at the moment, no, if you don't want WAV-files. :(
kitsaros2000
30th January 2003, 19:32
i can be wrong but if i can hear the backround voices how about using/combining the getchannel function with the ac3source ...
I already did it with no results :(
thx anyway !
sh0dan
30th January 2003, 20:25
How many channels does it report when you run the info() filter?
kitsaros2000
30th January 2003, 21:04
Has audio : YES
channels 2
sh0dan
30th January 2003, 23:29
Seems like the filter only outputs two channels - nothing we can do then :(
kitsaros2000
31st January 2003, 16:14
thx anyway ...I hope that this filter will work on the future . Its is a grea idea . :devil:
Marc FD
2nd February 2003, 21:11
hi.
for the source - i'll give it when i would have internet again ^^
sh0dan
2nd February 2003, 23:53
Really great to hear, mate! :)
Though we had lost you forever ;)
ffroms
4th February 2003, 09:11
I have strange problem. It seems that AC3Source only works in YV12 mode. I've used simple script
Movie=AVISource("c:\test\test.avi")
Audio=AC3Source("c:\test\test.ac3")
AudioDub(Movie,Audio)
When I open script like that I got error (something like missing parametar in AC3Source). I've tried next thing and disable sound and open script in VirtualDubMod and look under info and it shows that video is RGB. OK, I've added ConvertToYV12 and everything is OK, but at the end of script I've put ConvertToYUY2 and again I've got same error. My finale script looked like this
Movie=AVISource("c:\test\test.avi").ConvertToYV12
Audio=AC3Source("c:\test\test.ac3")
AudioDub(Movie,Audio)
ConvertToYUY2 #This for use in CCE SP 2.50
It looks like AC3Source cannot work in anything else than YV12. Is this correct and will it be fixed?
FFS
P.S. I'm using latest avisynth 2.5 beta and ac3source beta 1 from Marc's homepage.
Wilbert
4th February 2003, 10:08
You got to read the readme, the syntax must be something like the following:
Movie=AVISource("c:\test\test.avi").ConvertToYV12
AC3Source(Movie,"c:\test\test.ac3")
ConvertToYUY2 #This for use in CCE SP 2.50
ffroms
4th February 2003, 10:23
Yes, I saw that, but example shows that it can be opened only AC3 without video
ex :
MPEG2Source(mydvd.d2v)
AC3source(mydvd.ac3)
and it works like that when you stay in YV12, but when I add ConvertToYUY2 or AVI source is in RGB returns error. Anyway, I'll try like you said.
FFS
Wilbert
4th February 2003, 10:45
That example is with video. Try this
AC3source(mydvd.ac3)
MPEG2Source(mydvd.d2v)
will not work, I think.
Movie=AVISource("c:\test\test.avi").ConvertToYV12
AC3Source(Movie,"c:\test\test.ac3")
ConvertToYUY2 #This for use in CCE SP 2.50
is exactly the same as
AVISource("c:\test\test.avi").ConvertToYV12
AC3Source("c:\test\test.ac3")
ConvertToYUY2 #This for use in CCE SP 2.50
But I guess the latter also fails?
ffroms
4th February 2003, 13:56
Sorry for bringin false alarm, but it seems to be problem at my PC. Here , at work, everything works with script I posted earlyer.
AVISource("C:\test\test.avi",false)
AC3Source("C:\test\test.ac3")
ConvertToYUY2
Same AVI is now opens in YV12 without ConvertToYV12 and audio works. I can now only report same problem as someone early. There is only right channel in output so that could be bug.
Sorry again and I have to check my PC at home why it's opend in RGB.
FFS
ffroms
6th February 2003, 12:50
I've just tested new beta 2 ac3source.dll and there is still same problem. In output there is only right channel. I've hoped that would be fixed but nothing. I guess I have to wait for next version.
FFS
kitsaros2000
7th February 2003, 00:10
yep ... the problem is still there :rolleyes:
killingspree
7th February 2003, 18:12
ok here's my script, but actually i don't think it matters...
loadplugin("C:\Programme\avisynth 2.5\plugins\ac3source.dll")
avisource("roadtrip 5th.avi")
ac3source(last,"roadtrip ac3 t01 3_2ch 448kbps delay 0ms.ac3")
my problem is that, when trying to load the file, i'm getting the error "...ac3source.dll is not a valid avisynth 2.5 plugin"
afaik, it ONLY works with 2.5, correct me if i'm wrong
any suggestions??
regards
steVe
Wilbert
10th February 2003, 10:21
Did you download the latest version?
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.