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. |
18th November 2012, 18:21 | #21 | Link |
͡҉҉ ̵̡̢̛̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̿̿
Join Date: Feb 2009
Location: No support in PM
Posts: 712
|
fmtconv r2:
Note: I'll rename the "bitdepth" argument in the bitdepth() function in "bits" in the next release.
__________________
dither 1.28.1 for AviSynth | avstp 1.0.4 for AviSynth development | fmtconv r30 for Vapoursynth & Avs+ | trimx264opt segmented encoding Last edited by cretindesalpes; 18th November 2012 at 18:41. |
19th November 2012, 02:46 | #22 | Link |
interlace this!
Join Date: Jun 2003
Location: i'm in ur transfers, addin noise
Posts: 4,555
|
this is beautiful. thankyou very much.
any speed losses in this plugin are made up for by the parallelism gained from using VS, and it can only get faster. i'm breaking realtime on BD transcodes for the first time ever, and in higher quality than i was ever able to achieve.
__________________
sucking the life out of your videos since 2004 |
19th November 2012, 02:58 | #23 | Link | |
契約者
Join Date: Jun 2008
Posts: 1,576
|
Quote:
If that is true, this means x264 or whatever software you use fails to fill all available CPU resources. If we assume that A filter twice as fast compared to B filter (both in one thread), then under 100% cpu load A still will be twice faster, regardless of how much threads you put in filter B. Even if B will output result faster, it will eat cycles that otherwise will go to x264, so overall there shouldn't be speed gain or unchanged speed, there should be speed loss. Last edited by Keiyakusha; 19th November 2012 at 03:05. |
|
19th November 2012, 07:09 | #24 | Link |
interlace this!
Join Date: Jun 2003
Location: i'm in ur transfers, addin noise
Posts: 4,555
|
i'm comparing to encoding the same blu-ray through avisynth, which is single threaded. often it's the bottleneck when encoding, especially if using intermediate formats (because sometimes x264 isn't the final destination )
__________________
sucking the life out of your videos since 2004 |
19th November 2012, 11:42 | #26 | Link |
Registered User
Join Date: Nov 2004
Location: Poland
Posts: 2,843
|
cretindesalpes: thank you for your work. Quick test are promising- all seams to be working well and speed is very good. Are you going to implement adding noise? I found that whatever dithering method you use it's always good put put a bit of noise anyway.
Great job |
19th November 2012, 12:12 | #27 | Link |
Registered User
Join Date: Nov 2004
Location: Poland
Posts: 2,843
|
Have crash on these lines:
ret = core.ffms2.Source(source=r'S:\test.mov') -10bit DNxHD source b= core.fmtc.resample(clip=ret, w=720, h=576) c= core.fmtc.matrix (clip=b, mats="709", matd="601", col_fam=vs.YUV) a= core.fmtc.bitdepth (clip=c, bitdepth=8, dmode=3) It's matrix line, as without it all was working fine. It also looks like dithering mode=5 does not work at all- video looks like it's without any dithering. Any idea why (vs R16)? Last edited by kolak; 19th November 2012 at 15:25. |
20th November 2012, 00:19 | #28 | Link |
͡҉҉ ̵̡̢̛̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̿̿
Join Date: Feb 2009
Location: No support in PM
Posts: 712
|
I couldn’t reproduce your problems here (with both VS r15 and r16). Your script works and dmode=5 is effective. Are your sure your input is 4:4:4? Matrix needs 4:4:4 to work, but it should issue an error message, not a crash.
__________________
dither 1.28.1 for AviSynth | avstp 1.0.4 for AviSynth development | fmtconv r30 for Vapoursynth & Avs+ | trimx264opt segmented encoding |
20th November 2012, 01:01 | #29 | Link | |
Registered User
Join Date: Nov 2004
Location: Poland
Posts: 2,843
|
Quote:
So I need to add line with conversion to 4:4:4 before matrix? It crashes Vdub badly- straight away, no log etc. Another question - how lossless is/can be YUV->RGB->YUV with your tool? If source is YUV will it stay in YUV for all conversions? Last edited by kolak; 20th November 2012 at 01:04. |
|
20th November 2012, 01:23 | #30 | Link |
契約者
Join Date: Jun 2008
Posts: 1,576
|
kolak
Maybe I miss something but you not supposed to open in VDub anything that is not V210 or 8bit formats. Sure it crashes,closes,whatever, it doesn't supports whats coming into it. Edit: and yes in theory it should give an error, but on practice for me just after some message pops-up, the process terminates. Last edited by Keiyakusha; 20th November 2012 at 01:26. |
20th November 2012, 01:25 | #31 | Link |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
|
Stop trolling around. Vdub doesn't crash on unsupported formats. It simply says it can't decode that fourcc.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
20th November 2012, 08:34 | #34 | Link | |||
͡҉҉ ̵̡̢̛̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̿̿
Join Date: Feb 2009
Location: No support in PM
Posts: 712
|
Quote:
Quote:
And if you add inverse and direct chroma subsampling, it will add more errors because of the aliasing and the limited kernel bandwidth. Even using a very large kernel, the losslessness will not be guaranteed. If you want more chance to recover the original pixels, dither with dmode=1 at the very last step. But if you inserted some operations in your processing like color or level correction, use a real dithering and forget about losslessness. Quote:
__________________
dither 1.28.1 for AviSynth | avstp 1.0.4 for AviSynth development | fmtconv r30 for Vapoursynth & Avs+ | trimx264opt segmented encoding Last edited by cretindesalpes; 20th November 2012 at 13:36. |
|||
20th November 2012, 12:19 | #35 | Link |
Registered User
Join Date: Nov 2004
Location: Poland
Posts: 2,843
|
If import filter reads file as eg. YUV422P10 and I want to scale it to SD staying in YUV mode is this possible (or will it always go to RGB during internal conversions)?
Like in the case above- DNxHD scaled to PAL with 709->601 conversion- will this stay in YUV ? I don't want to go to RGB when source file is read as YUV. Thanks for your clear answers |
20th November 2012, 13:12 | #36 | Link |
͡҉҉ ̵̡̢̛̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̿̿
Join Date: Feb 2009
Location: No support in PM
Posts: 712
|
Yes of course, resample and matrix will keep the same colorspace family by default. For matrix, you can specify another family as target colorspace.
If your input is YUV422P10 it must be converted to 4:4:4 before applying the matrix, and converted back to 4:2:2 after. This is how it should be done. This will yield a more reliable result than for example ColorMatrix, which processes the chroma without taking the luma into account (well, this is not important for the specific 601<->709 case), and processes the luma by point-resizing the chroma on the fly. This approximation is fast but not very accurate. If resampling the chroma twice is not acceptable for you, there is another possibility, a bit more complex to set up: use the basic 4:4:4 conversion to generate the luma plane, resample the luma to match exactly the initial chroma (half-sized 4:4:4) to generate the chroma planes, and merge the resulting planes.
__________________
dither 1.28.1 for AviSynth | avstp 1.0.4 for AviSynth development | fmtconv r30 for Vapoursynth & Avs+ | trimx264opt segmented encoding Last edited by cretindesalpes; 20th November 2012 at 13:34. |
20th November 2012, 13:17 | #37 | Link |
Registered User
Join Date: Nov 2004
Location: Poland
Posts: 2,843
|
Well- if it stays in YUV or RGB depending on incoming format by default, than this is good for me
I did try YUV->RGB->YUV but it end up quite far from being lossless. Source is YUY2, than: ret= core.fmtc.resample(clip=ret, css="444") ret= core.fmtc.matrix (clip=ret, mat="601", col_fam=vs.RGB) ret= core.fmtc.matrix (clip=ret, mat="601", col_fam=vs.YUV) ret= core.fmtc.resample (clip=ret, css="422") ret = core.fmtc.bitdepth (clip=ret, bitdepth=8, dmode=1) dmode=-1 keeps crashing. |
20th November 2012, 13:37 | #38 | Link |
͡҉҉ ̵̡̢̛̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̿̿
Join Date: Feb 2009
Location: No support in PM
Posts: 712
|
Hmm right it's dmode=1 now, it was -1 in the Dither tools for avisynth so I got confused. I fixed my previous message. Also, for this kind of stuff, you can resample with a better kernel than the default (a 8-tap Blackman for example).
__________________
dither 1.28.1 for AviSynth | avstp 1.0.4 for AviSynth development | fmtconv r30 for Vapoursynth & Avs+ | trimx264opt segmented encoding Last edited by cretindesalpes; 20th November 2012 at 13:39. |
20th November 2012, 14:55 | #40 | Link | |
Registered User
Join Date: Mar 2012
Location: Texas
Posts: 1,666
|
Hi cretindesalpes, like always thank you very much for another awesome tool.
For testing purposes only, I used one of your resizing examples in the Dither documentation. I don't know if I'm doing something wrong but I'm getting some strange results. Example in Dither doc: Code:
Sharpening the luma using the convolver of the resizer: Dither_convert_8_to_16 () Dither_resize16 (Width (), Height () / 2, kernel="impulse -1 6 -1", \ fh=-1, fv=-1, cnorm=true, center=false, y=3, u=2, v=2) DitherPost () Code:
import vapoursynth as vs import sys core = vs.Core() # Load Plugins core.std.LoadPlugin(path=r'C:\Vapoursynth\FMTConv\fmtconv.dll') core.avs.LoadPlugin(path=r'C:\AviSynth 2.5\plugins\DGDecodeNV.dll') # Blu-ray source cropped to 1920x1080 by DGSource src = core.avs.DGSource(dgi=r'X:\Test.dgi') # Processing src = core.fmtc.resample(clip=src, w=960, h=540, impulse="-1 6 -1", fh=-1, fv=-1, cnorm=1, css="420", planes="3,2,2", center=2) src = core.fmtc.bitdepth(clip=src, bitdepth=8) # VDub Output last = src Sometimes it opens without resizing at all. Sometimes it resizes to 960x1080 or to 1920x540. Sometimes (rare) it resizes correctly. But most of the time VDub gives me the following error: Quote:
Code:
..... src = core.fmtc.resample(clip=src, w=960, h=540, impulse="-1 6 -1") src = core.fmtc.bitdepth(clip=src, bitdepth=8) ..... *edit* Using the following, the correct results are more consistent but the other problems still remain. Code:
src = core.fmtc.resample(clip=src, w=1920, h=540, impulse="-1 6 -1") Last edited by Reel.Deel; 20th November 2012 at 16:20. Reason: username misspelling |
|
|
|