PDA

View Full Version : "video" look and deinterlacing


omer123
18th December 2003, 21:54
I have been trying for a lot of time to encode DV home movies to SVCD,going the intelaced way because deintelacing made my movies look "filmlike" (it took the "video" look out).So here's a question (perhaps bb could answer it):Is there any way to deinterlace and still keep the "video" look?

bb
19th December 2003, 14:38
It depends on how you define "film look" vs. "video look". There are several points about the "film look", e.g.:

- progressive look (24 or 25 fps)
- film grain
- contrast and colors

If you are talking about the smoothness of movements in progressive vs. interlaced material, there is probably no way of deinterlacing to get a "video look". You may experiment with blending vs. interpolating in your deinterlacer, though, and decide which method looks more like video to your eyes.

bb

scharfis_brain
19th December 2003, 14:55
You can deinterlace to 50fps (PAL) or 60fps (NTSC) with a FullFramerate Deinterlacer, like DGbob, Tomsbob, kernelbob or....

but this Video can't be burnt to SVCD/DVD to play in a SAP.

bb
20th December 2003, 08:44
Originally posted by scharfis_brain
but this Video can't be burnt to SVCD/DVD to play in a SAP.
That's the reason why I didn't mention it, because omer123 wants to create SVCDs ;)

bb

omer123
20th December 2003, 18:09
Thank you guys for your comments.The thing is ,I tried to use KernelDient to deinterlace my video using AviSynth and VirtualDub and then load it to AVI2SVCD and encode it as I normally do with downloaded movies (which use progressive frames too),without changing the settings.
The result was a very "mosaic" like video - even worse then an interlaced encoding! The AVS for the file looks like this:

AviSource("E:/теош/video/ron on camp_uncompressed.avi")
LoadPlugin ("C:/program files/AviSynth 2.5/plugins/kerneldeint140.dll")
KernelDeint(order=0,threshold=200,sharp=true,twoway=false,debug=false)

and the AVS file that AVI2SVCD used was:

LoadPlugin("C:\PROGRA~1\DVD2SVCD\AVISYN~1.5PL\Mpeg2dec\MPEG2D~1.DLL")
AVISource("E:\теош\video\RON200~1.AVI",False)
ConvertToYUY2()
BicubicResize(480,576,0.33,0.33)
ConvertToYUY2()
Import("C:\Subs\ResampleAudio.avs")
ResampleAudio(44100)

So my question is:
Why,after deinterlacing nicely (I checked the avs file and it looked great!)the output movie came out so crappy?

bb
20th December 2003, 19:23
Originally posted by omer123
Thank you guys for your comments.The thing is ,I tried to use KernelDient to deinterlace my video using AviSynth and VirtualDub and then load it to AVI2SVCD and encode it as I normally do with downloaded movies (which use progressive frames too),without changing the settings.
The result was a very "mosaic" like video - even worse then an interlaced encoding! The AVS for the file looks like this:

AviSource("E:/теош/video/ron on camp_uncompressed.avi")
LoadPlugin ("C:/program files/AviSynth 2.5/plugins/kerneldeint140.dll")
KernelDeint(order=0,threshold=200,sharp=true,twoway=false,debug=false)

How did you save the deinterlaced video? Which codec did you use?

and the AVS file that AVI2SVCD used was:

LoadPlugin("C:\PROGRA~1\DVD2SVCD\AVISYN~1.5PL\Mpeg2dec\MPEG2D~1.DLL")
AVISource("E:\теош\video\RON200~1.AVI",False)
ConvertToYUY2()
BicubicResize(480,576,0.33,0.33)
ConvertToYUY2()
Import("C:\Subs\ResampleAudio.avs")
ResampleAudio(44100)

So my question is:
Why,after deinterlacing nicely (I checked the avs file and it looked great!)the output movie came out so crappy?
There are some weird commands in the AVS. There's no need for the first line, as you don't load an MPEG source (at least I guess so). I have no clue why there are two ConvertToYUY2() commands... And the imported "ResampleAudio.avs" probably contains the ResampleAudio command already, so one of the two last lines is obsolete.

Don't know yet where the blocking comes from. With progressive input you should get better quality than with interlaced input. I assume you did not use lossless encoding for your intermediate video.

bb

omer123
20th December 2003, 20:59
Originally posted by bb
How did you save the deinterlaced video? Which codec did you use?

I assume you did not use lossless encoding for your intermediate video.

bb

I used the panasonic dv codec.What about this "lossless" encoding...?

bb
21st December 2003, 11:44
You could use the lossless Huffyuv codec instead of the DV codec. The files are twice as big, but you won't introduce any generational loss. You could use frame serving, too, instead of deinterlacing to an intermediate file (although the intermediate file may be an advantage if you're doing multiple passes of MPEG-2 encoding). To frameserve all you need to do is to put the KernelDeint commands at the top of your DVD2SVCD generated AVS script.

bb

omer123
21st December 2003, 16:46
Originally posted by bb
You could use the lossless Huffyuv codec instead of the DV codec. The files are twice as big, but you won't introduce any generational loss. You could use frame serving, too, instead of deinterlacing to an intermediate file (although the intermediate file may be an advantage if you're doing multiple passes of MPEG-2 encoding). To frameserve all you need to do is to put the KernelDeint commands at the top of your DVD2SVCD generated AVS script.

bb
I read a little about the Huffyuv codec and tried what you said but the output was awful! The video turned into series of photos bouncing with no "flow".it said it virtualdub that i have this codec by the CCE patch.might that be the reason?
I also tried to frameserve - didn't make much difference.Does it matter WHERE I put the kerneldient commands?
And yes, I'm using multiple passes(4)

thanks for your patience,btw...

bb
22nd December 2003, 08:36
The Huffyuv codec is not intended for playback, because for smooth playback you'd need a very fast hdd (and a fast processor, too). But it provides the best possible quality for an intermediate format, because it's lossless. Compression factor is about 2.5 (depends on source).

The KernelDeint command should come first, before all other filters, but after AviSource, LoadPlugin, and Trim commands.

If you ask me, four passes is a little exaggerated. I wouldn't do more than three passes.

Do you edit DVD2SVCD's script before the encoding starts (you should do that, of course)?

bb

omer123
23rd December 2003, 14:56
Originally posted by bb

Do you edit DVD2SVCD's script before the encoding starts (you should do that, of course)?

bb
Of course I edit the DVD2SVCD's script,however I keep the first line that you said was unnecessary because if I erase it the program crashes...
Anyway I have a general question that might solve all my wonderings and put an end to these repeatless tryings: When I encode Divx or whatever movies I dowloaded from the net,they're been ecoded from avi to mpeg2 (svcd) and the quality remains the same (i.e,great).Can it ever happen with DV movies or there's a fundamental difference between the two (besides the interlacing thing)? Maybe there is no way to encode DV to SVCD keeping it looks like the origin?
Waiting for your reply!

bb
23rd December 2003, 18:59
Hmm, actually I don't know where your problem is. Whenever I convert my DV video to SVCD using DVD2SVCD (AVI2SVCD mode), I get good quality, no matter if the source is 4:3 or 16:9, whether it's interlaced or progressive. I say good, because you can't expect excellent quality with SVCD bitrates. Maybe your source is too noisy, too sharp, or simply too long... You must know that DV sources are not as compressible as DVD sources, because there's more noise, more movement (camcorder shaking), and probably more contrast most of the time.

For standard SVCDs you get best results, if you don't put more than 40 minutes on a single CD-R.

bb

r6d2
23rd December 2003, 19:49
If you want to give it a shot, try the D2Sroba plugin for DVD2SVCD. It uses CCE and decides how many media are needed to get the quality you expect (quality understood as low quantization). It achieves this by analyzing both the compressibility of the source and its length.

Some filtering, as bb suggests, may be needed, but if you encode interlaced (and resize accordingly) it should suffice.

The plugin (http://home.tiscali.no/tylohome/) and the FAQ (http://forum.doom9.org/showthread.php?s=&threadid=64886).

BTW, since it is more natural for DV to fit on DVD frame size, it might be useful to encode at DVD frame size if your player supports XSVCDs (mine does). A max BR of about 5000 (4x) should be good enough IMHO in this case.

omer123
24th December 2003, 07:08
Originally posted by bb
Maybe your source is too noisy, too sharp, or simply too long... bb
The video I'm testing with is only 38 sec. long.
About the sharpness:should I try filtering the source?

omer123
24th December 2003, 07:11
Originally posted by r6d2
BTW, since it is more natural for DV to fit on DVD frame size, it might be useful to encode at DVD frame size if your player supports XSVCDs (mine does). A max BR of about 5000 (4x) should be good enough IMHO in this case.
Yeah,my player won't support it (already tried that...)Maybe a time to buy a new one.

bb
24th December 2003, 09:20
Originally posted by omer123
The video I'm testing with is only 38 sec. long.
So you should be able to use the maximum bitrate allowed for SVCD, like 2586 kbps video, 192 kbps audio. Or go for XSVCD, as r6d2 proposed.
About the sharpness:should I try filtering the source?
You should replace the BicubicResize with a BilinearResize (or SimpleResize), and add a noise filter (I recommend Convolution3D).

bb

omer123
24th December 2003, 09:24
Originally posted by bb
So you should be able to use the maximum bitrate allowed for SVCD, like 2586 kbps video, 192 kbps audio. Or go for XSVCD, as r6d2 proposed.

You should replace the BicubicResize with a BilinearResize (or SimpleResize), and add a noise filter (I recommend Convolution3D).

bb
These are the values I use.
Where can I find that filter?

bb
24th December 2003, 09:28
Have a look at http://www.avisynth.org
There you'll find a link named "External filters", which leads to WarpEnterprises' fabulous filter page.

For your convenience: http://www.avisynth.org/warpenterprises

bb

r6d2
24th December 2003, 14:27
Originally posted by omer123
Yeah,my player won't support it (already tried that...)Maybe a time to buy a new one.
Did you try XVCD? It has 704x480 frame size, very similar to DVD and if encoded with VBR looks terrific.

It also requires middle range BRs, but if your player has a 4x CD drive, chances are it plays it. (You may want to visit www.vcdhelp.com's database of players to see other users experiences).

If buying a new player, try to get one that plays MPEG-4/DivX/XviD too.

omer123
25th December 2003, 09:05
Originally posted by r6d2
Did you try XVCD? It has 704x480 frame size, very similar to DVD and if encoded with VBR looks terrific.

What Bitrates are we talking about?(approx.)

omer123
25th December 2003, 09:10
Originally posted by bb

You should replace the BicubicResize with a BilinearResize (or SimpleResize), and add a noise filter (I recommend Convolution3D).

Should I use this preset for my DV video:

Convolution3d (preset="movieLQ") // Movie Low Quality (noisy DVD source)
is an alias for Convolution3D (0, 6, 10, 6, 8, 2.8, 0)

or there's more suitable one for DV?

r6d2
25th December 2003, 14:37
Originally posted by omer123
What Bitrates are we talking about?(approx.)
Max=5000, Avg=2500, Min=0.

bb
25th December 2003, 23:49
Originally posted by omer123
Should I use this preset for my DV video:

Convolution3d (preset="movieLQ") // Movie Low Quality (noisy DVD source)
is an alias for Convolution3D (0, 6, 10, 6, 8, 2.8, 0)

or there's more suitable one for DV?
There is no such thing as a "setting for DV". It depends on the source. If it's very noisy (low-light shot), then you'll probably have to increase the thresholds. You may want to try 1 as the first parameter for a more aggressive denoising. Don't go too high with the "temporal influence" parameter, else you'll get smearing effects.

bb