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. |
|
|
Thread Tools | Search this Thread | Display Modes |
16th February 2012, 07:22 | #1 | Link |
partially-informed layman
Join Date: Jan 2002
Location: Bangkok, Thailand
Posts: 314
|
MVtools scene detection for a clean cut? (1080-50i to 720-30p)
I have a bunch of HDV 1080-50i clips on my Sony Vegas Pro timeline and I'm converting them to 720-30p UT video codec format to mix with footage originating from HDV 1080-60i by frameserving to the following script, then VirtualDub. It will later be rendered to H.264 for the web.
Code:
AviSource("d:\fs.avi") AssumeTFF() ConvertToYUY2(interlaced=true, matrix="Rec601") QTGMC(SubPel=2, EdiThreads=2) super = MSuper(levels=1, pel=2) MFlowFps(super, QTGMC_bVec1, QTGMC_fVec1, num=30000, den=1001) Spline36Resize(1280,720) AssumeFPS(29.97) I guess one solution might be to duplicate a frame instead of blending at those transitions, but I fear that might look less smooth during playback. I guess another solution might be to drop a frame, although that would make the video shorter and I would prefer to retain the overall length of the video so I can still sync 50i and 30p to audio on my timeline. So it seems the ideal solution might be to somehow detect which transitions are going to render a blended frame, and then at those transitions to generate a new frame by either looking just backwards at the preceding clip, or just forwards at the following clip, depending which of those 2 clips' ends is closer to the cut. I hope that makes sense! Possible? Or should I just live with the blended transitions? |
16th February 2012, 08:20 | #2 | Link |
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,391
|
Code:
MFlowFps(super, QTGMC_bVec1, QTGMC_fVec1, num=30000, den=1001, blend=false )
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
16th February 2012, 14:17 | #4 | Link |
Registered User
Join Date: Dec 2007
Location: Germany
Posts: 632
|
Some tips:
1) Avoid AssumeFPS(29.97) It's not exactly the right frame rate. It might seem over-the-top but it's a difference whether a video is marked as 29.970000000000 fps or 29.970029970029970(...) fps which is the real NTSC frame rate, 30000/1001. Use AssumeFPS(30000,1001). In fact you can omit this line because the frame rate was converted to 30000/1001 by MFlowFps already. 2) If "d:\fs.avi" is your raw HDV source (YV12) then the matrix parameter in ConvertToYUY2() won't do anything at all! It is only used for conversions between any YUV color space and RGB. If you need to do a conversion from Rec709 to Rec601 coefficients then you need to use ColorMatrix. Code:
ColorMatrix(mode="Rec.709->Rec.601", clamp=0) Last edited by TheSkiller; 16th February 2012 at 16:08. |
17th February 2012, 05:37 | #5 | Link | ||
partially-informed layman
Join Date: Jan 2002
Location: Bangkok, Thailand
Posts: 314
|
Thanks for you reply TheSkiller.
Quote:
Quote:
|
||
17th February 2012, 06:40 | #6 | Link | |
Registered User
Join Date: Sep 2007
Posts: 5,551
|
Quote:
ie. You are frameserving RGB from vegas but converting to YUY2 (rec601) in the script; vdub is using Rec601 to convert to RGB for display, not Rec709. But when you view this on some other device or HD workflow , it will most likely use Rec709 for display |
|
17th February 2012, 07:03 | #8 | Link | |
Registered User
Join Date: Sep 2007
Posts: 5,551
|
Quote:
So you render UT 422 out of vdub with the script , then re-import into vegas? The problem is vegas is converting UT 422 to RGB using Rec601, not treating it as Y'CbCr Why not do whatever you have to do in vegas, before you frameserve out? This way you don't face several uncessary colorspace conversions ? EDIT: sorry nevermind, I see what you are doing, you're mixing it back in a vegas project with 60i footage Last edited by poisondeathray; 17th February 2012 at 07:14. |
|
17th February 2012, 07:53 | #10 | Link |
partially-informed layman
Join Date: Jan 2002
Location: Bangkok, Thailand
Posts: 314
|
Back to the original point, the mvtools documentation implied that blend=false might actually simply repeat frames at scene changes. So it concerned me that there might be a bit of a "jolt" at scene changes. But I'm finding that there is no such repeated frame, at least in the case of my 50i to 30p script. Motion is totally smooth amd cuts are clean. So that's great!
|
17th February 2012, 10:07 | #11 | Link | |
Avisynth language lover
Join Date: Dec 2007
Location: Spain
Posts: 3,435
|
Quote:
|
|
Tags |
blend, cut, mvtools, scene detection, transition |
Thread Tools | Search this Thread |
Display Modes | |
|
|