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 > Capturing and Editing Video > Avisynth Usage

Closed Thread
 
Thread Tools Search this Thread Display Modes
Old 4th April 2012, 16:54   #1141  |  Link
mp3dom
Registered User
 
Join Date: Jul 2003
Location: Italy
Posts: 1,135
I got it to work with SetMTMode(3) before QTGMC call. With SetMTMode(2) it throw that error.
mp3dom is offline  
Old 4th April 2012, 20:00   #1142  |  Link
-Vit-
Registered User
 
Join Date: Jul 2010
Posts: 448
mp3dom: Using SetMTMode(3) removes most of the benefit of multithreading. Can you call FFT3DFilter on its own successfully?

Terka: I am testing SVP+TGMC right now.
-Vit- is offline  
Old 4th April 2012, 21:53   #1143  |  Link
SubJunk
Registered User
 
Join Date: Jun 2010
Posts: 443
Quote:
Originally Posted by -Vit- View Post
I am testing SVP+TGMC right now.
For now I recommend using the SVP 3.0 libraries since the 3.1 libs seem to have a bug that affects output, or at least wait for a fix
SubJunk is offline  
Old 4th April 2012, 22:24   #1144  |  Link
-Vit-
Registered User
 
Join Date: Jul 2010
Posts: 448
Quote:
Originally Posted by SubJunk View Post
For now I recommend using the SVP 3.0 libraries since the 3.1 libs seem to have a bug that affects output, or at least wait for a fix
I'm not using the entire SVP 3.x package, only the svpflow library. Only the latest version 1.0.2 contains SVConvert the function that allows use of SVP vectors for purposes other than frame interpolation (InterFrame/FlowFPS).

Also I should say, for those who are not so familiar with the SVP libraries, that there's no GPU reason to use SVP for (Q)TGMC or similar. The only GPU code in SVP is for rendering the final frames when doing frame interpolation. It's the updates to the motion analysis that interest me, the reworked version of MVTools, and whether it improves quality or speed. However, that part is all CPU code.

Last edited by -Vit-; 5th April 2012 at 00:15.
-Vit- is offline  
Old 5th April 2012, 02:22   #1145  |  Link
D-Dave
Registered User
 
Join Date: Mar 2011
Posts: 8
After reinstalling Windows 7, putting avisynth and its other components back together, as well as messing around with a dozen or so scripts, I successfully deinterlaced HD video (with both single-threading and multi-threading) and saved the results in a lossless format. With some additional work I managed to get my lossless file (using the lagarith codec) to be read by my other video editors as well as have the audio embedded AND in sync with the footage. My HD footage is also rid of that strange slowed playback.

Though I may have solved a big portion of my original problems, I am now faced with the dilemma of how I should go about setting up QTGMC. QTGMC has so many options that I can set and change, I tend to go overkill with my settings. For example, I tend to set my SD footage on “Placebo” or “Very Slow” to insure that I am not cutting corners with making the video look as good as it can (without attempting to go overboard with the settings, ironically). Like many others, I strive to get the best quality, but as others have responded, overkill or complicated setups add a large amount of extra time for little if any noteworthy improvements. So my question is: what are good scripts I could use that would yield the most noticeable and beneficial results but wouldn’t go overboard in encoding time for trivial quality improvements?

Could someone provide me with a foundation for my presets for a general type of situation? For example, how should I go about deinterlacing HD video captured in a low light situation and has a good amount of noise (as well as SD footage with the same situation)? What about situations where there is little noise because it was recorded outside with plenty of light? I’m not sure how deeply probed my question will be, but I’m hoping to find scripts that will generally provide great quality outputs for general situations (low noise vs. high noise footage, high motion [sports] vs. typical motion footage [but not static]).
D-Dave is offline  
Old 5th April 2012, 03:53   #1146  |  Link
jfcarbel
Programmer
 
Join Date: Feb 2002
Location: Chicago, IL
Posts: 496
Quote:
Originally Posted by nhope View Post
You could follow the workflow in my signature, which takes interlaced footage from the Vegas timeline right through to x264.
Thanks, I did actually run across you guide yesterday when googling and coming across it in a creativecow sony vegas users forum.

Your guide is the most detailed I have found - Thanks!.

After further looking into AVCHD spec, I realize I need to go to 720 60p as my target for Bluray acceptance.

I assume since my target is Bluray for my material and not the web, that a few things from the guide would be modified.

For example:
ColorYUV(levels="PC->TV")
- I assume this would be commented out since my target space is bluray to be rendered on an LCD.

Then there is the resolution. Since Bluray official spec does not support AVCHD in 1080 60p (AVCHD 1.0 spec), then I would resize to 720p and use (matrix="PC.709")

I assume your guide as is produces 30p and AVCHD spec calls for 59.94 progressive. So if I wanted 60p, then I would leave out FPSDivisor=2 in the deinterlace. Is that correct? Also the AVCHD spec shows progressive supported rate as 59.94, I assume when we see 60p that is just a misnomer from rounding up?

One thing from your guide that was confusing was this part:
"I am working with HDV 1080-60i, so I started with the HDV 1080-60i (1440x1080, 29.970 fps) template"

I not sure I understand, if source is 1080-60i, then wouldn't fps be 59.94 not 29.970? And in screen shot the deinterlace method is set, shouldn't this be disabled since AVISynth script is doing the deinterlace?

Then again my m2ts file from my Panny that was recorded in 1920x1080 60i shows fps as 29.970 in mediainfo, so I am confused as it is 60i not 30i

MediaInfo from HD Camcorder file for 60i:

Code:
Width                            : 1920 pixels
Height                           : 1080 pixels
Display aspect ratio             : 16:9
Frame rate                       : 29.970 fps
Color space                      : YUV
Chroma subsampling               : 4:2:0
Bit depth                        : 8 bits
Scan type                        : Interlaced
Scan order                       : Top Field First
Also I sometimes do 1080p, for that I would just remove all deinterlacing stuff and just resize to 720p:
remove QTGMC and remove AssumeTFF/BFF
then do:
ConvertToYV12(interlaced=false, matrix="PC.709")

Since target is Bluray then I would think a better CRF value for x264 should be used. I would think 16 would be a good choice. Do you have experience in CRF values for Bluray output?
jfcarbel is offline  
Old 5th April 2012, 09:18   #1147  |  Link
nhope
partially-informed layman
 
Join Date: Jan 2002
Location: Bangkok, Thailand
Posts: 314
Quote:
Originally Posted by jfcarbel View Post
After further looking into AVCHD spec, I realize I need to go to 720 60p as my target for Bluray acceptance.
Supported Blu-ray resolutions are shown here.

Quote:
ColorYUV(levels="PC->TV")
- I assume this would be commented out since my target space is bluray to be rendered on an LCD.
You want to end up with studio levels (= "video" or "tv" levels, i.e. blacks at 16, whites at 235) for Blu-ray, exactly the same as you want to end up with studio levels for an H.264 file uploaded to the web. There are many variables at play here, and they include the camera's behaviour, your camera settings, your NLE's behaviour, the codecs used, whether you adjust luminance in your NLE, what you set as a value for "matrix" in your ConvertToYV12 line, whether you frameserve in RGB or YUY2, whether you set that ColorYUV line etc.. The best way to be sure you've ended up with the right levels is to put the rendered file back in you NLE and check levels on the video scopes.

Quote:
I assume your guide as is produces 30p and AVCHD spec calls for 59.94 progressive. So if I wanted 60p, then I would leave out FPSDivisor=2 in the deinterlace. Is that correct?
Yes.

Quote:
Also the AVCHD spec shows progressive supported rate as 59.94, I assume when we see 60p that is just a misnomer from rounding up?
"60p" is an abbreviation for 59.94p. Yes, this rounding thing is confusing since "30p" is also an abbreviation for 29.97p, but some cameras actually shoot true 30 fps, and some software gets it wrong too.

Quote:
One thing from your guide that was confusing was this part:
"I am working with HDV 1080-60i, so I started with the HDV 1080-60i (1440x1080, 29.970 fps) template"

I not sure I understand, if source is 1080-60i, then wouldn't fps be 59.94 not 29.970?
I was quoting the exact name of the template in Vegas Pro. 29.97 is the FRAME rate. 59.94 is the number of FIELDS per second. In interlaced footage a frame is made up of 2 fields. Confusion is understandable, since some people like to quote frame rates and some like to quote field rates. In other words 30i and 60i can refer to the same thing.

Quote:
And in screen shot the deinterlace method is set, shouldn't this be disabled since AVISynth script is doing the deinterlace?
No, that setting is ignored in this case. It's the "Field Order" field that is important. I recommend setting the deinterlace method to "interpolate fields" and leave it there forever (it's vitally important to have a deinterlace method set if you ever resize interlaced footage within Vegas).

Quote:
Also I sometimes do 1080p, for that I would just remove all deinterlacing stuff and just resize to 720p:
remove QTGMC and remove AssumeTFF/BFF
then do:
ConvertToYV12(interlaced=false, matrix="PC.709")
You don't need to convert to anything if you're just resizing. Just a script like this should be all you need (I'm tending to use Spline36Resize rather than LanczosResize these days):

Code:
AviSource("d:\fs.avi")
Spline36Resize(1280,720)
Quote:
Since target is Bluray then I would think a better CRF value for x264 should be used. I would think 16 would be a good choice. Do you have experience in CRF values for Bluray output?
Sorry, no. All I have ever done is put (re-wrapped) 1440x1080-60i HDV on Blu-ray with no recompression. You'll have to do some research into the max support bitrate and then test the crf value, or even specify a bitrate directly in the x264 settings. I think there are MeGUI presets for Blu-ray. This latter discussion should really be taken to the MeGUI support thread if you need more help as it's not QTGMC-related.

Having said all of that, it looks like your camera is actually shooting 1920x1080-29.97i (29.97 frames per second, 59.94 fields per second). That spec is supported by Blu-ray, so that's what you should put on Blu-ray without deinterlacing or resizing. If you're not color correcting or adding FX you may be able to put it directly on Blu-ray without any recompression if your authoring software is clever enough.
nhope is offline  
Old 5th April 2012, 09:54   #1148  |  Link
jfcarbel
Programmer
 
Join Date: Feb 2002
Location: Chicago, IL
Posts: 496
Quote:
Having said all of that, it looks like your camera is actually shooting 1920x1080-29.97i (29.97 frames per second, 59.94 fields per second). That spec is supported by Blu-ray, so that's what you should put on Blu-ray without deinterlacing or resizing. If you're not color correcting or adding FX you may be able to put it directly on Blu-ray without any recompression if your authoring software is clever enough.
Hmm, ok a bit confused here. As I understand it AVCHD has its own specifications

From the AVCHD page it mentions - "Although AVCHD shares many format similarities with Blu-ray Disc, it is not part of the Blu-ray Disc specification."

But I think where AVCHD aligns with BD spec, as you say it should be compatible without any conversion. I'll just have to give it a try. For interlaced it should work, but for 60p that will have to be scaled down to 720 60p for Bluray disc support.

I will be using Vegas program to author the BD disc.

In some cases I will want to edit the video and cut out unwanted sections, thus in this case I would need to render and rencode with x264 and its probably best then that I deinterlace before reencode. Is that a correct assesment?

Quote:
You don't need to convert to anything if you're just resizing.
I will also be editing, cutting out unwanted material and probably adding some minor transitions so I assume I will need to reencode as well as resize. Correct?

Quote:
You want to end up with studio levels (= "video" or "tv" levels, i.e. blacks at 16, whites at 235) for Blu-ray, exactly the same as you want to end up with studio levels for an H.264 file uploaded to the web. There are many variables at play here, and they include the camera's behaviour, your camera settings, your NLE's behaviour, the codecs used, whether you adjust luminance in your NLE, what you set as a value for "matrix" in your ConvertToYV12 line, whether you frameserve in RGB or YUY2, whether you set that ColorYUV line etc..
I would mostly be following you guide and using Vegas, so I assume much of what you indicated in that guide would be correct process. I would not be touching luminance in NLE, based on HD video I would set the ConvertToYV12 to what you recommened in guide, I would be rendering from Vegas as RGB since this is what your guide suggests. I think that addresses most of the variables.

Last edited by jfcarbel; 5th April 2012 at 10:01.
jfcarbel is offline  
Old 5th April 2012, 10:00   #1149  |  Link
hydra3333
Registered User
 
Join Date: Oct 2009
Location: crow-land
Posts: 540
Quote:
Originally Posted by Didée View Post
An when your host application is VirtualDub, then do
N O T
include "distributor()" at the end of the script.
(For VfW-applications it gets automatically inserted anyway. If you then specify it manually, the distributor is getting distributor'ed, the number of spawned threads thereby gets manifolded, the resources accordingly, and that's why+where it goes BOOM! for you.)
Is inserting Distributor() safe when the program is avs2yuv or x264 32bit or x264 64bit ?
hydra3333 is offline  
Old 5th April 2012, 14:10   #1150  |  Link
nhope
partially-informed layman
 
Join Date: Jan 2002
Location: Bangkok, Thailand
Posts: 314
Quote:
Originally Posted by jfcarbel View Post
In some cases I will want to edit the video and cut out unwanted sections, thus in this case I would need to render and rencode with x264 and its probably best then that I deinterlace before reencode. Is that a correct assesment?...
...I will also be editing, cutting out unwanted material and probably adding some minor transitions so I assume I will need to reencode as well as resize. Correct?
To keep best quality I would try not to deinterlace or resize throughout the whole process, but you will need to re-encode.

Quote:
I assume much of what you indicated in that guide would be correct process.
I hope so, but it's worth knowing what levels your camera shoots so you can compensate for that if necessary.
nhope is offline  
Old 5th April 2012, 20:15   #1151  |  Link
jfcarbel
Programmer
 
Join Date: Feb 2002
Location: Chicago, IL
Posts: 496
In regards to nhope guide:
Quote:
I was quoting the exact name of the template in Vegas Pro. 29.97 is the FRAME rate. 59.94 is the number of FIELDS per second. In interlaced footage a frame is made up of 2 fields. Confusion is understandable, since some people like to quote frame rates and some like to quote field rates. In other words 30i and 60i can refer to the same thing.
Ok, found this great article/guide.

With your explanation and this guide, it clears things up for me.

To simplify, when the video is expressed as progressive then the number is Frame Rate.

If its interlaced video then its up in the air as to which one is being used (frame vs field). It seems as you said in the case of camcorder manufacturer. they generally refer to it as field rate (example 60i), but the frame rate of that 60i is 29.97 and thusly represented as such when looking at mediainfo for the interlaced clip.

The Bluray spec supports 1920x1080 60i (29.97 fps) while AVCHD spec does not. But this is easily solved by mastering the content to Bluray rather than an AVCHD BD disc.

However, 1080 60p is not supported by either Bluray spec or the AVCHD 1.0 spec. Bluray supports only 24p in 1080 and supports 60p in 720. So resizing is neccessary for Bluray compliance.

What is confusing to me is why HD Camcorder manufacturers would even bother offering interlaced recording modes when all modern digital displays are natively progressive and can not display interlaced. What is the reasoning behind offering interlaced recording on HD Camcorders?

Last edited by jfcarbel; 5th April 2012 at 20:17.
jfcarbel is offline  
Old 5th April 2012, 20:38   #1152  |  Link
jfcarbel
Programmer
 
Join Date: Feb 2002
Location: Chicago, IL
Posts: 496
Quote:
To keep best quality I would try not to deinterlace or resize throughout the whole process, but you will need to re-encode.
I am surprised you state this, I thought the whole point of deinterlacing was to provide a better quality smoother picture on a modern progressive display.

Or is the only reason to deinterlace is because of the neccessity to resize? That is, if resizing interlaced material then must deinterlace first.

So if keeping the original resolution then do not de-interlace. Correct?

To deinterlace or not?

Of course I have heard the argument from both sides. In one case someone states that the software deinterlacer of QTGMC will do much better then a TV deinterlacer. But then there is the camp that states that once you deinterlace you are altering the content and can never get it back and that TV deinterlace alogorithms will most likely improve as technology progresses so archive it the same as the source if possible.

I also have some projects in which I will be encoding DV video (YV12 from my codec) into H.264 and it was also suggested that in addition to deinterlace improving SD video quality before encode that QTGMC would also clean up some of the SD noise before the encoding and provide better PQ. So maybe for HD Camcorder video I only deinterlace when neccessary but deinterlace for SD video coming from older (8-9 yrs old) MiniDV 8mm tapes.

Anyone else have comments or thoughts on this?

Last edited by jfcarbel; 5th April 2012 at 22:13.
jfcarbel is offline  
Old 5th April 2012, 21:46   #1153  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
Anybody have an alternate download link for the Plugins Package in the first post? Mediafire keeps failing the download for me. Thank you.
Guest is offline  
Old 5th April 2012, 22:37   #1154  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
Quote:
Originally Posted by hydra3333 View Post
Is inserting Distributor() safe when the program is avs2yuv or x264 32bit or x264 64bit ?
x264 inserts Distributor() automatically.
Groucho2004 is offline  
Old 6th April 2012, 01:43   #1155  |  Link
-Vit-
Registered User
 
Join Date: Jul 2010
Posts: 448
Quote:
Originally Posted by neuron2 View Post
Anybody have an alternate download link for the Plugins Package in the first post? Mediafire keeps failing the download for me. Thank you.
I've added hotfile mirrors to all the main downloads on the first post. Mediafire has also been giving me trouble recently.
-Vit- is offline  
Old 6th April 2012, 03:35   #1156  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
Thanks -Vit-! I've been meaning for some time to test drive your tool. I've heard a lot of great things about it and if it lives up to its billing I'm hoping it will improve some of my slo-mo swimming vids via high-quality bobbing.
Guest is offline  
Old 6th April 2012, 13:15   #1157  |  Link
nhope
partially-informed layman
 
Join Date: Jan 2002
Location: Bangkok, Thailand
Posts: 314
Quote:
Originally Posted by jfcarbel View Post
I am surprised you state this, I thought the whole point of deinterlacing was to provide a better quality smoother picture on a modern progressive display.
I was going by a "less is more" approach, and based on my experience of how smooth and clear my 1080i HDV looks when played back when viewed via Blu-ray/Playstation on a big Sony LCD display, and direct from camera to a projector.

It certainly seems to me that downsizing to 720 just so you can get a Blu-ray-compatible progressive stream is an inferior approach to letting the playback hardware do its thing with a 1080i stream.

Quote:
I will be encoding DV video (YV12 from my codec) into H.264 and it was also suggested that in addition to deinterlace improving SD video quality before encode that QTGMC would also clean up some of the SD noise before the encoding
I have recently been transcoding a lot of PAL DV to NTSC via QTGMC and I have found that it does significantly decrease noise, even without specifying denoising in the QTGMC options.
nhope is offline  
Old 6th April 2012, 17:23   #1158  |  Link
jfcarbel
Programmer
 
Join Date: Feb 2002
Location: Chicago, IL
Posts: 496
Quote:
It certainly seems to me that downsizing to 720 just so you can get a Blu-ray-compatible progressive stream is an inferior approach to letting the playback hardware do its thing with a 1080i stream.
Yopur right, and I was originally looking at AVCHD spec, but that spec was only really created so that consumers would have a lower bitrate HD stream that could be writted to a DVD using Bluray structure (BD-5/9)

But I changed course after you made a light bulb go off in my head and that is there is no reason I can't just author a standard Bluray and avoid AVCHD format on Bluray.

So I will not be resizing the interlaced 1080 60i and leave as 1080. But I will need to resize the 1080 60p since that is not on Bluray spec, but then there is no deinterlace involved for that.
jfcarbel is offline  
Old 6th April 2012, 17:43   #1159  |  Link
-Vit-
Registered User
 
Join Date: Jul 2010
Posts: 448
Quote:
Originally Posted by neuron2 View Post
Thanks -Vit-! I've been meaning for some time to test drive your tool. I've heard a lot of great things about it and if it lives up to its billing I'm hoping it will improve some of my slo-mo swimming vids via high-quality bobbing.
Really you should thank Didée, it's his work originally.
____

SubJunk has now kindly hosted all the main QTGMC files, so there are now more mirrors on the first post.
It's particularly useful at the moment given the ongoing filehosting problems.
-Vit- is offline  
Old 6th April 2012, 18:26   #1160  |  Link
Johnnyas
Registered User
 
Join Date: Mar 2012
Posts: 15
Hi, long time lurker here - first time poster. I'm having problems getting some home video smoothly rendered with QTGMC. It looks very good until I do any sideways panning, which ends up being a bit .. uh, not really sure how do describe it. It isn't really stuttering, but it isn't a very smooth pan either (it scrolls, then pauses a tiny bit). I've spent countless hours rendering after minor changes, but whatever I do - I end up getting either the same result, or a worse one. Hoping somebody more wizened than me could be bothered to lend a hand!

The camera I've shot the footage with, is a Sony HDR-SR12, file properties of the MTS source files in Sony Vegas shows:
Type: MPEG-2 Transport Stream
Streams
Video: 00:01:07,600, 25,000 fps interlaced, 1920x1080x12, AVC

I render these out from Sony Vegas with Lagarith, 25fps, upper field first,
from a project set to 25 fps, UFF, 32 bit floating point (full range) pixel format, best rendering quality and deinterlace method set to none

I use this AVS script:
AVISource("F:\DigiVidCam\20101205-20101212-Tenerife\render\ForDoom9\test.avi", audio=false).AssumeFPS(25,1)
AssumeTFF()
QTGMC( Preset="Very Slow" )

with this x264 configuration:
Const. quality 20, default tuning, high AVC profile, unrestricted/autogess AVC level, default target playback device, with the Very Slow preset

I rendered a short clip from this, which can be downloaded from here (4,3 MB):
magnet:?xt=urn:btih:5B7EC313B1C27B04A5E9B14EDC9E693BBDD4FB92&dn=test.mkv&tr=udp%3a//tracker.openbittorrent.com%3a80/announce
It's not too bad, but not really smooth either.

The Lagarith source is here (121 MB):
magnet:?xt=urn:btih:9BA4627588689B3CDE0CD7677711C963EC0F6F41&dn=test.avi&tr=udp%3a//tracker.openbittorrent.com%3a80/announce


I've tried to render it to different formats, but I'm stuck with the same motion. At this point, I'm not really sure if it's the equipment,
if it's shaky cam or if it's really just deinterlacing problems. Hope somebody can hint me in the right direction if it's the latter! I'm sooo tired dealing with deinterlacing, that I'm gonna get a new cam (perhaps Sony HDR-CX260V), but I've got a load of footage that I haven't rendered out yet - and some footage I have rendered but I'm not completely satisfied with it.
Johnnyas is offline  
Closed Thread

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 08:16.


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