1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

100% working method to make a KVCD

Discussion in 'MPEG-1 and MPEG-2 encoding (AVI to DVD)' started by aldaco12, Nov 9, 2004.

Thread Status:
Not open for further replies.
  1. aldaco12

    aldaco12 Active member

    Joined:
    Nov 6, 2002
    Messages:
    2,544
    Likes Received:
    0
    Trophy Points:
    66
    KVCD are a new kind of VCDs: better compression, higher quality, 100% competibility with DVD players.
    You can do them downloading the templates from http://kvcd.net/dvd-models.html and copying the files in the \template directory of TMPGenc.
    When the wizard starts, the [other] folders opens with the new KVCD type. The most useful templates are: KVCD-CQ-352x288-_PAL_-PLUS.mcf/KVCD-CQ-352x288-_NTSC_-PLUS.mcf (General Purpose VCD Quality). KVCD.NET declares, on http://kvcd.net/dvd-models.html , that approx 120' movie fit on a 80' CD-R (they say that this is also true for the 352x480/576 (General Purpose Higher Quality) template, but you must test it with your movie. Surely the final M1V gets larger, keeping the CQ value constant, and I can't choose if which one (higher CQ or larger resolution) is the best, to choose! Of course, if you have enough room, the 2nd is better, but I don't know which one is the best one if you want to put a approx 120' movie into a 80' CD-R.

    Careful: when you encode, the most important parameter you can choose is the CQ value. On the templates the default value is CQ=60, but pressing the 'Settings' Button you can change it. The higher CQ is, the larger the final size of the M1V video and the better the movie's encoding will be.

    Finding the 'best' CQ value to put is the most difficult thing. I tried many methods posted on the net, for example on http://www.desitorrents.com/forums/faq.php?faq=how_do_i :
    (copy-and-paste from the [bold]convert DVD to KVCD?[/bold] post)

    You need to make an AVISynth script for loading the movie.
    -------------------------------------------------------------------------------
    Note: useful scrypts are:

    LoadPlugin("c:\directory_plugins\MPEG2Dec3dg.dll")
    Mpeg2source("C:\diretory_movies\MOVIE.d2v")
    AddAudio()
    ConvertToYUY2()

    for a [bold]DVD[/bold] movie

    (you need to have ripped the VOBs and to have created, in C:\diretory_movies, a D2V Project (movie.D2V) with DVD2AVIdg. The MPEG2Dec3dg.dll file can be either loaded with the LoadPlugin command or put in the AviSynth plugins direcory)

    and

    LoadPlugin("c:\directory_plugins\DGdecode.dll")
    Mpeg2source("C:\directory_movies\movie.d2v")
    Addaudio()
    ConvertToYUY2()

    for a [bold]MPEG[/bold] (As before, load the MPEG with DGIndex and create with it, like for the VOB set, a 'movie.d2v' project file in the C:\directory_movies\ directory), and

    AviSource("C:\directory_movies\movie.avi")
    ConvertToYUY2()

    for an [bold]AVI[/bold] movie.

    To load the d2V files, you must have made a file called "addaudio.avsi" in AviSynth plugins directory. This file contains this text:

    function AddAudio(clip v1) {

    v2 = Blankclip()

    v1 = AudioDub(v1,v2)

    return v1

    }

    --------------------------------------------------------------------------------
    Prediction: here you use Tok, CQMatic or do it Manually; I usually do my predictions manually.
    a. Tok: Load the AVS script file. Set Min/Max Bitrate. Load the MP2 file under Audio & More > External Audio Link. Hit start and it shall predict and encode the video to M1V format.
    b. CQMatic: Click on Settings and Point to tmpgenc.exe (just the first time). Open Tmpgenc, Load Preferred KVCD Template, Load the AVS script. Click on Settings and set Min/max Bitrate. Save project as "Tmpgenc Text Project". Click on Calculator on CQMatic and load your D2V file and bitrate of audio file and hit calculate. Take the average bitrate and feed Runtime and average bitrate in CQMatic. Click Encode and it will automatically predict the CQ and encode the video for you.
    c. Manually Predicting the CQ: this is how i do it. Add this line to the end of your script:
    Sampler(100,length=24)
    Load the project and start encoding, it takes pieces from the movie and saves the file. Note down the size of the sample file.
    The Formaula:
    Number-of-Frames / 100 / Frame-Rate = X
    (Frame-Rate = 25 for PAL and 23.976 for NTSC)
    Sample-File-Size * 0.98 * X = Predicted-File-Size.
    This is calculation without audio, just for the video.
    (Number-of-frames can be determined by loading project in Tmpgenc and without sampler line in script).
    Reach the desired CQ and encode the video.

    (end of the paste)

    Remember: if you don't encode a DVD but you encode an AVI or a (S)VCD movie you can get strange results.
    Probably , in these cases, the safest method is very slow. Let's supose you want to fit a full KVCD movie in a 80' CD-R.
    Let's suppose you want to put MP2 128 kbps audio.
    Exttract the WAV audio from the movie as uncompressed WAV with VirtualDub (Audio___Full Processing mode and File___Save WAV) and compress it to MP2 CBR 128 kbps with, say, HeadAC3he. Let's call that size (in bytes) 'MP2'.

    Your objective is to reach a M1V size = 98% * (2352*360,000 - 10,600,000 - MP2) = 98% * (830,000,000 - MP2) bytes. Let's call this number M1V_obj.

    Then open TMPGenc. Load the desided template (e.g. 'General Purpose VCD Quality') and choose a certain value of CQ (you can keep the default value of 60, the first time). The last step of the wizard, select the 'standard' resolution value of 352x240/288.
    To speed the process, Select Motion Search Precision = Lowest Quality (Very Fast).

    Then start encoding. Your objective is to have a M1V (for KVCD) file as close to M1V_obj as you can.
    If the size of the output M1V exceeds M1V_obj, restart encoding lowering the CQ value. If it is less than it, encode again by raising CQ.
    As soon as M1V is very close to M1V_obj, you have found CQ_best.

    Now:
    1) re-start TMPGenc
    2) load the KVCD template
    3) press Settings and put CQ = CQ_best and 'Motion Search Precision = Highest Quality (very slow)'.

    If you did all well you'll get a M1V video whose size is very close to M1V_obj and if you multiplex the M1V video to the MP2 audio with TMPGenc to make a 'VideoCD non standard' and author it to a KVCD image, you'll create an image (cue/bin) very close to 846,720,000 bytes (360,000 sectors 2352 bytes large: a 80' CD-R).

    Remember [bold]DO-NOT-USE NERO (MAYBE THIS PROBLEM BELONG TO NERO EXPRESS ONLY, BUT I DIDN'T TEST ALL NERO VARIANTS) WITH A KVCD MOVIE. if you input him a K(s)VCD movie, would try to invert the process KMPEG --> MPEG , with absolutely no change in quality (since garbage in = garbage out). [/bold]

     
    Last edited: Oct 21, 2005
Thread Status:
Not open for further replies.

Share This Page