Log in

View Full Version : Merging more d2v files


litium
18th January 2006, 13:28
I need to feed GK several d2v files in the same "batch" to get a single avi output with all the parts merged in a single avi.
Is there a way to merge d2v files to create a single one and feed it to GK?

Aim is to move away during the conversion some advertsemens contained in a show dumped from sat.

Thanx
L

unskinnyboy
18th January 2006, 18:17
Two ways you can do it:

1)
clip1 = mpeg2source("first.d2v")
clip2 = mpeg2source("second.d2v")
...

movie = clip1 + clip2 + ...

2) Create a single d2v in the first place which indexes all the vobs you want to be merged and then use that d2v.

litium
18th January 2006, 22:05
My d2v files look like :

DGIndexProjectFile11
1
D:\060116_235957 Dumpedstuff.mpg

Stream_Type=1
MPEG_Type=2
iDCT_Algorithm=6
YUVRGB_Scale=1
Luminance_Filter=0,0
Clipping=0,0,0,0
Aspect_Ratio=4:3
Picture_Size=704x576
Field_Operation=0
Frame_Rate=25000
Location=0,34895,0,ADCEC

Then a long list of lines like this:
900 5 0 440707072 0 0 32 32 92 b2 b2 a2 b2 b2 a2 b2 b2 a2
...
FINISHED 0.00% FILM

It's not clear to me where I should put the clip/movie lines you listed in example 1

Second mode: I've tried it, actually I have no vobs, but pieces of TS, but after processing audio sinc is lost after the first merge point

Thanx
L

unskinnyboy
18th January 2006, 22:23
Those are to be put inside the .avs which you edit and save before encoding in GK, not inside the .d2v. Don't edit the .d2v! In the code, first.d2v is the name of your 1st d2v file, second.d2v is the name of your 2nd d2v file and so on..

Is it clear or are you still confused?

litium
18th January 2006, 23:16
Well actually still a little confused.

2 points are not clear to me:

A) How to let fit the new .avs (I geterate it from the first clip and then add the others with text editor) with the parameter of size and quality (bitperpixel I) I've set for the first smaller clip in GK? or they are "extended automaticaly?

B) how to feed all the audio files to gk and keep the correct time shift for each clip into the final avi?

In addition I've generated an avs changing the source section into :

# SOURCE
clip1 = mpeg2source("D:\p1.d2v")
clip2 = mpeg2source("D:\p2.d2v")
clip3 = mpeg2source("D:\p3.d2v")
clip4 = mpeg2source("D:\p4.d2v")
clip5 = mpeg2source("D:\p5.d2v")
movie = clip1 + clip2 + clip3 + clip4 + clip5

instead of :

# SOURCE
mpeg2source("D:\p1.d2v)"

and when opening it in MPC I get the error "The Clip return value was not a video clip"

Thanx
L

unskinnyboy
19th January 2006, 01:19
a) Target size and quality and everything is set in the encoder, not Avisynth. Avisynth outputs uncompressed video which should be compressed by your encoder based on the settings you provide. So you should choose your settings keeping in mind that you are processing all these .ts files together. Cropping, resizing etc if done, will be done in Avisynth, so keep in mind that all the .ts files will be cropped/resized in the same manner. So this is only a good idea if all the .ts files have the same characteristics..

b) If you want to include the audio also, demux them to wav using DGIndex and change your script as follows:
clip1 = Audiodub(mpeg2source("D:\p1.d2v"),WavSource("D:\p1.wav"))
clip2 = Audiodub(mpeg2source("D:\p2.d2v"),WavSource("D:\p2.wav"))
clip3 = Audiodub(mpeg2source("D:\p3.d2v"),WavSource("D:\p3.wav"))
clip4 = Audiodub(mpeg2source("D:\p4.d2v"),WavSource("D:\p4.wav"))
clip5 = Audiodub(mpeg2source("D:\p5.d2v"),WavSource("D:\p5.wav"))
movie = clip1 + clip2 + clip3 + clip4 + clip5
return movie
If you add the "return movie" to the end, the error will go away.

Did you try my second point, which would make it a lot easier for you? Just make a single .d2v file which indexes all the 5 .ts files and then you need to process just that one.

litium
16th March 2006, 17:38
Here I am,
lot of thanx to unskinnyboy for help and apologize 4 late reply.
I was busy and I had to try the various possibilities before reply, and now I wish to provide feedback with my results.

Unfortunately no way to successfully merge the GK feed

Original problem was that streams dumped through a SS2 sat card were often having problem with sound/video alignement once compressed with GK/XVid.

This used to come out especially when I had to find a way to remove unwanted parts from the video stream.

I could finally fix this problem creating an mpg file by merging more clips selected into the same video stream with the help of "Mpg2Cut2" and feeding it as a single piece to GK.
All the other trials failed.
Now I still rarely get A/V shift, but I guess now it depends on errors in the dumped stream.

Thanks again
L