View Full Version : 10-bit FPS conversion
leoenc
22nd November 2014, 19:08
Anyone knows how to do motion compensated frame rate conversion on 10-bit sources? (while keeping the output 10-bits)
I found Interframe to do a really nice job but unfortunately it seems that SVPflow and MVtools only work on 8-bit sources.
To go from 23.976fps to 25fps, I'm using the following but it creates terrible ghosting. If I'm adding ConvertToYV12() between the 2 lines it looks great but then I'm in 8-bit...
FFvideoSource("video.mov", enable10bithack=true)
InterFrame(NewNum=25000, NewDen=1000)
feisty2
23rd November 2014, 02:24
you can't do it, there's no such filter for avisynth (yet)
Bloax
23rd November 2014, 03:16
MVTools exists for Vapoursynth though, so you could try over there.
(?although a 16-bit version of mvtools does exist for avisynth too?)
Of course that's not interframe, but converting 23.976 to 25 fps isn't something you can't get good results just by using MVTools.
feisty2
23rd November 2014, 03:25
mvtools2.6.05 (dither version) only takes 8 bit input, and the only output of it that can be 16 bit is mdegrain, other functions (mcompensate/mflow....) still output 8 bit clip only
vaporsynth mvtools doesn't support 16bit yet
feisty2
23rd November 2014, 05:16
if ur clip is yuvp10, there's a rgb24y hack can avoid precision loss
feisty2
23rd November 2014, 05:25
yuv 10bit equals to rgb 8bit approximately, (exactly if ur using ycgco matrix)
so convert it to rgb24, convey rgb channels on yv12 colorspace, then process like any regular yv12 clip
feisty2
23rd November 2014, 05:35
the best solution is don't convert framerate, speed up a little bit (assumefps (25))
no one would notice anyways, that's how pal dvds store movies
leoenc
23rd November 2014, 08:37
@feisty2,
Thank you for your help. I agree that a simple speedup would be best, but in this particular case I have to keep the original timing.
You have mentioned that there's a way to convert to rgb24 with some hack, then to yv12 for processing and then back to yv16.
Would you please describe how is that achieved? I assume the following isn't correct:
FFvideoSource("video.mov", enable10bithack=true)
ConvertToRGB24()
ConvertToYV12()
InterFrame(NewNum=25000, NewDen=1000)
ConvertToYV16()
Also, as I understand, using the color space conversion process you've suggested will eventually mean it will be 10-bit but actually the image will be composed of 256 colors per channel and not 1024 colors per channel. Is this correct?
feisty2
23rd November 2014, 09:28
FFvideoSource("video.mov", enable10bithack=true)
dither_convert_yuv_to_rgb (lsb_in=true,output="rgb24",mode=6,chromak="spline")
r=showred ("yv12").InterFrame(NewNum=25000, NewDen=1000)
g=showgreen ("yv12").InterFrame(NewNum=25000, NewDen=1000)
b=showblue ("yv12").InterFrame(NewNum=25000, NewDen=1000)
mergergb (r,g,b,"rgb24")
dither_convert_rgb_to_yuv (lsb=true,output="yv16",chromak="spline")
feisty2
23rd November 2014, 09:46
yuv to rgb conversion is not a "one to one" conversion, it's a "multiple to one" kind of thing
so, some different sets of (y,u,v) arrays can result in one same (r,g,b) array
10bit ycbcr can approximately present the same color amount of 8bit srgb
9bit srgb will give you far more colors than 10bit ycbcr
leoenc
23rd November 2014, 11:50
That's very helpful, thanks!
So now to crop the LSB (in order to feed it to 10-bit x264), I just add f3kdb_dither() at the end?
feisty2
23rd November 2014, 11:58
I don't know much about f3kdb
I always use "dither_out" at the end of script and add --input_depth 16 to x264 commands
leoenc
23rd November 2014, 12:10
Ok, thanks a lot for all your help.
TheSkiller
23rd November 2014, 13:06
If an interlaced 25 fps result is acceptable (rather than 25 fps progressive) a so called "Euro-Pulldown" is also a decent way of converting from 23.976 to 25 fps without doing a speedup. It's basically the same concept as ChangeFPS(25), but it's done on 50 fields per second rather than 25 frames, because simply duplicating one frame per seconds looks unacceptably irritating while duplicating one field twice per second is not very noticable most of the time.
ChangeFPS(50)
AssumeTFF()
SeparateFields().SelectEvery(4,0,3).Weave() #25i
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.