Log in

View Full Version : Multiple sources


mantis2k
18th March 2006, 11:20
How can I use AviSynth to input two or more MPEG1 sources into one output? I don't wish to join the sources before processing, but I want them to be joined after processing--if that makes sense?

Wilbert
18th March 2006, 12:16
Use DGIndex to create to d2v projects, and load them in AviSynth.

mantis2k
18th March 2006, 13:18
Use DGIndex to create to d2v projects, and load them in AviSynth.
Okay thanks, but there's got to be a lot more to it than that!?

Which Source function should I use for MPEG 1?

mantis2k
18th March 2006, 13:31
Sorry Wilbert, but that doesn't work... If I load two sources in AviSynth, it only uses the second one! :(

MPEG2Source("MPEG1SourceA.d2v",upConv=1)
MPEG2Source("MPEG1SourceB.d2v",upConv=1)

AviSynth ignores the first source, working only with the second source.

foxyshadis
18th March 2006, 13:50
Don't forget to use ++! + and ++ join clips, otherwise opening a new source just overwrites the last. Make sure you add them all on the same line.

mantis2k
18th March 2006, 13:57
Don't forget to use ++! + and ++ join clips, otherwise opening a new source just overwrites the last. Make sure you add them all on the same line.
Why have you listed 3 different operators? Which one do I use? I tried ordinary +, but it never worked. Please can you post an example script, so I know the correct syntax to use...

mantis2k
18th March 2006, 14:07
I just remembered you can add multiple sources in DGIndex, which also demultiplexes and joins the audio as a single d2v project, and appears to be working! No doubt the audio will go out of sync after the conversion though...

Wilbert
18th March 2006, 14:43
MPEG2Source("MPEG1SourceA.d2v",upConv=1)++MPEG2Source("MPEG1SourceB.d2v",upConv=1)

Doesn't this work?

mantis2k
18th March 2006, 15:53
MPEG2Source("MPEG1SourceA.d2v",upConv=1)++MPEG2Source("MPEG1SourceB.d2v",upConv=1)

Doesn't this work?
Yes, that works; thanks! I've started a 2nd conversion using this method, and will compare the audio to see if there's any difference in sync.

mantis2k
19th March 2006, 14:58
Both join methods resulted in 2 videos with exactly the same duration (01:26:05:19). However, first half of the audio is in sync, but not the second half!

foxyshadis
19th March 2006, 19:48
Is the audio in sync in the second one before joining, if you open it alone? Because if so using ++ should keep sync exactly. Hm.

mantis2k
19th March 2006, 20:33
Is the audio in sync in the second one before joining, if you open it alone? Because if so using ++ should keep sync exactly. Hm.
++ is only for using an elementary video source via a DGIndex project? DGIndex demuxes the audio, not including it as part of the source project, and seems to corrupt it.

I had to go round the houses to get round the audio sync problem, by joining the 2 MPEG 1 sources using MPEGVCR (downgrades video), and feeding this to TMPEGEnc for 48K conversion. It kept the sync.

Anyway, I would still be interested in a more efficient method? Can AviSynth source and frameserve an MPEG1 program stream? I suppose I better create a new topic for this...

foxyshadis
19th March 2006, 22:27
What you'd do is something like:

mpeg2source("1").audiodub(nicmpasource("1"))++mpeg2source("2").audiodub(nicmpasource("2"))

Unfortunately I think avisource is the only video-in that can give both a & v in one call.