Log in

View Full Version : 2x SVCD to 1x H.264/AAC with a twist


Booji Boy
29th August 2007, 17:14
Hi,

I got an old SVCD encoded video that spans across two CDs and in order to save some space and have some fun I had this idea of converting it to a MP4. The SVCDs where already ripped to MPGs a long time ago and they have quite some problems I will address later in the post.

My first attempt already failed, but now I want to do it the right way, and learn something about MPEG2 alongside.

First of all a big question is whether I should append the second part using an MPEG stream editor like Cuttermaran (what I did in my first attempt), with DGIndex while creating the d2v file, or with AviSynth when the whole MPEG2 decoding is settled?

Now to the problems of the two MPEGs...
first of all they have bad black borders, from the height I must cut off more than 100 pixels and from the width aprox. 20 pixels.
They are progressive 24... FILM, but the audio is NTSC
The resolution is 480x480, which is scaled to NTSC/4:3, and it is letterboxed.
The first and the last frames of both MPGs are in a GOP
The audio track's delay of both MPGs are slightly different
Now one good thing about the MPGs... the beginning of the second part is one or two GOPs before the end of the first part, so there are quite a few frames that overlap. The best part seems to be that the GOPs are not askew, so cutting and appending the MPEG video stream could maybe be done without reencoding.


Now, this is a tricky setup and probably not worth it, but I want to try it anyway, to at least get an AVS script at the end that serves me a perfect video.

Now to what went wrong in my first attempt:

The audio stream of the first MPG was cut off prematurely and the audio stream of the second was appended right afterwards, which of cource, resulted in a totally useless video.

The audio stream wasn't completely demuxed that's what I know for sure. Too bad I haven't check its lenght before encoding to x264, although I found it before the day was over... ;)

Anyway, I fear the premature end of the audio is caused by corruption in the first part. If that's true I guess I can add that to the list of problems above.

But I could also be possible that I did something wrong in DGIndex... because it's a FILM->NTSC pulldown stream.

So, back to more general things

In case you'd had such two files with all the characteristics mentioned in the list, how would you cut and append the 2nd part to the 1st?

[1] First of all I have to create the D2V projects for both MPGs... when I want to use Cuttermaran.

then there's the big question of aligning the MPGs...
[2a] Load each D2V project into Cuttermaran or MPGs into a similar tool, only cut and save as seperate MPGs again
[2b] Load both MPGs in DGIndex again and append them there
[2c] Create AVS script
or
[3a] Load both D2V projects into Cuttermaran or MPGs into a similar tool, cut, append and save as one MPG
[3b] Load this MPG into meGUI's DGIndex frontend
[3c] Create AVS script
or
[4a] Load each D2V project into meGUI's DGIndex frontend
[4b] Cut and append the two clips in a AVS script.

Which number to pick? Anything missing? Alternatives?

BTW, I'm going to try out Womble Video Wizard, maybe it will do all the cutting and appending for me flawlessly...