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 |
6th November 2016, 02:04 | #941 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
See previous edit feisty.
EDIT: I'de say definite bug, not just the chroma that is screwed up, and temporal chaos.
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 6th November 2016 at 02:08. |
6th November 2016, 02:30 | #942 | Link | |
I'm Siri
Join Date: Oct 2012
Location: void
Posts: 2,633
|
Quote:
give it a go Code:
import vapoursynth as vs core = vs.get_core() clp = blah blah blah super = core.mv.Super(clp,pel=4,hpad=16,vpad=16,rfilter=4) bw_1 = core.mv.Analyse(super,isb=True,blksize = 16,overlap=8,search=3,badrange =-24) fw_1 = core.mv.Analyse(super,isb=False,blksize = 16,overlap=8,search=3,badrange =-24) clp = core.mv.BlockFPS(clp, super, bw_1, fw_1, num=0, den=0, mode=0, blend=False) clp.set_output() |
|
6th November 2016, 02:47 | #943 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
I'de love to 'give it a go', unfortunately I is on XP32, and nobody cares bout us lil ol' XP users
With 4 window stack display, Garbage function, Good function, Subract(Garbage,Good), Subract(Garbage,Good), If I play (in VDUB) say some part of early clip, and then jump to near the end of clip, and play, then will sporadically show frames from the early part of clip that was recently played. Sometimes it shows what looks to be frames from a diagnostic Subtract that is showing in one of the windows. Looks like its totally Mucked up (substitute an alternate first letter of your choice). EDIT MvTools2 that I'm using is v2.5.11.20. EDIT: The problem seems to occur if OverLap used in creating final BackWards and Forwards vectors supplied to MBlockFps, ie MAnalyse(Overlap=whatever) if MRecalculate not used, and in final MRecalculate(Overlap=whatever) if used. This works ok without Overlap in final vectors Code:
Function foo2(clip source, int "multi") { last = source multi = default(multi, 2) prefilt = DeGrainMedian() # some smoothing superfilt = MSuper(prefilt, hpad=16, vpad=16) # all levels for MAnalyse super = MSuper(source, pel = 2, hpad = 16, vpad = 16, rfilter = 4) # one level is enough for MRecalculate bw_1 = MAnalyse(superfilt, chroma = false, isb = true, blksize = 16, OverLap=8, searchparam = 3, plevel = 0, search = 3, badrange = (-24)) fw_1 = MAnalyse(superfilt, chroma = false, isb = false, blksize = 16, OverLap=8, searchparam = 3, plevel = 0, search = 3, badrange = (-24)) bw_2 = MRecalculate(super, chroma = false, bw_1, blksize = 8, OverLap=4, searchparam = 1, search = 3) fw_2 = MRecalculate(super, chroma = false, fw_1, blksize = 8, OverLap=4,searchparam = 1, search = 3) bw_3 = MRecalculate(super, chroma = false, bw_2, blksize = 4, searchparam = 0, search = 3) # No Overlap fw_3 = MRecalculate(super, chroma = false, fw_2, blksize = 4, searchparam = 0, search = 3) # No Overlap MBlockFps(source, super, bw_3, fw_3, FramerateNumerator(Source) * multi, FramerateDenominator(Source), mode = 0, Blend=False) return last } Code:
Function DoubleRate(clip c,Bool "Blend") { c Blend=Default(Blend,False) # Avoid blends at scene change (copy previous frame) prefilt = DeGrainMedian() # some smoothing superfilt = MSuper(prefilt, hpad=16, vpad=16, rfilter = 4) # all levels for MAnalyse super = MSuper(pel=2, hpad=16, vpad=16,rfilter=4,levels=1) # one level is enough for MRecalculate bw_1 = MAnalyse(superfilt, chroma = false, isb = true, blksize = 16, OverLap=2, searchparam = 3, plevel = 0, search = 3, badrange = (-24)) fw_1 = MAnalyse(superfilt, chroma = false, isb = false, blksize = 16, OverLap=2, searchparam = 3, plevel = 0, search = 3, badrange = (-24)) bw_2 = MRecalculate(super, chroma = false, bw_1, blksize = 8, searchparam = 1, search = 3) # No Overlap (currently broken for final vectors) fw_2 = MRecalculate(super, chroma = false, fw_1, blksize = 8, searchparam = 1, search = 3) # No Overlap MBlockFps(super, bw_2, fw_2, num=FramerateNumerator(c) * 2, den=FramerateDenominator(c), mode=0, Blend=Blend) Return Last }
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 6th November 2016 at 16:56. |
6th November 2016, 02:50 | #944 | Link |
I'm Siri
Join Date: Oct 2012
Location: void
Posts: 2,633
|
and BlockFPS is definitely more or less better than FlowFPS in general
FlowFPS Code:
import vapoursynth as vs core = vs.get_core() clp = xxx clp = core.fmtc.bitdepth(clp,bits=32,fulls=False,fulld=True) super = core.mvsf.Super(clp,pel=4,hpad=16,vpad=16,rfilter=4) bw_1 = core.mvsf.Analyze(super,isb=True,blksize = 16,overlap=8,search=3,badrange =-24) fw_1 = core.mvsf.Analyze(super,isb=False,blksize = 16,overlap=8,search=3,badrange =-24) clp = core.mvsf.FlowFPS(clp, super, bw_1, fw_1, num=0, den=0, blend=False) clp.set_output() BlockFPS Code:
import vapoursynth as vs core = vs.get_core() clp = xxx clp = core.fmtc.bitdepth(clp,bits=32,fulls=False,fulld=True) super = core.mvsf.Super(clp,pel=4,hpad=16,vpad=16,rfilter=4) bw_1 = core.mvsf.Analyze(super,isb=True,blksize = 16,overlap=8,search=3,badrange =-24) fw_1 = core.mvsf.Analyze(super,isb=False,blksize = 16,overlap=8,search=3,badrange =-24) clp = core.mvsf.BlockFPS(clp, super, bw_1, fw_1, num=0, den=0, blend=False) clp.set_output() |
6th November 2016, 03:07 | #945 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Perhaps all posts relating to MvTools2 should be separated into a new thread, Its really about time MvTools2 had a thread in the Avisynth Usage forum,
and Interframe dont need lots of posts about it's competitor. I suggest from post #915 (to put Groucho2004 in command) and maybe insert the two posts 913 and 914 after the first post, if possible. All those in favour, say "Aye!".
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? |
6th November 2016, 15:10 | #946 | Link | |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
Quote:
__________________
Groucho's Avisynth Stuff |
|
6th November 2016, 19:11 | #948 | Link | |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
From MVTools2 doc:
Quote:
__________________
Groucho's Avisynth Stuff |
|
8th November 2016, 09:55 | #950 | Link | |
Registered User
Join Date: Jan 2014
Posts: 2,314
|
Quote:
|
|
8th November 2016, 16:17 | #951 | Link | |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Quote:
I'm doing a little bit of work on DoubleRate deinterlace/Interpolation and need the overlap thing. It caught me a bit by surprise that when dealing with hybrid source (with possibility of single interlaced frame in progressive sequence), that single non-combed status of progressive frame is not enough to deal with it properly, a third combed status is required. 0)=Interlaced, 1)=Progressive current+progressive next, 2)=Progressive current & Interlaced Next. If not taken into account, then Interpolated frames will use Progressive current + Interlaced next as sources. Perhaps this was obvious to you lot, but was not to me. To fix it, I'm using Progressive current + deinterlaced first field of next for interpolation. I guess that QTGMC already copes with this.
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? |
|
17th February 2021, 07:17 | #953 | Link |
Registered User
Join Date: Jul 2016
Location: Mansfield, Ohio (formerly San Jose, California)
Posts: 280
|
Unexpected results
Hi Y'all,
I've successfully transcoded 24/1.001fps samples to 60/1.001fps (and also to 120/1.001fps) via the Windows cmd scripts below. But when I use the same script to transcode SubJunk's 24/1.001fps sample (http://www.spirton.com/uploads/Inter...e-Original.mkv), the transcode comes out unexpectedly and I wonder why. This transcodes to 60/1.001fps as expected: Code:
ECHO from vapoursynth import core>Mark's.vpy ECHO video = core.ffms2.Source(source='20130218-Sample-Original.mkv')>>Mark's.vpy ECHO import havsfunc as havsfunc>>Mark's.vpy ECHO video = havsfunc.InterFrame(video, Preset="medium", Tuning="smooth", InputType="2D", NewNum=60000, NewDen=1001, GPU=True)>>Mark's.vpy ECHO video = core.std.AssumeFPS(video, fpsnum=60000, fpsden=1001)>>Mark's.vpy ECHO video.set_output()>>Mark's.vpy vspipe --y4m Mark's.vpy - | ffmpeg -thread_queue_size 2048 -i pipe: -i 20130218-Sample-Original.mkv -map 0:v -map 1:a -codec:v libx265 -x265-params "crf=16:qcomp=0.6" -codec:a copy -codec:s copy 20130218-Sample-InterFrame-60fps.mkv Code:
ECHO from vapoursynth import core>Mark's.vpy ECHO video = core.ffms2.Source(source='20130218-Sample-Original.mkv')>>Mark's.vpy ECHO import havsfunc as havsfunc>>Mark's.vpy ECHO video = havsfunc.InterFrame(video, Preset="medium", Tuning="smooth", InputType="2D", NewNum=120000, NewDen=1001, GPU=True)>>Mark's.vpy ECHO video = core.std.AssumeFPS(video, fpsnum=120000, fpsden=1001)>>Mark's.vpy ECHO video.set_output()>>Mark's.vpy vspipe --y4m Mark's.vpy - | ffmpeg -thread_queue_size 2048 -i pipe: -filter_complex "tinterlace=mode=drop_odd" -i 20130218-Sample-Original.mkv -map 0:v -map 1:a -codec:v libx265 -x265-params "crf=16:qcomp=0.6" -codec:a copy -codec:s copy 20130218-Sample-InterFrame-120fps-to-60fps.mkv Code:
ECHO from vapoursynth import core>Mark's.vpy ECHO video = core.ffms2.Source(source='20130218-Sample-Original.mkv')>>Mark's.vpy ECHO import havsfunc as havsfunc>>Mark's.vpy ECHO video = havsfunc.InterFrame(video, Preset="medium", Tuning="smooth", InputType="2D", NewNum=120000, NewDen=1001, GPU=True)>>Mark's.vpy ECHO video = core.std.AssumeFPS(video, fpsnum=120000, fpsden=1001)>>Mark's.vpy ECHO video.set_output()>>Mark's.vpy vspipe --y4m Mark's.vpy - | ffmpeg -thread_queue_size 2048 -i pipe: -i 20130218-Sample-Original.mkv -map 0:v -map 1:a -codec:v libx265 -x265-params "crf=16:qcomp=0.6" -codec:a copy -codec:s copy 20130218-Sample-InterFrame-120fps.mkv |
17th February 2021, 08:30 | #954 | Link | |
Registered User
Join Date: Sep 2007
Posts: 5,374
|
Quote:
It has nothing to do with interframe When debugging scripts, strip everything down , eliminate variables, and check each step, each output node. Same with ffmpeg. Start with something simple like blankclip(). Label the framenumbers. vapoursynth and the input pipe into ffmpeg are fine; it's the output in ffmpeg that is the problem - even with NUL - the output is rounded. There might be some switch or command to prevent this, not sure vspipe --y4m 1.vpy - | ffmpeg -f yuv4mpegpipe -i - -an -f null NUL Input #0, yuv4mpegpipe, from 'pipe:': Duration: N/A, start: 0.000000, bitrate: N/A Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p(progressive), 640x48 0, 119.88 fps, 120 tbr, 119.88 tbn, 119.88 tbc Stream mapping: Stream #0:0 -> #0:0 (rawvideo (native) -> wrapped_avframe (native)) Output #0, null, to 'NUL': Metadata: encoder : Lavf58.67.100 Stream #0:0: Video: wrapped_avframe, yuv420p(progressive), 640x480, q=2-31, 20 0 kb/s, 120 fps, 120 tbn Another option is to perform the operations vapoursynth or avisynth tinterlace=mode=drop_odd is the same thing as selecteven() in avisynth, or clip = clip[::2] in vapoursynth 2.vpy Code:
import vapoursynth as vs core = vs.get_core() clip = core.std.BlankClip(format=vs.YUV420P8, length=240, color=[16, 128, 128]) clip = core.text.FrameNum(clip) clip = core.std.AssumeFPS(clip, fpsnum=120000, fpsden=1001) clip = clip[::2] clip.set_output() Duration: N/A, start: 0.000000, bitrate: N/A Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p(progressive), 640x48 0, 59.94 fps, 59.94 tbr, 59.94 tbn, 59.94 tbc Stream mapping: Stream #0:0 -> #0:0 (rawvideo (native) -> wrapped_avframe (native)) Output #0, null, to 'NUL': Metadata: encoder : Lavf58.67.100 Stream #0:0: Video: wrapped_avframe, yuv420p(progressive), 640x480, q=2-31, 20 0 kb/s, 59.94 fps, 59.94 tbn actual encode vspipe --y4m 2.vpy - | ffmpeg -f yuv4mpegpipe -i - -c:v libx264 -preset:v fast -crf 20 -an 2.mp4 ffmpeg -i 2.mp4 Duration: 00:00:02.00, start: 0.000000, bitrate: 48 kb/s Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 640x480, 39 kb/s, 59.94 fps, 59.94 tbr, 60k tbn, 119.88 tbc (default) Looks ok, frames are correct when examined Also, I would avoid mkv if you want more accurate timestamps. mkv uses a timebase of 1/1000s so there is rounding and some jitter |
|
17th February 2021, 09:30 | #955 | Link |
Registered User
Join Date: Jul 2016
Location: Mansfield, Ohio (formerly San Jose, California)
Posts: 280
|
I agree wholeheartedly. Why? Because it worked for SubJunk. I assume SubJunk didn't pipe to ffmpeg.
I love doom9. You guys are the best. You, and ... well, I'm not going to name names because I fear I would leave someone out. You all are Heroes of the Revolution. You've given me a lot to examine. Do you think the difference is because ffmpeg works via PTSs instead of frame numbers? I've been getting that feeling but ffmpeg docs hardly even mention "PTS". Certainly the filter docs don't mention what they do regarding either reading or writing PTSs. It's funny you should mention "tinterlace=mode=drop_odd is the same thing as selecteven() in avisynth" because my first ffmpeg drop_odd approach was to use 'select=eq(mod(n\,2)\,0)' but PTSs don't get updated (as seen in MPV) and the results are unpredictable. You're obviously well informed. I've been struggling with ffmpeg for half a year but, tell me: Do you think I should abandon ffmpeg? |
17th February 2021, 09:40 | #956 | Link | |
Registered User
Join Date: Jul 2016
Location: Mansfield, Ohio (formerly San Jose, California)
Posts: 280
|
Quote:
Edit: I think MPEG streams use 1/90000s. What transports also use 1/90000s? All my sources will be DVD & BD movies. Last edited by markfilipak; 17th February 2021 at 09:44. |
|
17th February 2021, 15:34 | #957 | Link | ||||
Registered User
Join Date: Sep 2007
Posts: 5,374
|
Quote:
It's avisynth that is CFR only, frame only. vapoursynth is actually both Quote:
Quote:
They are just tools, pros/cons to each of them. Often there are multiple ways to get something done, but certain operations are often better/faster in one or the other. Quote:
|
||||
17th February 2021, 15:55 | #958 | Link | |
Registered User
Join Date: Jan 2012
Posts: 271
|
Quote:
While for some reason unknown to universe you expect it will make video into smaller fps. First you invent problem that does not actually exist. Then you claim tool have issue. And the only issue from start is you. |
|
17th February 2021, 16:25 | #959 | Link | ||
Registered User
Join Date: Sep 2007
Posts: 5,374
|
Quote:
https://ffmpeg.org/ffmpeg-filters.html#tinterlace Quote:
It also says "half frame rate" , which implies a lower fps Also, in video world, non ffmpeg, frames are very different than fields. What do you make of the rounding issue without any filters, without any containers ? |
||
17th February 2021, 19:54 | #960 | Link | |
Registered User
Join Date: Jul 2016
Location: Mansfield, Ohio (formerly San Jose, California)
Posts: 280
|
Quote:
Code:
Ref: stnsoft.com/DVD/pes-hdr.html | ... PES_HEADER_EXTENSION__________________ PTS (presentation time stamp) | ... 31 00 01 5B C9 -- -- -- -- -- -- -- -- [0017] [0000] ????? | 0011 ---- ---- ---- ---- ---- ---- ---- ---- ---- [0017.4] [0000.4] PTS | ---- 000- 0000 0000 0000 000- 0101 1011 1100 100- ... = 11748; PTS = (11748)/(90000) seconds = 00:00:00.130533333 [0017.7] [0000.7] (marker bit) | ---- ---1 ---- ---- ---- ---- ---- ---- ---- ---- [0019.7] [0002.7] (marker bit) | ---- ---- ---- ---- ---- ---1 ---- ---- ---- ---- [001B.7] [0004.7] (marker bit) | ---- ---- ---- ---- ---- ---- ---- ---- ---- ---1 DTS (decoding time stamp) | ... -- -- -- -- -- 11 00 01 09 AD -- -- -- [001C] [0005] ????? | 0001 ---- ---- ---- ---- ---- ---- ---- ---- ---- [001C.4] [0005.4] DTS | ---- 000- 0000 0000 0000 000- 0000 1001 1010 110- ... = 1238; DTS = (1238)/(90000) seconds = 00:00:00.013755555 [001C.7] [0005.7] (marker bit) | ---- ---1 ---- ---- ---- ---- ---- ---- ---- ---- [001E.7] [0007.7] (marker bit) | ---- ---- ---- ---- ---- ---1 ---- ---- ---- ---- [0020.7] [0009.7] (marker bit) | ---- ---- ---- ---- ---- ---- ---- ---- ---- ---1 Last edited by markfilipak; 17th February 2021 at 20:47. |
|
Tags |
48fps, 60fps, framedoubling, interframe, smooth motion |
Thread Tools | Search this Thread |
Display Modes | |
|
|