PDA

View Full Version : SetSource is not working anymore after Open ?


len0x
18th October 2003, 22:36
I've been struggling with VDubMod 1.5.4.1. I used to be able to use SetSource function in scripts after I opened video which already contains audio with 1.5.1.1 with no probs. Now I get an error saying that source already been initialized :(

The reason I'd like to be able to set source is that I'm setting nandub compatibility mode with it. And if I don't then by default VBR header gets overwritten with CBR header. So is there a way to be able to use it without user having to set that manually in preference?

Suiryc
19th October 2003, 16:00
Oh, maybe I know what's the matter.
To help programs trying to achieve direct remuxing using VirtualDubMod (i.e. opening the source file - AVI, OGM, MKV - and saving to another without recompressing nor editing) the behaviour in the scripts has been changed.

In the past the Open function would open the video file, but throw all audio/text streams at once. Thus you would have to use SetSource to load each source by hand. This is troublesome for applications that just want to remux and thus don't know the content of the file (if they don't know exactly how many streams - and what kind of streams - there are in the file, there is now way the app can do the remuxing).

Now (since 1-2 weeks) the behaviour is to load all the streams in the file. This way apps willing to remux just have to Open and then Save.

Even so VirtualDubMod would use the "RemoveInputStreams" function in all scripts (just after Open), which is supposed to remove all streams (except the video). With the old behaviour this function was redundant, but now is needed for the new behaviour.

My guess is that you downloaded the exe on my site which now has this behaviour, and that up to now you didn't use the "RemoveInputStreams" function.

len0x
19th October 2003, 22:08
Originally posted by Suiryc
[]My guess is that you downloaded the exe on my site which now has this behaviour, and that up to now you didn't use the "RemoveInputStreams" function. [/B]

you totally right! so you're saying if i use removeinputstreams then all my problmes go away? - that's relly good. thanks.

p.s. indeed i use you version of vdubmod, and so are thousands others who use gk 0.28.6 which i shipped with your version :)

p.p.s. btw, if you deal with vbr mp3 source just for remuxing, like i had to do when i didn't know that i have to remove input streams, you'll ruin sync of good source. so i wonder is there a way you can automatically detect which mp3 source is inside video file and appropriately initialize it ?

Suiryc
19th October 2003, 22:42
Originally posted by len0x
p.p.s. btw, if you deal with vbr mp3 source just for remuxing, like i had to do when i didn't know that i have to remove input streams, you'll ruin sync of good source. so i wonder is there a way you can automatically detect which mp3 source is inside video file and appropriately initialize it ?
When opening the file and loading all its streams the default user settings concerning VBR MP3 are applied. If the default settings are to fix the VBR header (as VirtualDub) then the sync will be lost indeed (as per user request). Otherwise the sync should be kept (since the VBR header won't be fixed).