digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Video Encoding and Conversion (http://www.digitalfaq.com/archives/encode/)
-   -   Trying to make KVCD from DV home movies (http://www.digitalfaq.com/archives/encode/7520-make-kvcd-dv.html)

Icarus3000 01-04-2004 06:07 PM

Trying to make KVCD from DV home movies
 
I spent the better part of this weekend trying to make a KVCD from a 90 minute home movie compilation.

I have run into a few snags.

Most of the filters for Avisynth 2.53 require YV12 colorspace. DV Video (at least mine) is in RGB24 colorspace. So try as I might, I cannot use any Avisynth 2.53 optimal script. The one workaround that I thought would work would be to include:

ConverttoYV12() # right after Avisource("c:\video.avi")
# and
ConverttoRGB() # last line of script - I need this line in all my scripts with YV12 source or I get the "solarization" effect in TMPGenc

This did the trick, in that I didn't get any error messages back, however it had a nasty side-effect of flickering lights on the right side of the video.

So I gave up on Avisynth 2.53 and went back to my old 2.08 with the following script:


Quote:

AviSource("D:\My Documents\My Videos\alexa\alexa.avi")
fielddeinterlace(full=false)
LegalClip()
GripCrop(352, 240, overscan=1, source_anamorphic=false)
GripSize(resizer="lanczosResize")
spaceDust() # or PixieDust()
unfilter(50,50)
Convolution3D (0, 32, 128, 16, 64, 10, 0)
mergechroma(blur(1.58))
mergeluma(blur(0.2))
GripBorders()
LegalClip()
Although watchable, the quality is terrible when compared to the original DV avi source. Obviously, since I resized to 352, 240! But I had to do that in order to fit 90 minutes on one CD. Even 352, 480 looked worse. FYI: I used CQ_VBR with a CQ value of 32.7 (from CQMatic - which worked well, fit perfectly on one CD).

So, enough rambling, I have a few specific questions:

1. Can anyone share their experience converting DV to KVCD? (ok, that's a general question).
2. What is the best way to use Avisynth 2.53 with a DV avi source file?
3. What optimal script should I use?
4. What is the best way to de-interlace? I wanted to try incredbile's method from this thread:

http://www.kvcd.net/forum/viewtopic.php?t=8306

but I didn't get very far because I couldn't get anything to work on the RGB source.

Any help would be greatly appreciated!

Thanks,
Icarus

Icarus3000 01-06-2004 08:56 PM

Come on... There must be someone out there who uses Avisynth 2.5 and converts DV to KVCD?

Please, tell me how you do it, what script you use, etc...

I'm getting desperate here... I really can't afford a DVD Burner right now!

Thanks,
Icarus

BobNET 01-07-2004 12:19 AM

Quote:

Originally Posted by Icarus3000
Come on... There must be someone out there who uses Avisynth 2.5 and converts DV to KVCD?

Please, tell me how you do it, what script you use, etc...

I'm getting desperate here... I really can't afford a DVD Burner right now!

I bought a DVD burner mainly for DV conversions and never did DV->KVCD, so I can't offer too much assitance... :( All I use in my scripts are UnFilter and FluxSmooth, to get rid of noise (the CCD in my camera likes to produce it in low light).

Quote:

Most of the filters for Avisynth 2.53 require YV12 colorspace. DV Video (at least mine) is in RGB24 colorspace.
DV is actually closer to YUY2 (in NTSC, at least), so it's too bad that the DV codecs we're using (I'm using the Panasonic one) convert to RGB first. Ideally it would be YUY2, but that won't work with the motion adaptive script.

Quote:

So try as I might, I cannot use any Avisynth 2.53 optimal script. The one workaround that I thought would work would be to include:

ConverttoYV12() # right after Avisource("c:\video.avi")
# and
ConverttoRGB() # last line of script - I need this line in all my scripts with YV12 source or I get the "solarization" effect in TMPGenc
Is it still solarized in VirtualDub without the ConvertToRGB line? And what codec does it think you're using when you load the avs (look in File Information in vdub)? I remember reading once that some YV12 codecs (ATI's, for one) didn't do colourspace conversions properly. This doesn't sound like the same thing, but it's something to look for.

incredible 01-07-2004 05:16 AM

Re: Very frustrated trying to make KVCD from DV home movies
 
Quote:

Originally Posted by Icarus3000
1. Can anyone share their experience converting DV to KVCD? (ok, that's a general question).

DV is most recorded using BOTTOM Field First! Thats very important when deinterlacing!

So you should try my recommendation but using BFF:

SmoothDeinterlace(tff=false, doublerate=true, blend=true).Selecteven()
(also try one using selectodd() at the end instead of selecteven(), and choose which looks better.
Quote:

2. What is the best way to use Avisynth 2.53 with a DV avi source file?
3. What optimal script should I use?
It depends on the quality your DV Device delivers.
Quote:

4. What is the best way to de-interlace? I wanted to try incredbile's method from this thread:
As I told above, use the TTF-false method in Smoothdeinterlace.
But in case of NTSC you will end up with a 29.976 deinterlaced stream.

So first use this script:
Code:

Avisource("YourDVsource.avi)
ConverttoYUY2()
SmoothDeinterlace(tff=false, doublerate=true, blend=true).Selecteven()

No open the avs in vdub and look at the "File Information" and the mentioned Framerate, it should be still 29.976 but now Framebased.

Now we include the following function to do a conversion from REAL 29.976 to 23.976 FPS

Code:

Avisource("YourDVsource.avi)
ConverttoYUY2()
SmoothDeinterlace(tff=false, doublerate=true, blend=true).Selecteven()
convert60ito24p(2,0)
#
############### the function #############
#
function convert60ito24p (clip video, int mode, int offset)
{
work = assumefieldbased(video)
out = (mode==2) ? interleave(
\selectevery(
\layer(trim(work, 1, 0),
\layer(work, trim(work, 2, 0), "fast"),
\"fast"), 5, 0 + offset),
\selectevery(
\layer(work, trim(work, 1, 0), "fast"), 5, 3 + offset)) :
\* * (mode==1) ? interleave(
\selectevery(trim(work, 1, 0), 5, 0 + offset),
\selectevery(layer(work, trim(work, 1, 0), "fast"), 5, 3 + offset)) :
\* * (mode==0) ? selectevery(work, 5, 1 + offset, 4 + offset) : work
assumeframebased(out)
}
#################################

And now watch your avs in Vdub.
Its ok? How is the playback, it schouldn't be jerky or stuttering.
Because NOW you got a 23.976 progressive stream and it should look like film material which can be wonderful encoded to KVCD as it now needs not that much bitrate cause of less FPS!

Now below this script you can add your filters as you like.
TemporalSoften, CNR2, Deen("a2d",x,x,x) ... just find out what ends up as best.

(If you gonna use YV12 filters just change the converttoYUY2() at the beginning of the script to ConverttoYV12() as Smoothdeinterlace supports YV12

Icarus3000 01-07-2004 01:04 PM

Thanks for the response Incredible!

It feels like a tease though since I am at work right now, and have to wait until I get home to test it out!

:D

welthqa 01-12-2004 09:09 PM

hey, I'm new here and I have a lot of DV to convert, and I'd like it all to be "archival quality". how come you're resizing it so much? How did that script work out for you? Could you post the entire script so I have something to start with?

Also, again forgive my noobness, but is the reason you're having him convert frame rates so he can just use one of the standard templates? Is this less hassle than modifying the templates?

Icarus3000 01-13-2004 11:23 AM

I've been experimenting with quite a few scripts recently.

I still haven't made up my mind yet, but will post my "personal" "optimal" DV script when I find it!

- Icarus

welthqa 02-24-2004 08:15 PM

anything yet?
 
I'm still working on mine, just wondering what you guys have so far.

Icarus3000 02-25-2004 11:44 AM

I posted by "optimal script" here:

http://www.kvcd.net/forum/viewtopic....283&highlight=

What are you using?

Thanks,
Icarus

welthqa 02-26-2004 05:53 PM

pretty much the same one as yours. except i can never get blindPP to work so I took that out. However i'm not happy with what i'm getting.
When i use yours i get errors saying i can't use smoothdeinterlace unless it's in yuv2, so i've added that. and I can't get blindPP to work no matter what, i've read what people have suggested with the adding the rgb thing at the end and stuff. mine's ending up just too blocky. what can i do to eliminate the blockiness?

Peter1234 02-27-2004 04:53 PM

welthqa
If your results are blocky, it usually means that the average
data rate is too low for the frame size. Try increasing the
CQ setting and the max bit rate. BlindPP(cpu=4) requires
loading the MPEG2Dec3.dll. Putting SmoothDeinterlace
right after AVISource works for me in AviSynth 2.53.

Peter1234 02-27-2004 05:01 PM

welthqa
The AviSynth 2.0 DLLs will not work in AviSynth 2.5 Maybe you are inadvertently trying to use some 2.0 DLLs in AviSysnth 2.5.

welthqa 02-28-2004 01:47 PM

which 2.0 dlls are you talking about? the MPEG2Dec3.dll?
also, i can't seem to get prediction to work. seems like calcumatic doesn't load avs or the dv avi that i'm using. cq matic works otherwise, if i guestimate the bitrate, though i admit i'm not sure what bitrate to use.

ohoh, yes, i was using old MPEG2Dec3.dll, i dl the new one, and it works, thanks for that reminder.

now to solve the prediction thing.

Dialhot 02-28-2004 03:09 PM

Quote:

Originally Posted by welthqa
now to solve the prediction thing.

Do you know how to use CQMAtic for other things than DV avi ? Or you never used it before ?

welthqa 02-28-2004 11:25 PM

never really used it before. I've opened projects that I've saved as textproject and the settings from tmpgenc. but the calcumatic doesn't seem to accept dv avi. I know how to change the prediction and the full encode settings. But I guess, no I haven't used it for anything other than DV.

Peter1234 02-29-2004 12:10 AM

If you are using the Icarus3000 script, you should be able to get fair quality 720x480 video using CQ70, max bit rate 2000, min bit rate 300. You might try that. Remember, CQMAtic does not assure good video quality, only that it will fit on CD.

bman 02-29-2004 01:24 AM

Hi all !
I'm trying to convert some DV cap's with Avisynth 2.54(tryed 2.53,2.52,2.5- it's not avisynt problem)but Avisource can't oppen My DV files .
Same with VirtualDub - Can't open Avi file .
I know that it's missing codec problem .
Maybe u can suggest wich one is best and where to download it from ???
bman

Dialhot 02-29-2004 06:09 AM

The DV have to be type 1. Are yours type 1 or 2 ?

vhelp 02-29-2004 09:20 AM

bman and others,

If you're having trouble opening your DV footage in avisynth, my advice,
since I do this w/ my DV source (Sony TRV-22) is I open my DV (Type 2)
inside vdub, and then I frameserve into avisynth.

Or, you can just open your DV inside vdub, and framserve into TMPG.
One thing to note, is that vdub does not like Type 1 files. It strip (or ignores)
the audio part, and if you ignore the error/warning message from it, it will
open your source in "video only" mode (no sound)
.
.
But, if you want to open your DV footage directly inside an .AVS script, then
from what I understand, avisynth will only open Type 1 files. This means
that you will have to resort to MUXing your audio at a later step. And, I'm
sure you have that process nailed down :lol:

My prefered method is to first open inside vdub (cause I like to hear the
sound, among other things like some preferenced filtering) and then either
I will frameserve that into TMPG, or I will further process it in an .AVS script,
and then frameserve it into TMPG.
.
.
There is no quality loss in doing it the way I just described, unless you start
incorporating a few ConvertTOrgb(); ConvertTOYUV(); ConvertTOyv12()
etc, because it moves the colorspace around, and each time you call it, it
moves the colorspace around some mores. Like pushing a red paintbrush up
and down a piece of paper. The more you move it, the more color it gets
or whatever :roll:

-vhelp

welthqa 02-29-2004 12:05 PM

bman, pansonic's DV codec works fine for me. http://users.tpg.com.au/mtam/install_panvfwdv.htm

bman 02-29-2004 03:34 PM

Quote:

Originally Posted by welthqa
bman, pansonic's DV codec works fine for me. http://users.tpg.com.au/mtam/install_panvfwdv.htm

Many thank's to ALL !
@ welthqa !
Now I'm able to load DV file to VDub but I still have problem to read DV file with AviSource :(
I have to do some more experiments to see what will come .
@Dialhot
How can i find out which type is My DV file : 1 or 2 ???
I'm preparing it with Pinnacle studio deluxe v9 .
bman

bman 02-29-2004 03:49 PM

I don't know why but uninstall and reinstall of Avisynth 2.54 solved the problem .
Now I can load avs script to CCE and TMPGenc with no problems .
Thank's again to all
bman

Peter1234 02-29-2004 05:45 PM

welthqa,
The best I was able to do for 90 minute VCD was CQ70, max 1000 kbps, min 300 kbps, with 352x480 frame size. Video quality is better than normal VCD, a little fuzzy but not blocky. This may help you: for 800MB VCD, average data rate (video + audio) kbps = 106666 / video length in minutes.

welthqa 03-01-2004 01:35 AM

you started with DV right? which is 720x480 IIRC. why go down so much on the resolution? do you find that the end result of a higher cq is worth the tradeoff of the resolution? I go down to 528x480. if I am going to sacifice lines, should i lose the vertical or horizontal ones?

Which is better the higher cq or the higher resolution? I've seen some outstanding DVD to KSVCDs that are 120 or more and end up looking much better than what i'm able to come up with for DV to KSVCD. Also, KVCD or KSVCD? I've read that better compression with the KSVCD allows for higher CQ? is this true?

Dialhot 03-01-2004 03:27 AM

Quote:

Originally Posted by welthqa
Which is better the higher cq or the higher resolution?

This question is the most aoonying one on the forum and it is posted again and again and again !

DO THE TEST BY YOURSELF ! and let your eyes decide what is best for you.

Thank you.

Peter1234 03-01-2004 12:23 PM

welthqa,
I started with a DV tape. You have to decide what is best for you. I was just trying to help you out. There is no best, just lots of trade offs.

Peter1234 03-01-2004 04:31 PM

welthqa,
I forgot to mention, that I also reduced the audio to 96kbps for the 90 minute VCD.
I do not think there is any way to make miniDV recordings look as good as a DVD. DVDs are made from film with $100,00 cameras and $100,00 lens that have much higher resolution than any miniDV camera. I would be happy if I could get my videos to look as good as the videos produced by the TV stations with their $50,000 cameras.

welthqa 03-01-2004 08:28 PM

sounds fair enough. I'm getting a great picture exept for like random arifacts. not really even on motion places, just kind of random. Any idea what this is?

@Dialhot: ouch bro, I was just kind of asking what the consensus was on this matter.

Peter1234 03-01-2004 11:52 PM

welthqa,
What was the frame size and bit rates you used? Do they go away if you double the bit rate? If the pricture isn't good enough, it usually means that the data rate is too low. There is a trade off between data rate and quality. You have to decide what you want - better quailty or more video per CD. I know you know that, just a reminder. AviSynth will not do the impossible, but it will improve the video quality at low data rates.

Dialhot 03-02-2004 03:20 AM

Quote:

Originally Posted by welthqa
@Dialhot: ouch bro, I was just kind of asking what the consensus was on this matter.

Yes. And what I answered IS the consensus on that ;-)

welthqa 03-05-2004 12:57 PM

was using 352x480, 528x480 the cq was at 25 i think 500min 3000 max, but i wasn't happy with it.

Peter1234 03-05-2004 02:42 PM

welthqa,
352x480, 528x480 are NTSC sizes and 25i is PAL. I do not know if that is causing problems but it isn't correct. Do you want PAL? I think 352x288 and 544x576 would be PAL frame sizes. Check the KVCD templates for PAL versions. I am in NTSC part of the world so I do not use PAL. 3000 max bit rate should give excellent results. But remember, it can't look any better than the original. Also most DVD player won't play VCDs if the bit rate is over 3000 kbps. I use 720x480 at CQ80 2800 max and 24fps when I want best quality (but you can't get 90 min on one CD at that rate). I do not think I can be of much more help. It seems like you are able to get resuslts. You just need to experiment a lot and read some of the online guides. There is a lot to learn and it takes some time.

incredible 03-05-2004 05:32 PM

@Peter1234

Quote:

.... the cq was at 25 i think ...
25 was the value of his archived CQ! (If I do understand him right) and not the framerate he encoded in.[/list]

Peter1234 03-05-2004 05:42 PM

welthqa,
If incredible is correct, then that is your problem. A CQ of 25 is way to low. I think it should be at least 60.

Dialhot 03-05-2004 05:43 PM

I think you understood right. And I'm not surprise with such amazing bitrate range : 500 - 3000 :!:

Peter1234 03-05-2004 05:45 PM

incredible,
Thanks, I think you are correct, I read it too quickly.

welthqa 03-06-2004 09:44 PM

so the bitrate range should be about 300-1000 if i wanted aprox 90 min, and max 2800, with what I'm guessing, maybe 60 min on an 700mb cd?

I used to encode to svcd and fit about 60 min on a cd, and it looked pretty good. Shouldn't I be able to fit more using kvcd and have at least the same quality, if not better? I'm out of town now so i'll have to do more tests when I get back, but I try stuff every day, I couldn't get the prediction to work so much, so I just have it encode once at night, and then look it over and change stuff in the morning. let it encode and check it again at night. That cq of 25, was just one of the tests I happened to be doing. I was seeing which was better for me, the cq or res, and I think I like both very high. Guess it's time to price compare some dvdr drives.

Peter1234 03-06-2004 11:58 PM

welthqa,
Yes. KVCD should give better results but I don't know how much. I think that I only get about a 10% reduction in data rate with KVCD for full screen DV video relative to TMPGEnc mpeg1 with same script and settings (but I haven't really tested it much). But there is a big increase in quality with KVCD when compared to cheap software that only encodes standard VCD at 29.97fps and doesn't use scripts. When you read about 2 hours per CD that is usually for letterbox video which only has half as many pixels per frame as DV. If you were happy with your SVCD results I suggest you start with those settings for KVCD and see how much you can decrease the max bit rate without degrading the quality you were getting. I also suggest you make a short 30 second test video to use for experimenting so you don't have to wait all night for each test. If you use the equation I gave you it should give you an idea of what the max bit rate can be for different length videos. The minimum bit rate is just there because some players have a problem if the data rate drops too low.

Peter1234 03-07-2004 02:21 PM

welthqa,
I got a 16.3% reduction in data rate using KVCD instead of mpeg1 in one case for a 352x240 video with high motion (everything else the same). I think that is the most I have seen.


All times are GMT -5. The time now is 03:54 PM  —  vBulletin © Jelsoft Enterprises Ltd

Site design, images and content © 2002-2026 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2026 Jelsoft Enterprises Ltd.