Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-2 Encoding

Reply
 
Thread Tools Search this Thread Display Modes
Old 25th March 2009, 18:19   #1  |  Link
uciekamy
Runaway Slave..
 
uciekamy's Avatar
 
Join Date: Dec 2006
Location: Poland > Krakow
Posts: 28
MJPEG to DVD with cropping, filters and CCE/HC/QuEnc MPEG2 encoder

As topic says i need an app that can convert my captured VHS tapes (MJPEG files) to DVDs, but i need to cut material, crop it, adjust sharpness and brightness.. Also i would like the app to use one of the quality leading MPEG2 encoders (mostly CCE).

What app should i use? I've captured tapes by VirtualDub, and it has all the abilities i need at the time, but i don't know if i can compress them again to MPEG2 with VDub?

Hope my English is understandable.. Thx in advance..
__________________
• and i take 'em 3 at a time like steve kerr ! ..
uciekamy is offline   Reply With Quote
Old 25th March 2009, 21:44   #2  |  Link
freebird73717
Linux User
 
Join Date: Apr 2008
Posts: 14
Frameserve from virtualdub to the encoder of your choice or learn some avisynth.
Frameserve with virtualdub
Frameserve with avisynth
freebird73717 is offline   Reply With Quote
Old 26th March 2009, 09:59   #3  |  Link
uciekamy
Runaway Slave..
 
uciekamy's Avatar
 
Join Date: Dec 2006
Location: Poland > Krakow
Posts: 28
Will try to handle it.. Other suggestions also appreciated..

Edit:

It's working pretty fine with TMPGEnc but i can't make CCE SP2 1.00.01.02 load the file.. No error appears, just nothing happens when i try to load it.. Other files loads fine.
__________________
• and i take 'em 3 at a time like steve kerr ! ..

Last edited by uciekamy; 26th March 2009 at 11:34.
uciekamy is offline   Reply With Quote
Old 28th March 2009, 16:27   #4  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,101
Hi uciekamy,

converting analog captured video to DVD....
This is a vast area to cover, simply because there are hundreds of ways to do this. It all depends on the quality you want to achieve and on how much time and effort you intend to invest.

I will try to cover the basics, but be prepared for some obstacles along the way.

Frameserving from VirtualDub is certainly an option, but as you already noticed, some encoders will accept this input, others will not. I would recommend to learn AviSynth scripting, because it is much more powerful and it will work with every encoder.


First thing you have to do is to check if you have to do something to get the correct aspect ratio. I assume you are doing PAL conversions (720 x 576). If you captured analog video at 720 x 576 and convert it to DVD without resizing, chances are that your aspect ratio is slightly off. This has something to do with the "active capture window" of your capture card. For a given card and driver combination this AR error will be constant.

Forum member Arachnotron is THE expert on this. He has a website where you can download test images to determine your AR error. My own situation is like this: I have a BT878 based capture card which I use with Ivan Uskov's tweaked BT8x8 drivers. If I capture in 720 x 576 then the resulting DVD will look slightly stretched horizontally. Resizing by small ratios is never a good idea (Nyquist effect), so my solution is to capture at 696 x 576 and then adding 12 pixel borders to the left and the right side which brings the frame size back to 720 x 576. This gives me the correct AR, and luckily the 12 pixel borders are well within the overscan area of my CRT TV set.

But maybe in your case aspect ratio error is small enough to ignore it. But before you do batch conversions of your many VHS tapes I would certainly recommend to check this.



Next step is to edit the capured video file. Since all I want to do is editing out commercials, I do all my editing in VirtualDub. When I am done I simply save the edited file in Direct Stream Copy mode for video and audio. (Actually I do it using VCF2AVS to translate the editing points into AVS commands, but this is too complicated for now)


Now you have the edited AVI file, and you want to improve quality by applying filters. A word of caution: A VHS capture will never look even remotely like a DVD source. Many beginners tend to use excessive filtering, but the result will look artefial. Human faces can look like taken from a wax cabinet if too much denoising has been applied. So do not overdo filtering.

To see the effects of AviSynth filters I like to use AvsP. For VHS captures the most common filters are denoising and sharpening. You might have to adjust brightness, contrast and gamma. For chroma noise CNR2 is very nice. Much depends on your specific VCR. My VCR tends to oversharp edges which I try to fix using the "FixVHSOversharp" filter. In any case you will have to do a lot of experimentation. Better filters are mostly slower than simpler ones, so you have to find the right balance for your needs.

A sample AVS script would look like this:
Code:
AviSource("My_CapturedAVI.avi")

# Optional Deinterlace
AssumeTFF()
LoadCPlugin(yadif.dll)
Yadif()

FixVHSOversharpL(30,12,8)
FixVHSOversharp(30,14,10)
ConvertToYV12(interlaced=true)  # or false
AddBorders(12,0,12,0)
cnr2()
degrainmedian()
undot()
asharp(1,4)
Please note that I only use very fast filters because my computer is so slow. You can get much better results using other filters like fft3d, LimitedSharpen and so on...


Now the actual encoding: I still use the good old DVD2SVCD software simply because I am very familiar with it and it gives me a lot of control over all the parameters. But there is a learning curve. It supports CCE, Quenc, HC, TMPGEnc and Procoder.

Another excellent AVI to DVD software is AVStoDVD. It supports HC and Quenc (not CCE), it is very easy to use, and it lets you use custom AVS scripts.


Well, there is a lot more to consider (deinterlace or not, matrix selection for the encoder, convert audio to MPA or AC3), but this post is too long already...


Let me know about your progress

Cheers
manolito
manolito is offline   Reply With Quote
Old 29th March 2009, 18:16   #5  |  Link
uciekamy
Runaway Slave..
 
uciekamy's Avatar
 
Join Date: Dec 2006
Location: Poland > Krakow
Posts: 28
Wow dude! Big appreciation for that post and all the interest..

It will need some time from me to deal with this scripting, but it doesn't seem very complicated so hopefully i'll handle it easly.. I will immediately let u know about the progress. At the moment i was just correcting contrast and adjusting brightness with vdub filters, also i enabled deinterlace and adjusted sharpness in a little bit because film looks blured for me. Colors look strange for me also, but i can't deal with filtering it (mostly red color is very, very strong while the others are pretty light).. What i'm supposed to do now is to give a try to avisynth filters you mentioned and check what improvement will happen..

As i said i've spent about a month for dealing with that tape, so i look pretty patient with all that capturing stuff and will point my expectations on quality, not on quickness..

Maybe tomorrow i will have some time to do some tries..

Thanks a lot once again!
__________________
• and i take 'em 3 at a time like steve kerr ! ..

Last edited by uciekamy; 29th March 2009 at 18:21.
uciekamy is offline   Reply With Quote
Old 10th April 2009, 13:48   #6  |  Link
uciekamy
Runaway Slave..
 
uciekamy's Avatar
 
Join Date: Dec 2006
Location: Poland > Krakow
Posts: 28
See You again

Finally i've found out great functionality of Sony Vegas 9.0 (and yeah, i was pretty lazy ass with that avisynth scripting learning ;P).. It just works perfectly for me and has all the filters i need.. Movie looks just how i wanted it to..

..but it looks great only in the preview window.. Problem is when i encode the video using standard MainConcept MPEG-2 DVD PAL options movie is very blocky (can see squares all over it). And a strange thing is that i can't setup custom template in that mpeg-2 codec (the button is grayed out and inactive, while it's active in mpeg-1 and other codecs)..

I wonder if anybody could explain that or maybe is there any possibility to make vegas use any other MPEG-2 codec? (CCE would be well appreciated).

PS: The encoded movie (DVD PAL standard template) properties shows: MPEG2 Video 720x576 (4:3) 25.00fps 9500Kbps and that's pretty high bitrate isn't it?
__________________
• and i take 'em 3 at a time like steve kerr ! ..

Last edited by uciekamy; 10th April 2009 at 13:51.
uciekamy is offline   Reply With Quote
Old 10th April 2009, 13:57   #7  |  Link
smok3
brontosaurusrex
 
smok3's Avatar
 
Join Date: Oct 2001
Posts: 2,392
http://www.debugmode.com/frameserver/

should be able to frameserve out of vegas.
__________________
certain other member
smok3 is offline   Reply With Quote
Old 10th April 2009, 14:00   #8  |  Link
uciekamy
Runaway Slave..
 
uciekamy's Avatar
 
Join Date: Dec 2006
Location: Poland > Krakow
Posts: 28
I'm affraid CCE SP2 doesn't handle frameserving (it doesn't for vdub) but i'll check that for sure with that plug.. Thanks..

/Edit: Wow.. It works.. Will check the quality of the encode when it finishes..
/Edit2: Hmmm.. Is that framserving speed always that low or am i doing anything wrong? I got CCE going about 6-8 times slower than while encoding the same file directly (without Vegas edit)..
__________________
• and i take 'em 3 at a time like steve kerr ! ..

Last edited by uciekamy; 10th April 2009 at 14:16.
uciekamy is offline   Reply With Quote
Old 10th April 2009, 15:52   #9  |  Link
smok3
brontosaurusrex
 
smok3's Avatar
 
Join Date: Oct 2001
Posts: 2,392
vegas rendering your color corrections and stuff at the same time?
__________________
certain other member
smok3 is offline   Reply With Quote
Old 10th April 2009, 18:37   #10  |  Link
uciekamy
Runaway Slave..
 
uciekamy's Avatar
 
Join Date: Dec 2006
Location: Poland > Krakow
Posts: 28
Yup. But i don't think it's that.. Built in encoder works pretty fast with the same job without frameserving..
__________________
• and i take 'em 3 at a time like steve kerr ! ..
uciekamy is offline   Reply With Quote
Old 10th April 2009, 21:18   #11  |  Link
smok3
brontosaurusrex
 
smok3's Avatar
 
Join Date: Oct 2001
Posts: 2,392
i would either:
- use frameserver with hcenc (which is able to do lossless intermediate i belive)
- do a lossless intermediate manually and then multipass encode that with cce
that is if you care about quality and you are targeting specific bitrate, else i would
- use hcenc quality based mode
__________________
certain other member
smok3 is offline   Reply With Quote
Old 10th April 2009, 21:22   #12  |  Link
uciekamy
Runaway Slave..
 
uciekamy's Avatar
 
Join Date: Dec 2006
Location: Poland > Krakow
Posts: 28
Wouldn't huffyuv be better for lossless? Or what about encoding once again to MJPEG and then put it to CCE ?
__________________
• and i take 'em 3 at a time like steve kerr ! ..
uciekamy is offline   Reply With Quote
Old 10th April 2009, 21:25   #13  |  Link
smok3
brontosaurusrex
 
smok3's Avatar
 
Join Date: Oct 2001
Posts: 2,392
huffyuv should do just fine, Mjpeg will mean another generation, better have patience with frameserving then...
__________________
certain other member
smok3 is offline   Reply With Quote
Old 10th April 2009, 21:26   #14  |  Link
uciekamy
Runaway Slave..
 
uciekamy's Avatar
 
Join Date: Dec 2006
Location: Poland > Krakow
Posts: 28
Aaaight then. Thx mate.
__________________
• and i take 'em 3 at a time like steve kerr ! ..
uciekamy is offline   Reply With Quote
Reply

Tags
encoding, filtering, mjpeg, mpeg2

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:44.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.