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 16th February 2011, 13:07   #321  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,390
Regarding "what interlacing types can be processed" and "can I use for it IVTC" ...

What needs to be understood is: the consequences of the temporal blur used before the motionsearch.

This temporal blur is ...

a) ... ultimately necessary, it's THE key feature. Without it, Q/TGMC would not be what it is.

b) ... only well suited for "true" interlaced input, where each field represents a unique point in time. This is NOT the case for progressive input, nor for telecined input, nor for fieldblended input.

The problem with input that isn't of the "true" interlacing type is that the distribution of "temporal motion states" is not evenly distributed. In effect, the preprocessed searchclip will exhibit a certain kind of left-right-"wobble", which in turn will fool the motionsearch. (And if the motionsearch is bad, then everything is bad.)


Summed up: The method generally is made up only for "true" or "video-type" interlacing. With all other interlacing types, there be dragons. It might work out, or it might fail.


Clinic example: a grey square (with some letters & a vertical line) moving at constant speed.



Only in the case of "true" interlacing all frames look "the same". With the other types, the frames are changing their shape in a way that MVTools can not reasonably deal with.

(For clarity, this example is without the "rep0" feature. Using rep0 will lessen the problem to some extend, but it will not eliminate it.)
__________________
- 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!)

Last edited by Didée; 16th February 2011 at 13:11.
Didée is offline  
Old 16th February 2011, 16:49   #322  |  Link
sadie
Registered User
 
Join Date: Sep 2006
Posts: 55
Ok, well 3.10 did succeed in holding things together and I managed to get a full crf 20 encode with SM=2, Sh=.3 settings. Then I looked and thought, boy, these are awfully sharp, rather...noisy sharp in fact. Then I go on-line and read about version 3.11. Grrr. Vit, ever heard of Murphy's law in Russia?

So back to square A. Maybe not in vain, as I had a few surprises.

http://rapidshare.com/files/44826318...us_fingers.avi
http://rapidshare.com/files/44826318...us_plastic.avi
http://rapidshare.com/files/44826318...sing_frame.avi

Clips A & B are still captures that as you'll see are bit quite a bit more animated than your average noise. In a way kind of comical. Clip C missing frame syndrome (er I should have named it 'extra frame' is found in 3 places in the video). In fact, I say 'missing' because in a frame-by-frame search in Premiere, Pinnacle Studio and Virtualdub it simply cannot be found. Only Avidemux spotted it and of course when I chopped them out and direct stream saved the file they came right back (the ol' keyframe limitation). Also, neither my interlaced dvd copy nor an earlier 25p encode manifest it either. It's a purely full-rate 50p issue. I mean in three weeks of editing never saw it. As the French say, a true 'piege a con'. That said, all three had one trait in common, the sequences had been pre-rendered in reverse motion. Any thoughts or workaround? Another 12 hour encode for three lousy frames seem a bit much.

So before discovering your 'bug' I'd thought to do a follow-up 25p encode with the default sharpness=0.20 to correct my supposed error, but I'm not sure now. Is there that much of a difference .3 vs .2 or would your goof be the over-riding factor for that hardened image I got?

Is DirectShowSource really such a drag? In the past with mpeg4-asp I alternated with avisource indifferently. No probs.
Only here virtualdub wouldn't let me open as such, even if I believe I've got the DVCPro DV decoder by Sony. HenryHo recommended Cenocida as a solution. Why not, though I can't see how that would effect such things as smearing. Oh well, onwards.
sadie is offline  
Old 16th February 2011, 18:12   #323  |  Link
-Vit-
Registered User
 
Join Date: Jul 2010
Posts: 448
Yup, QTGMC likes "real" predictable motion with true interlacing. I never work with anime or unpleasant hybrid sources (I looked at YATTA once... I had to go lie down) so QTGMC is never tested on such material. I occasionally work with game footage - the same issues can apply where the motion is jumpy or artificial. Source match will not help in these cases, it will probably make things worse as it does double or triple the temporal work

As an adjunct to Didee's comments though - progressive input will work in QTGMC if you use the InputType setting. The problem Didee illustrated is what happens if you don't set InputType and treat progressive material as though it were interlaced - the algorithm will (inappropriately) try to separate fields and interpolate the result. With InputType=1, those steps are skipped, leaving a correct result more like the interlaced case. With InputType=2,3 the source is reweaved into a true interlaced stream, also correct for TGMC processing (loses half the "fields" in the process though). However, despite these adjustments it's only appropriate to use progressive QTGMC if you're trying to remove some kind of shimmering post-deinterlacing artefacts. Q/TGMC is designed to interpolate and remove bob-shimmer. Progressive doesn't need interpolation, so if you don't have bob-like-shimmer then there's no reason left to use QTGMC - likely you just want a temporal smooth of some kind.
____

sadie: The bug in v3.05 and v3.10 created a noisier, sharper result, probably greater than the difference between 0.2 and 0.3 sharpness. The bug was worse if TR2 was higher (=slower presets).

Regarding source filters, I know no of no rationale for when they decide not to work, nor any workaround other than try every possible filter. Or pre-render to lossless in any package that can successfully deal with the vid. Rendering via lossless would have helped you - it's then easy (if rather manual) to reprocess the few problem section, splice the result in another script then encode to x264.
-Vit- is offline  
Old 16th February 2011, 19:08   #324  |  Link
sadie
Registered User
 
Join Date: Sep 2006
Posts: 55
Yeah, I gotcha. Finally, to do this stuff with this level of sophistication I'm really going to have to get out of the mindset that pre-processing and encoding are a one-stop all inclusive operation. They really should be treated as two entirely separate stages in the workflow.
sadie is offline  
Old 17th February 2011, 02:23   #325  |  Link
SubJunk
Registered User
 
Join Date: Jun 2010
Posts: 441
Quote:
Originally Posted by Gavino View Post
Are you sure your source is really interlaced?
A glitch every 5 frames suggests that it is telecine material and should be IVTC'd rather than deinterlaced.
You're right, it turns out that I had improperly IVTC'd the clip. Thanks
SubJunk is offline  
Old 17th February 2011, 21:50   #326  |  Link
osgZach
Registered User
 
Join Date: Feb 2009
Location: Waterloo, WI - USA
Posts: 650
Is specifying progressive input appropriate enough to get the smoothing/resharpening effects without getting other funky artifacts on IVTC'd material?

I suppose that what I should have asked earlier back when I jumped into this thread. It is really helpful on sources that are slightly blurry, and also have some aliasing present.
I haven't really been able to duplicate the result I get from QTGMC with other traditional sharpening filters.
osgZach is offline  
Old 18th February 2011, 04:50   #327  |  Link
fusebyte
Registered User
 
Join Date: Jan 2011
Posts: 16
HY,only a little question.
Can I use QTGMC to de-interlace a MPEG-TS HDTV 1080i file to 1080p MKV file?

Thanks
fusebyte is offline  
Old 18th February 2011, 05:31   #328  |  Link
-Vit-
Registered User
 
Join Date: Jul 2010
Posts: 448
Yes, you can use QTGMC to deinterlace 1080i to a 1080p MKV. As it can be a demanding script you're recommended to use a more modest preset depending on the power of your system (it will still look good at HD). Using multi-threaded Avisynth will help the speed (see the OP for instructions), but you should start low with the number of threads
-Vit- is offline  
Old 18th February 2011, 07:04   #329  |  Link
dragon_warrior
Registered User
 
Join Date: May 2010
Posts: 123
I'm using QTGMC to deinterlace 2 videos, one is MPEG-TS and the other is H264-TS then joining them into one. But when the encoding goes for about 6% I keep getting a disturbing crash along with an error, which tells "x264.exe has stopped working...fault module name: avisynth.dll"
What can I do to get rid of it? Thanks.
dragon_warrior is offline  
Old 18th February 2011, 11:05   #330  |  Link
fusebyte
Registered User
 
Join Date: Jan 2011
Posts: 16
Quote:
Yes, you can use QTGMC to deinterlace 1080i to a 1080p MKV. As it can be a demanding script you're recommended to use a more modest preset depending on the power of your system (it will still look good at HD). Using multi-threaded Avisynth will help the speed (see the OP for instructions), but you should start low with the number of threads
Thanks for answer.
I don't understand the best script setting for deinterlace 1080i to 1080p.
Maybe...
Quote:
DirectShowSource("MyInput1080i.ts")
QTGMC( Preset="Slow", SourceMatch=3, Lossless=2 ,EdiThreads=4 ) # I have a Quad core 6600 G0
...need some other parameters?
and more important, How can i start my AVS script?
Which GUI can i use?
I tried MEGUI but give me error at line 2 ( QTGMC( Preset="Slow", Sourc....)

All needed DLLs are downloaded and stored in AVISYNTH folder.

Thanks in advance for Help.
fusebyte is offline  
Old 18th February 2011, 12:21   #331  |  Link
TheSkiller
Registered User
 
Join Date: Dec 2007
Location: Germany
Posts: 637
Quote:
Originally Posted by fusebyte View Post
and more important, How can i start my AVS script?
Which GUI can i use?
Try VirtualDub.

Quote:
Originally Posted by fusebyte View Post
All needed DLLs are downloaded and stored in AVISYNTH folder.
Put them into the /AviSynth/plugins folder.

Also, you can gain a lot of speed if you switch to a multithreaded AviSynth and add SetMTmode right before QTGMC.
TheSkiller is offline  
Old 18th February 2011, 12:42   #332  |  Link
fusebyte
Registered User
 
Join Date: Jan 2011
Posts: 16
Yes,pardon I mean Avisynt/plugin folder.


Do U mean like this?
Quote:
DirectShowSource("MyInput1080i.ts")
SetMTmode QTGMC( Preset="Slow", SourceMatch=3, Lossless=2 ,EdiThreads=4 ) # I have a Quad core 6600 G0
Can I also set the .MKV output file?

I read the instructions carefully but I think I need an AVS script sample to better understand conversion from 1080i 29,970 fps to 1080p fps 23,976
and allow the same resolution and video bitrate.
TS file is "true interlaced" not Telecined.

Tk's
fusebyte is offline  
Old 18th February 2011, 16:03   #333  |  Link
-Vit-
Registered User
 
Join Date: Jul 2010
Posts: 448
There is info on basic usage and multi-threaded usage near the top of the first post of this thread and near the top of the script itself. There are example scripts in there. Please read that information first. If you still don't understand then you need to learn about AviSynth.

I would advise against source-match/lossless on 1080i material. It will make a difference, but a very small difference at that resolution. In any case, on your system the encoding speed will be very slow with those settings. You need a top end system and a lot of MT encoding experience to do that. I suggest you start with Preset="Fast", EdiThreads=1 and work up from there. You can do a test encode by adding a trim on the end of your script (e.g. "trim(0,999)" for 1000 frames).

I would recommend MeGUI instead of VirtualDub, it seems to cope better with the most demanding scripts. If you have the disk space, then a good approach is to check the "Add pre-rendering job" button, which will do the QTGMC to a lossless avi first, then x264/mkv the result in a second pass. You will need at least 200Gb for an hour of 1080p footage though. If you have to do the QTGMC and encoding in one pass then you may need to reduce the number of threads.

QTGMC will give you a 59.94fps output by default. If you add "SelectEven()" at the end of your script you will get 29.97fps. There are methods to convert to 24p but (a) I never do that so I'm not going to advise and (b) you need to have a good reason to do it because the results might not be so good.
____

dragon_warrior: Sounds like the usual avisynth-doesn't-like-mt crash to me. Try adding a SetMemoryMax (see the multithreading section in the first post). Try different versions of MT avisynth (linked on the AviSynth wiki). Make sure your plugins are up to date. Reduce the number of threads or preset. Set EdiThreads to 1. Try a different machine.

Last edited by -Vit-; 18th February 2011 at 16:11.
-Vit- is offline  
Old 18th February 2011, 16:17   #334  |  Link
dragon_warrior
Registered User
 
Join Date: May 2010
Posts: 123
Quote:
Originally Posted by fusebyte View Post
Yes,pardon I mean Avisynt/plugin folder.


Do U mean like this?


Can I also set the .MKV output file?

I read the instructions carefully but I think I need an AVS script sample to better understand conversion from 1080i 29,970 fps to 1080p fps 23,976
and allow the same resolution and video bitrate.
TS file is "true interlaced" not Telecined.

Tk's
Personally I wouldn't prefer DirectShowSource, unless it is a last resort. If you have to use this, try adding 'audio=false' to prevent unnecessary audio loading. Also, AssumeFPS() should be called to avoid an outta-sync output, in your case, that would be AssumeFPS(29.97)
Anyway, my choice for TS is ffms. I'm also encoding 1080i materials to 720p. Unfortunately, TS container is not really friendly with ffms so you need to remux your TS to MKV before putting it into your script. Last but not least, don't forget to state the fps, which is "fpsnum=30000, fpsden=1001" (30000/1001 ~ 29.97)
Hope this help
dragon_warrior is offline  
Old 19th February 2011, 00:48   #335  |  Link
fusebyte
Registered User
 
Join Date: Jan 2011
Posts: 16
Tk's Vit.

Quote:
so you need to remux your TS to MKV before putting it into your script
I do it with DSMUX ( input = TS , output = MKV ) but the MKV remains interlaced like normal as is, it's only a container transcoded.
It's not a real problem except for some things.
One of these, for example, can't add SRT Forced track.
I know I can use PGS or m2ts+srt m2ts's same name but i like x264,Mkv and SRT . I find them are more flexibles for my project.
Quote:
Unfortunately, TS container is not really friendly
...right! sorry if I repeat myself,but I would wish to find better deinterlacer from 1080i 29,970 fps to 1080p fps 23,976 and allow the same resolution and video bitrate.
About FFMS U mean like this?
Quote:
ffmpegsource("film.mkv",vtrack=-1,atrack=-1)
Thanks so much.

Last edited by fusebyte; 19th February 2011 at 04:09.
fusebyte is offline  
Old 19th February 2011, 06:52   #336  |  Link
dragon_warrior
Registered User
 
Join Date: May 2010
Posts: 123
Quote:
I do it with DSMUX ( input = TS , output = MKV ) but the MKV remains interlaced like normal as is, it's only a container transcoded.
It's not a real problem except for some things.
One of these, for example, can't add SRT Forced track.
I know I can use PGS or m2ts+srt m2ts's same name but i like x264,Mkv and SRT . I find them are more flexibles for my project.
Is SRT the subtitles? Your remuxed MKV should include only the video stream with no audio and no subtitles. After it's processed, you can mux it again.

Quote:
ffmpegsource("film.mkv",vtrack=-1,atrack=-1)
Yep, that's it

Quote:
...right! sorry if I repeat myself,but I would wish to find better deinterlacer from 1080i 29,970 fps to 1080p fps 23,976 and allow the same resolution and video bitrate.
As -Vit- already stated, if your source is pure interlaced, QTGMC will do a good job, which result in a 59.94 FPS (or 29.97 FPS) output. Don't force it to be 23.976
Otherwise, if your source is telecined, then IVTC is the right option. It's to remove 1 frame every 5 frames. Let's do a little calculation, 29.97 - 29.97*1/5 = 23.976, and that's the FPS you get after IVTC'd.

Do analyse your source properly before deciding what to use


-------------
@-Vit-: It seems ffms 2.15 mt is the cause, I try switching back to the former version and surprisongly it works for me. Thanks

Last edited by dragon_warrior; 19th February 2011 at 07:02.
dragon_warrior is offline  
Old 19th February 2011, 12:37   #337  |  Link
fusebyte
Registered User
 
Join Date: Jan 2011
Posts: 16
Quote:
Is SRT the subtitles? Your remuxed MKV should include only the video stream with no audio and no subtitles. After it's processed, you can mux it again.
It's no possible.If I remux DsMux's output mkv file with i.e. MkvMerge to add Srt sub or another audio track, video is playing slowed down, and 'cause of this reason, audio goes desyncrinized.
Why video remuxed with MkvMerge or another GUI plays so bad? It's very very slowed.I can't touch video track anyway after DSMUX coonversion, if I do it,video
will always have playback problem.
If I could work on the file after being processed by DSMUX not have more problems.

Do U know a solution?

Quote:
Do analyse your source properly before deciding what to use
I use Mediainfo.
Can read if prog. or Interl.,say me if YUV 4.2.0 or other, as U know.
But I ask U about interlaced file best way to analize right frame sequence, if 3:2 or i.e. ibrid 2i-4p-3i-4p or other sequence and how set output parameters.
(i.e =
if 3:2 telecined remove pulldown using telecide,
if "true interlaced" only change container,
if some sequence ibrid like example ??? )

thanks in advance.

Last edited by fusebyte; 19th February 2011 at 14:51.
fusebyte is offline  
Old 19th February 2011, 12:56   #338  |  Link
aegisofrime
Registered User
 
Join Date: Apr 2009
Posts: 453
Quote:
Originally Posted by fusebyte View Post
It's no possible.If I remux DsMux's output mkv file with i.e. MkvMerge to add Srt sub or another audio track, video is playing slowed down, and 'cause of this reason, audio gone desyncrinized.
Why video remuxed with MkvMerge or another GUI plays so bad? It's very very slowed.I can't touch video track anyway after DSMUX coonversion, if I do it,video
will always have playback problem.
If I could work on the file after being processed by DSMUX not have more problems.

Do U know a solution?



I use Mediainfo.
Can read if prog. ot Interl.,say me if YUV 4.2.0 or other, as U know.
But I ask U about interlaced file best way to analize right frame sequence, if 3:2 or i.e. ibrid 2i-4p-3i-4p or other sequence and how set output parameters.
(i.e =
if 3:2 telecined remove pulldown using telecide,
if "true interlaced" only change container,
if some sequence ibrid like example ??? )

thanks in advance.
Mediainfo isn't accurate. Not is DGIndex. I have came across DVD VOBs that were marked as interlaced in both Mediainfo and DGIndex, yet upon QTGMC deinterlacing and visual inspection it's clear that it was actually progressive.
aegisofrime is offline  
Old 19th February 2011, 13:43   #339  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,390
MediaInfo is accurate. As is DGIndex. Such Tools report how the stream was encoded, not what the actual content is like. It is quite common that progressive content is encoded in interlaced mode.
__________________
- 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!)
Didée is offline  
Old 19th February 2011, 15:26   #340  |  Link
aegisofrime
Registered User
 
Join Date: Apr 2009
Posts: 453
Quote:
Originally Posted by Didée View Post
MediaInfo is accurate. As is DGIndex. Such Tools report how the stream was encoded, not what the actual content is like. It is quite common that progressive content is encoded in interlaced mode.
Yes, that's what I meant. Thanks for the clarification
aegisofrime 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 06:39.


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