Log in

View Full Version : Frameserv to DVD2SVCD with VFAPI


jolson
15th April 2007, 23:13
I have used D2SRoBa/DVD2SVCD several times to convert standard AVI files with AC3 audio to DVD, and it works good.

If the source isn't a standard AVI, I have used GraphEdit/avs scripts and "AviSynth frameserved" to the MPEG2 encoder. But then it's a lot of manual work left, which DVD2SVCD does so well...

So - is there a way to use DVD2SVCD even if the source isn't an XviD/DivX AVI (but something that's playable in GraphEdit/DirectShowSource'able to Avisynth)? I can think of a couple of possibilities:

* Extract the AC3 audio and encode the m2v file, set up DVD2SVCD as if this was just done using DVD2SVCD and then do "Recover Pulldown".

* Fool DVD2SVCD into thinking it really gets an AVI file by frameserving through VFAPI.

I have however no experience with either of these methods, and from what I understand frameserving with AviSynth to DVD2SVCD doesn't work.

Any help/ideas?

I use the VFAPI method very succesfully.
It's slow as hell though.

Open a new thread if you can't get it to work - we're veering off topic here.
I thought I'd better start that new thread immediately, since if it works I' guess more people would be interested.

I have tried before to make an avs with a DirectShowSource and AviSynth-frameserv that to DVD2SVCD. DVD2SVCD opens it, but I can't get any further since can't find necessary metadata it wants to read from the AVI file (I think), and "Start Conversion" (and other things) is greyed out.

But you mean that this works with VFAPI? (I haven't used VFAPI, just what I read about it seemed promising). Will have to read up to how it works. How slow is "Slow as Hell"? Will the time be doubled compared to directly converting a comparable XviD AVI?

* A third possibility, in addition to the two above, would be *not* to use the actual DVD2SVCD program. But to, after a conversion of a standard XviD AVI is run with D2SRoBa/DVD2SVCD, save files like CCE_Project_file_MOVIE.ecl and AviSynth_Script_file.avs and edit them for next file and feed the ecl to AviSynth. Then from log files extract what more (call pulldown...) has to be done and either put that into a simple batch script or AutoIt...

Nick
16th April 2007, 19:17
Hi. VFAPI is really easy - no reading up required.

You will find a folder named VFAPI in your DVD2SVCD installation directory. Open the VFAPIConv_EN.exe, which you will find in the "reader" subdirectory.

Click "Add Job" and browse for your AVS file, then click Convert.
The folder containing your avs script will now contain an AVI file of the same name. Run this through DVD2SVCD.

I can't remember how speed compares, just that it's a fair bit slower. Try it yourself and see :)

jolson
17th April 2007, 16:20
OK, thanks. Will do :)

jolson
19th April 2007, 19:49
Doesn't seem to work if the original file has AC3 audio and I want to keep it... :(

There's no way (I can find) to specify in DVD2SVCD an audio file that should be muxed in later, even though (with an ordinary AVI file) it starts with extracting the audio and muxes it in later. So it has to be in the fake AVI file VFAPI creates, but I guess it can't.

I can start with demuxing the audio to an ac3 file and load it in the avs script with NicAC3Source, and then call AudioDub. But the same way the video will be decoded to uncompressed, the same way the audio will be decoded to uncompressed PCM. So "Keep Audio" in DVD2SVCD won't work, and there's no option in DVD2SVCD for - in the end - re-encode the audio to AC3, is there?

Are there any issues with MPEG5.1 audio? Standalone player compatibility, sound quality compared to original AC3...?

jolson
19th April 2007, 20:37
Right now I checking the possible work-around of breaking when audio encoding, replacing the extracted wav file with the original ac3 file and then editing the project file (changing wav to ac3, seeing to that Project Position=19). The selecting recover and opening the edited project file. May work :)

jolson
19th April 2007, 21:27
I did so, and DVD2SVCD has now continued with video encoding. It's hard to say how much longer it takes because of VFAPI, but it's not more than double the time anyway. Maybe less.

If this works out well, a friend who has a HD TV channel (I don't) will give me a recording to try the method on. It's h264, so I will have to read up on that. For instance, do I have to put a ColorMatrix(mode="Rec.601->rec.709") call in the avs file, or will the h264 decoder take care of that? (I guess it shouldn't, it should only be done if you do a conversion like I want to do - from a recorded .ts to a DVD. Right?)

jolson
22nd May 2007, 14:43
I tried his HDTV recording, and it works to use VFAPI and then break/resume the conversion when encoding the audio. But I haven't been able to get it to work with the Colormatrix.

If I just have an .avs with the lines...:

loadplugin...
video=DirectShowSource(...
audio=the extracted audio
audiodub(video, audio)

The file VFAPICONV creates an .AVI file that is playabe in MPC and is usable in DVD2SVCD. Since the audiodub returns to "last", adding a line ColorMatrix(mode="Rec.601->rec.709") seems to be OK. But if I try that, the created AVI file can't be rendered in MPC, nor used in DVD2SVCD.

I will have to search through the AVISYNTH website/docs a bit more, and/or try to put the ColorMatrix call in DVD2SVCD/Frameserv...