View Full Version : QTGMC Deinterlacing Script (v3.32)
-Vit-
15th February 2011, 16:49
Of course, you're supposed to use mt_masktools-25.dll for 2.58MT. But I've heard this story before, the other way round - needed to use mt_xx-25.dll when using 2.6MT. There's only one rule to get best MT avisynth stability - try every version of everything.
I assume you've tweaked the thread counts. I often find > 8 is best for SetMTMode at "Slow" (I use as high as 14 in some cases), and recently I've noticed better results with EdiThreads lower (4 or less). However, these values will likely vary widely with different systems.
The output resolution is a little unusual (5:3), but I can't tell you what is correct though - depends on the source and how you intend to encode it / what you are using it for.
@MeGui
15th February 2011, 17:42
The output resolution is a little unusual (5:3), but I can't tell you what is correct though - depends on the source and how you intend to encode it / what you are using it for.
Then what res. should i use to get nice 16:9 as final PAL video?
This is my input:
Video
ID : 0
Format : DV
Format_Commercial_IfAny : DVCPRO
Codec ID : dvsd
Codec ID/Hint : Sony
Duration : 46s 320ms
Bit rate mode : Constant
Bit rate : 24.4 Mbps
Width : 720 pixels
Height : 576 pixels
Display aspect ratio : 4:3
Frame rate mode : Constant
Frame rate : 25.000 fps
Standard : PAL
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Interlaced
Compression mode : Lossy
Bits/(Pixel*Frame) : 2.357
Stream size : 159 MiB (95%)
Encoding settings : wb mode= / white balance= / fcm=auto focus
Should i add SelectEven()?
p.s. i'll keep current treads..works nice so far :)))
Tnx again mate :)
pokazene_maslo
15th February 2011, 17:50
Do you have any ETA when will be chroma planes denoising supported?
sadie
15th February 2011, 19:04
I've uploaded that miserable little 3 second clip.
http://rapidshare.com/files/448099289/Arg.avi
Yesterday I got the error with a sourcematch 25p test, so there goes that theory down the drain. I will try your new update tonight along with newly installed setMT. SetMTmode (5,4)>DirectShowSource>SetMtmode (2,4) sound OK for my core duo? Or perhaps down a notch. Since x264 has its own multi-thread settings I've wondered if there might be some interference going on there? Or should I even just go back to standard two-pass mode and forget about CRF. Lossless will have to wait for the next project and new hard disk.
I also want to reiterate that when my bug rears its head, it can just as easily disappear in the next sequence if there's adequate movement going on. I believe that Didee even mentioned straight out somewhere on this thread that TGMC wasn't ever made for static scenes? Or is that to be nuanced?
-Vit-
15th February 2011, 19:09
@@Megui: I'm sure there are many threads here about resizing. I work with NTSC material, SD at 720x480. I don't resize, instead encode as anamorphic 16:9 and let the player do the resizing. This keeps the original detail and doesn't bloat the final encode size, but relies on the player's resizers. I imagine a similar process would would work for you, but you'll have to find out for yourself. If you really want to explicitly resize, then 1024x576 would lose no vertical detail, but the encode will be somewhat larger.
Use SelectEven if you want a 25fps result. It's close to film rate and some people prefer that look. It can make for a smaller and quicker encode than 50fps. However, a 25fps result can look juddery depending on the source. You could use the new motion blur feature to help with that (in which case you don't use SelectEven, you set FPSDivisor=2 in QTGMC, along with the motion blur settings). Motion blur will slow the encode, but might reduce filesize a little.
____
@pokazene_maslo: Chroma/pixel format features are next on my list (as long as I don't go off on a whim as I just did with the motion blur). But currently I'm looking at Avisynth itself, in particular the caching, which is starting to become a serious stability problem with more complex settings. I'm also busy with several other projects. So I don't currently have an ETA, although I am quite active with QTGMC at the moment...
-Vit-
15th February 2011, 19:15
@sadie: DirectShowSource: Can be problematic, could explain any number of ills. I've seen strange ghosting with it sometimes. Try FFVideoSource?
EDIT: This might be a source filter issue. Comparing DirectShowSource to FFVideoSource on this vid, no other processing. FFVideoSource shows some horizontal lines - under the fountain and red mark in the first 4 or 5 frames, DirectShow has some flickering in that bright area but nothing so problematic. However, that was all. [DSS2 matches DirectShowSource, but it got the parity wrong and I had to use ConvertToYV12 - is there a DSS2 setting to set a preferred pixel format?]
Encoded both directly to MKV and via lossless, no other visual issues apart from that odd difference despite running several versions testing source accuracy. As expected, the most accurate to the source was:
QuickTGMC( Preset="Slower", SourceMatch=3, Lossless=2, Sharpness=0.1 )
EDIT2: Here's the result from the above line (http://www.mediafire.com/download.php?yy9fjty5i2esrrb) (x264 in MKV).
[I've reupped a cleaner version done with new v3.11]. I went for source accuracy. Everything was done with 10 main threads and 4 EdiThreads.
wOxxOm
16th February 2011, 00:23
I wonder how do I set qtgmc parameters to avoid ugly artefacts in static fades from/to black like these: qtgmc (http://i15.fastpic.ru/big/2011/0216/73/ac3acbc6e2556ac04b5ef88829475973.png) vs daa (http://i15.fastpic.ru/big/2011/0216/92/7b3014c14bff35fc69499f8650b86692.png) - changing Preset or SourceMatch=1/2/3 do not help...
Didée
16th February 2011, 00:53
Post your script. It's not clear what exactly you are doing there. In particular, since it seems you're actually doing IVTC ....
Fades generally are problematic. As far as MVTools are concerned, try different DCT modes - they can help to get better matches. (For some fun, try blocksize 16 together with DCT 1. No, nothing is broken ... it *IS* *THAT* slow. Really.)
But even then, it's still a fade ...
wOxxOm
16th February 2011, 01:07
IVTC(TFM) is a nonfactor here, it was used for debugging purposes, the script is plain simple:
DGDecode_mpeg2source("dvd1.d2v",info=3)
QTGMC( preset="very slow", SourceMatch=3 ).selectEven()
I've tried blocksize=16 & dct=1 (it was sloooooow) - slightly better (picture was kinda posterized/banded but without previously seen ghosting/blending artefacts), anyway it is far from being as clean as daa(), then avisynth hanged when I added sourcematch=3. Seems like I have to find manually every little fade throughout the whole movie.
Didée
16th February 2011, 01:35
Darn fades. Well ... if it was about TGMC, you could set low SAD thresholds like thSAD1=64,thSAD2=32, which probably would solve the problem. In QTGMC, those aren't exposed anymore.
May I ask what you're trying to achive, at all? For most Anime-content scenarios, Q/TGMC isn't the most-suited-filter-of-all, anyway.
DVDBob
16th February 2011, 03:00
Which interlace method, can this filter deinterlace??
-Vit-
16th February 2011, 06:06
Oops... I introduced a nasty bug in v3.05. The final couple of core algorithm stages were being skipped over including the final smooth, which left the output noisy. Fixed in the OP (http://forum.doom9.org/showthread.php?p=1423459#post1423459)(v3.11). If you have version 3.05 or 3.10, you really need to update to v3.11 as it was a serious bug. Sorry for the inconvenience.
Dunno if that was partly causing wOxxOm's problem (although Didée's points still hold regardless). Don't think it caused sadie's smears, the bug caused noise.
____
Given the above posts, I have allowed control over thSAD1, thSAD2, thSCD1 and thSCD2 (which are the same as TempGaussMC_beta2):
- ThSAD1/2 control how willing the temporal smooths are to blend with the neighbor frames. Increasing these values will increase smoothness, but can also can cause blurring or smearing. Conversely, reducing these values can reduce ghosting, or the blurring of high-speed temporal changes, but may leave shimmer or noise. In any case, they should be used rarely, and ThSAD2 is safer to use than ThSAD1.
- ThSCD1/2 control scene change detection. Again only change them if you must (read the MVTools documentation for details).
QTGMC( Preset="Slower", TR2=2, ThSAD2=400 ) # Smoother but might smear...
Defaults are: ThSAD1=640, ThSAD2=256, ThSCD1=180, ThSCD2=98
____
DVDBob: I'm not sure I understand, what other interlacing methods are there?
SubJunk
16th February 2011, 08:22
Hi -Vit-, thanks so much for this script! It is really great.
Also thanks for keeping it updated.
I have what is hopefully a quick question :)
I have an interlaced video at 706x480 which I want to resize to 706x528.
I've noticed that doing the resize before calling QTGMC produces better results than afterwards (it is a cartoon, so some of the lines connect up better this way) but then there are fat horizontal lines every 5 frames which aren't there if I resize after QTGMC (I attached a screenshot to show it)
I did of course expect that something wrong would happen if I resized it beforehand but I was curious if the interpolation would like the extra resolution - which it did.
So my question is: Is there somewhere I can put the resize line in your script so it will work properly?
The script I used for that screenshot is (with irrelevant things removed for clarity):
PointResize(706,528)
QTGMC()
kypec
16th February 2011, 10:06
I have an interlaced video at 706x480 which I want to resize to 706x528.
PointResize(706,528)
QTGMC()
Changing vertical resolution before the frame(s) were deinterlaced is plainly wrong. No deinterlacer can reliably re-construct the frame that had its fields resized vertically. Period.
wOxxOm
16th February 2011, 10:30
For most Anime-content scenarios, Q/TGMC isn't the most-suited-filter-of-all, anyway.I always use it as clip2 for tfm with pp=4, and sometimes for scrolling credits without tfm.
SubJunk
16th February 2011, 10:49
Changing vertical resolution before the frame(s) were deinterlaced is plainly wrong. No deinterlacer can reliably re-construct the frame that had its fields resized vertically. Period.Maybe you should read the whole post before replying :)
I did of course expect that something wrong would happen if I resized it beforehand [...] Is there somewhere I can put the resize line in your script so it will work properly?
Gavino
16th February 2011, 11:16
Any vertical resizing must be done after deinterlacing.
Why are you using PointResize? That is almost bound to introduce artifacts.
SubJunk
16th February 2011, 11:30
I was using Spline36Resize but I changed it in the post to the most simple one in order to avoid comments about which resizing filter is better
I obviously worded my first post in a confusing way, I'll try again. Hopefully this is clearer:
Hi -Vit-, thanks so much for this script! It is really great.
Also thanks for keeping it updated.
I have what is hopefully a quick question :)
I have an interlaced video at 706x480 which I want to resize to 706x528.
I've noticed that doing the resize before calling QTGMC produces better results than afterwards (it is a cartoon, so some of the lines connect up better this way) but then there are fat horizontal lines every 5 frames which aren't there if I resize after QTGMC (screenshot here (http://forum.doom9.org/attachment.php?attachmentid=12032&d=1297841165))
I did of course expect that something wrong would happen if I resized it before the deinterlacing but I was curious if the interpolation would like the extra resolution - which it did.
So my question is:
Is there somewhere I can add a resize line to your script - after deinterlacing but before the interpolation and postproc - so it will work properly?
The script I used for that screenshot is (with irrelevant things removed for clarity):
Spline36Resize(706,528)
QTGMC()
Gavino
16th February 2011, 12:26
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.
DVDBob
16th February 2011, 12:57
Oops... I introduced a nasty bug in v3.05. The final couple of core algorithm stages were being skipped over including the final smooth, which left the output noisy. Fixed in the OP (http://forum.doom9.org/showthread.php?p=1423459#post1423459)(v3.11). If you have version 3.05 or 3.10, you really need to update to v3.11 as it was a serious bug. Sorry for the inconvenience.
Dunno if that was partly causing wOxxOm's problem (although Didée's points still hold regardless). Don't think it caused sadie's smears, the bug caused noise.
____
Given the above posts, I have allowed control over thSAD1, thSAD2, thSCD1 and thSCD2 (which are the same as TempGaussMC_beta2):
- ThSAD1/2 control how willing the temporal smooths are to blend with the neighbor frames. Increasing these values will increase smoothness, but can also can cause blurring or smearing. Conversely, reducing these values can reduce ghosting, or the blurring of high-speed temporal changes, but may leave shimmer or noise. In any case, they should be used rarely, and ThSAD2 is safer to use than ThSAD1.
- ThSCD1/2 control scene change detection. Again only change them if you must (read the MVTools documentation for details).
QTGMC( Preset="Slower", TR2=2, ThSAD2=400 ) # Smoother but might smear...
Defaults are: ThSAD1=640, ThSAD2=256, ThSCD1=180, ThSCD2=98
____
DVDBob: I'm not sure I understand, what other interlacing methods are there?
What I mean is that there are some movies that are just interlaced, other films are partially interlaced, hybrid interlaced etc.
Didée
16th February 2011, 13:07
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.
http://img684.imageshack.us/img684/1797/tgmcsearchclip2inputtyp.th.png (http://img684.imageshack.us/i/tgmcsearchclip2inputtyp.png/)
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.)
sadie
16th February 2011, 16:49
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/448263181/A_Nervous_fingers.avi
http://rapidshare.com/files/448263182/B_Nervous_plastic.avi
http://rapidshare.com/files/448263180/C_Missing_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.
-Vit-
16th February 2011, 18:12
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.
sadie
16th February 2011, 19:08
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.
SubJunk
17th February 2011, 02:23
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 :)
osgZach
17th February 2011, 21:50
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.
fusebyte
18th February 2011, 04:50
HY,only a little question.
Can I use QTGMC to de-interlace a MPEG-TS HDTV 1080i file to 1080p MKV file?
Thanks
-Vit-
18th February 2011, 05:31
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
dragon_warrior
18th February 2011, 07:04
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.
fusebyte
18th February 2011, 11:05
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...
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.
TheSkiller
18th February 2011, 12:21
and more important, How can i start my AVS script?
Which GUI can i use?
Try VirtualDub (http://www.virtualdub.org/).
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.
fusebyte
18th February 2011, 12:42
Yes,pardon I mean Avisynt/plugin folder.
Do U mean like this?
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
-Vit-
18th February 2011, 16:03
There is info on basic usage and multi-threaded usage near the top of the first post of this thread (http://forum.doom9.org/showthread.php?p=1423459#post1423459) 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 (http://avisynth.org/mediawiki/Main_Page).
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 (http://sourceforge.net/projects/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.
dragon_warrior
18th February 2011, 16:17
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
fusebyte
19th February 2011, 00:48
Tk's Vit.
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.
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?
ffmpegsource("film.mkv",vtrack=-1,atrack=-1)
Thanks so much.
dragon_warrior
19th February 2011, 06:52
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.
ffmpegsource("film.mkv",vtrack=-1,atrack=-1)
Yep, that's it
...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
fusebyte
19th February 2011, 12:37
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?
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.
aegisofrime
19th February 2011, 12:56
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.
Didée
19th February 2011, 13:43
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.
aegisofrime
19th February 2011, 15:26
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 :)
fusebyte
19th February 2011, 16:13
To better understand,forgive my less experience,
this is Mediainfo analyzed content of my MPEG-TS 1080i.TS but don't see info about Frame sequence.
Generale
ID : 1 (0x1)
Complete name : D:\Documents and Settings\Administrator\Desktop\Working\MyHDTV_1080i.ts
Format : MPEG-TS
File size : 16,0 GiB
Duration : 2h 3min
Overall bit rate : 18,6 Mbps
Maximum Overall bit rate : 35,5 Mbps
Video
ID : 4113 (0x1011)
Menu ID : 1 (0x1)
Format : MPEG Video
Format version : Version 2
Format profile : Main@High
Format settings, BVOP : Si
Format settings, Matrix : Predefinited
Format settings, GOP : M=3, N=15
Codec ID : 2
Duration : 2h 3min
Bit rate mode : Variable
Bit rate : 17,1 Mbps
Nominal bit rate : 80,0 Mbps
Width : 1 920 pixel
Height : 1 080 pixel
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
Bits/(Pixel*Frame) : 0.275
Stream size : 14,8 GiB (92%)
firebo14
19th February 2011, 23:29
http://bigpichost.com/files/error_6ufxjhh2.png
http://bigpichost.com/files/error__0y35luzl.png
I cant seek the video (vid doesnt show) nor save the video. Am i missing plugins or wrong script?
Someone help please... i really want to deinterlace the vid with double fps.
Here is my .avs script:
FFVideoSource("C:\Documents and Settings\Extra\Desktop\New Folder\Gantz.2011.1080i.DD.5.1\Gantz.2011.1080i.DD.5.1.ts")
QTGMC( Preset="Slower" )
My video interlace type is:
Scan type : MBAFF
Is it possible to do triple fps or more? If yes, please tell me... I love the smoothness of high fps.
Thank you for the deinterlacing script.. i really want to use it... :]
http://tehparadox.com/forum/customavatars/avatar1997040_1.gif
Didée
20th February 2011, 00:12
1) "You shall not have multiple versions of the same plugin in the autoload folder."
- Keep RemoveGrainSSE2.dll. Delete all other RemoveGrain(XXX).dll files.
- same for Repair.dll
- same for Rsharpen.dll
- similar for mt_masktools-26.dll
2) Remux *.ts to *.mkv. FFmpegSource can have problems with *.ts container. (not necessarily, but it can happen)
3) Browse through the last few pages. -Vit- has given lots of useful pointers about stability. :)
firebo14
20th February 2011, 00:18
Thanks for the quick reply... i will try what you said.. now...
:]
Edit 1:
Thanks alot!.. it seems to be working, but i have to wait until i see if it works...
http://bigpichost.com/files/test_tj59_ogl7t580.png
Wow, 0.07 fps. This is going to take a while.. T-T
Mini-Me
20th February 2011, 11:52
Thanks for the quick reply... i will try what you said.. now...
:]
Edit 1:
Thanks alot!.. it seems to be working, but i have to wait until i see if it works...
http://bigpichost.com/files/test_tj59_ogl7t580.png
Wow, 0.07 fps. This is going to take a while.. T-T
OMFG. Is that 0.07 FPS of input or 0.07 FPS of output? If we're talking 0.07 FPS of 60 FPS output (which is probably the case), that would take 23 years for all 235 hours of my footage. I mean, not that 11.5 years is much better, but...wow. I'd better get started NOW. :eek:
Boulder
20th February 2011, 13:55
The higher the resolution, the more likely you could get away with using "lower quality" presets which are much faster. This issue has also been discussed in this thread a few times.
Mini-Me
20th February 2011, 13:59
The higher the resolution, the more likely you could get away with using "lower quality" presets which are much faster. This issue has also been discussed in this thread a few times.
Qualität über alles! What's a couple decades, anyway? I can wait.
Seriously though, I hope that firebro14 is testing this on an Atom netbook or something. He may be deinterlacing 1080i, but that 0.07 FPS isn't even using the very slow or placebo presets. :eek: firebro, would you mind posting your specs?
Also, does anyone know the time complexity of the filter with respect to resolution? Is it linear in terms of source or output pixels or lines, or is it higher order? (This might have been mentioned in the discussion you refer to, but just in case anyone knows off the top of their head...)
-Vit-
20th February 2011, 16:11
Most operations are per-pixel, but there is the motion search and NNEDI3, the complexity of which depends on your settings. It's a bit tricky to give a practical complexity scaling because it depends on hardware, choice of settings, number of threads (even if you single-thread QTGMC, NNEDI3 uses threads) and whether you're simultaneously trying to x264 the result or encoding to lossless. CPU underutilization can cause low encoding fps on faster machines for HD, which would make fps comparisons with SD unrepresentative. Many people's fps will scale worse than ideal because they haven't tweaked for all these factors.
However, on preset="Slower", with properly tweaked multi-threaded scripts using 100% CPU, I get ~42fps SD and ~6fps HD (i7 930@3.7Ghz). So the scaling there seems to be linear per-pixel, about 1.2x. Edit: That was in MeGUI, encoding to lossless (via mencoder, they've recently changed to ffmpeg, which is slower). So you would need to add an x264 (or whatever) encoding pass, but the speed of that would be pretty much independent of QTGMC.
Mini-Me
20th February 2011, 17:39
Most operations are per-pixel, but there is the motion search and NNEDI3, the complexity of which depends on your settings. It's a bit tricky to give a practical complexity scaling because it depends on hardware, choice of settings, number of threads (even if you single-thread QTGMC, NNEDI3 uses threads) and whether you're simultaneously trying to x264 the result or encoding to lossless. CPU underutilization can cause low encoding fps on faster machines for HD, which would make fps comparisons with SD unrepresentative. Many people's fps will scale worse than ideal because they haven't tweaked for all these factors.
However, on preset="Slower", with properly tweaked multi-threaded scripts using 100% CPU, I get ~42fps SD and ~6fps HD (i7 930@3.7Ghz). So the scaling there seems to be linear per-pixel, about 1.2x. Edit: That was in MeGUI, encoding to lossless (via mencoder, they've recently changed to ffmpeg, which is slower). So you would need to add an x264 (or whatever) encoding pass, but the speed of that would be pretty much independent of QTGMC.
Wow, that's a night and day difference compared to firebro14's setup with the same preset. It's almost 100x faster, so I imagine he must have been directly encoding the result with e.g. x264, using a weak computer with single-threading and a very unoptimized...something. I was kind of shocked when I saw his FPS, and I thought maybe the recent versions with source match (which I don't have yet) might have taken heavy hits at slower presets or something.
Anyway, thanks for your perspective on the scaling. :)
Didée
20th February 2011, 17:58
Try any "slow" preset with "blocksize=16,search=5,searchparam=8,DCT=1".
0.0xx fps are almost guaranteed, even with SD content. ;)
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.