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 > VapourSynth
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 28th April 2017, 10:24   #2481  |  Link
dipje
Registered User
 
Join Date: Oct 2014
Posts: 268
It's RGB.. the way I see it there is no 'colormatrix' then, that's only for YUV files. Maybe an RGB colorprofile / ICC-profile but that is something you should override in whatever application you use to read the file, I'm pretty sure AVI can't store ICC profiles for RGB data somewhere .
dipje is offline   Reply With Quote
Old 28th April 2017, 11:27   #2482  |  Link
Jamaika
Registered User
 
Join Date: Jul 2015
Posts: 706
Quote:
Originally Posted by dipje View Post
It's RGB.. the way I see it there is no 'colormatrix' then, that's only for YUV files.
I don't believe it is RGB. Image with FFmpeg:

Video AVI RGB24:

Video AVI R210:
Jamaika is offline   Reply With Quote
Old 28th April 2017, 13:54   #2483  |  Link
dipje
Registered User
 
Join Date: Oct 2014
Posts: 268
R210 is RGB 10bit. https://wiki.multimedia.cx/index.php/R210. 10 bits R, 10 bits G, 10 bits B, 2 bits padding.

There can still be a thing such as 'broadcast safe levels' and full range (like I said, RGB can have things as color profiles, but that has nothing to do with the codec, more with the what your program interprets the RGB values as), even in RGB. Doesn't change the fact that R210 is a RGB packing method.. that's the whole thing I asked.. 'Can you pack vs.RGB30 as R210 in the VfW interface'.

Anyway, I don't install any Blackmagic codecs anyway. Don't see why anyone would. Maybe you can configure the codec (or the encoder that created the clip) to use full range or not. In Davinci Resolve you can click the clip properties in your Media Bin to change the interpretation of the levels.
dipje is offline   Reply With Quote
Old 28th April 2017, 14:11   #2484  |  Link
Jamaika
Registered User
 
Join Date: Jul 2015
Posts: 706
Quote:
Originally Posted by dipje View Post
In Davinci Resolve you can click the clip properties in your Media Bin to change the interpretation of the levels.
Thanks for the answer. I can't change the interpretation of the levels in Sony Vegas 14 or VirtualDub. So theme about the R210 codec I throw in the trash. For me it is the sRGB is equal to only bt709.
Jamaika is offline   Reply With Quote
Old 28th April 2017, 23:22   #2485  |  Link
Joachim Buambeki
Registered User
 
Join Date: May 2010
Location: Germany, Munich
Posts: 49
Quote:
Originally Posted by dipje View Post
No, it means you can frameserver the output of a RGB 10bit Vapoursynth script directly into Resolve.
If you actually want to work on it 'live' is another question, but quick grading and fixes and using Resolve's export module to save it into a format of your choosing is possible.
Ok, got it, thanks.
When you say 10bit, this means a ProRes444 file (which is 12bit) is piped in reduced quality into Resolve - is there a way to feed it to Resolve in a way no quality is lost (meaning in 16bit, 32bit or whatever Resolve internally uses)?

I asked for an OFX plugin a (short) while ago but it seems Myrsloik missed my second post. I still believe such a plugin (if technically possible) that runs VS code would be great to lift VS more into the professional realm and I assume many professionals would be very happy to this in their toolkit. If communicated right, I am sure some of them will be willing to donate to make this happen.

TIA!
Joachim Buambeki is offline   Reply With Quote
Old 29th April 2017, 08:04   #2486  |  Link
dipje
Registered User
 
Join Date: Oct 2014
Posts: 268
Replying in pm as I think we're moving away from vapoursynth stuff
dipje is offline   Reply With Quote
Old 29th April 2017, 10:53   #2487  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
Quote:
Originally Posted by Joachim Buambeki View Post
Ok, got it, thanks.
When you say 10bit, this means a ProRes444 file (which is 12bit) is piped in reduced quality into Resolve - is there a way to feed it to Resolve in a way no quality is lost (meaning in 16bit, 32bit or whatever Resolve internally uses)?

I asked for an OFX plugin a (short) while ago but it seems Myrsloik missed my second post. I still believe such a plugin (if technically possible) that runs VS code would be great to lift VS more into the professional realm and I assume many professionals would be very happy to this in their toolkit. If communicated right, I am sure some of them will be willing to donate to make this happen.

TIA!
Sigh, enterprise apis... That mess looks like it'd take at least a month to understand. How you even imagine the integration to work well is also a mystery.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 1st May 2017, 10:39   #2488  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,277
using portable R37 64bit with:
Code:
# Imports
import vapoursynth as vs
core = vs.get_core()
# Loading Plugins
core.std.LoadPlugin(path="G:/Hybrid/vsfilters/Support/fmtconv.dll")
core.std.LoadPlugin(path="G:/Hybrid/vsfilters/SourceFilter/LSmashSource/vslsmashsource.dll")
# Loading F:\TestClips&Co\test.avi using LWLibavSource
clip = core.lsmas.LWLibavSource(source="F:/TESTCL~1/test.avi", format="YUV420P8", cache=0)
# making sure input color matrix is set as 470bg
clip = core.resize.Point(clip, matrix_in_s="470bg")
# making sure input color range is set to TV (16-235) scale.
clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=1)
original = clip
# dualView True
# vsPreview True
# cropping the video to 600x312
clip = core.std.CropRel(clip=clip, left=40, right=0, top=40, bottom=0)
# cropping the video to 600x312
original = core.std.CropRel(clip=original, left=40, right=0, top=40, bottom=0)
# clip resizing to 960x500
#clip = core.fmtc.resample(clip=clip, kernel="spline16", w=960, h=500, interlaced=False, interlacedd=False)
# original resizing to 960x500
#original = core.fmtc.resample(clip=original, kernel="spline16", w=960, h=500, interlaced=False, interlacedd=False)
original = core.sub.Subtitle(clip=original, text="Original")
clip= core.sub.Subtitle(clip=clip, text="Filtered")
stacked = core.std.StackHorizontal([original,clip])
# Output
stacked.set_output()
and
Code:
VSPipe.exe  --y4m h:\Temp\tempPreviewVapoursynthFile11_03_52_922.vpy -  | g:\Hybrid\mplayer.exe -
vspipe crashes for me and I don't see why.

Removing:
Code:
# clip resizing to 960x500
clip = core.fmtc.resample(clip=clip, kernel="spline16", w=960, h=500, interlaced=False, interlacedd=False)
# original resizing to 960x500
original = core.fmtc.resample(clip=original, kernel="spline16", w=960, h=500, interlaced=False, interlacedd=False)
from the script and I get no crash.

=> Does anyone see what I do wrong? (using 'clip.set_output()' or 'original.set_output()' the script doesn't crash either)

Leaving out the cropping doesn't change anything, so this seems to be related to fmtc.

Using:
Code:
# clip resizing to 960x500
clip = core.resize.Spline16(clip, width=960, height=500)
# original resizing to 960x500
original = core.resize.Spline16(original, width=960, height=500)
instead of:
Code:
# clip resizing to 960x500
clip = core.fmtc.resample(clip=clip, kernel="spline16", w=960, h=500, interlaced=False, interlacedd=False)
# original resizing to 960x500
original = core.fmtc.resample(clip=original, kernel="spline16", w=960, h=500, interlaced=False, interlacedd=False)
also fixes the problem.

=> seems like there is a problem with fmtc when used multiple times inside a script. (I'm using fmtconv r20 from https://github.com/EleonoreMizo/fmtconv/releases)
__________________
Hybrid here in the forum, homepage

Last edited by Selur; 1st May 2017 at 11:12. Reason: tested using Spine16 instead of fmtc "spline16"
Selur is offline   Reply With Quote
Old 1st May 2017, 11:48   #2489  |  Link
dipje
Registered User
 
Join Date: Oct 2014
Posts: 268
I use fmtc a lot of times in most scripts, no problem there . Proves that no two scripts are ever the same :P
dipje is offline   Reply With Quote
Old 1st May 2017, 12:21   #2490  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,565
Quote:
Originally Posted by Selur View Post
=> seems like there is a problem with fmtc when used multiple times inside a script.
How did you arrive at that conclusion?
sneaker_ger is offline   Reply With Quote
Old 1st May 2017, 12:27   #2491  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,277
When I use:
Code:
# clip resizing to 960x500
clip = core.fmtc.resample(clip=clip, kernel="spline16", w=960, h=500, interlaced=False, interlacedd=False)
# original resizing to 960x500
original = core.fmtc.resample(clip=original, kernel="spline16", w=960, h=500, interlaced=False, interlacedd=False)
stacked = core.std.StackHorizontal([original,clip])
# Output
stacked.set_output()
the problem occurs.
When I use:
Code:
# clip resizing to 960x500
clip = core.fmtc.resample(clip=clip, kernel="spline16", w=960, h=500, interlaced=False, interlacedd=False)
# original resizing to 960x500
original = core.fmtc.resample(clip=original, kernel="spline16", w=960, h=500, interlaced=False, interlacedd=False)
stacked = core.std.StackHorizontal([original,clip])
# Output
original.set_output()
or
Code:
# clip resizing to 960x500
clip = core.fmtc.resample(clip=clip, kernel="spline16", w=960, h=500, interlaced=False, interlacedd=False)
# original resizing to 960x500
original = core.fmtc.resample(clip=original, kernel="spline16", w=960, h=500, interlaced=False, interlacedd=False)
stacked = core.std.StackHorizontal([original,clip])
# Output
clip.set_output()
or just
Code:
stacked = core.std.StackHorizontal([original,clip])
the problem doesn't occur.

So it seemed to me that the problem only occurred when I used two fmtc calls, like I did with:
Code:
# clip resizing to 960x500
clip = core.fmtc.resample(clip=clip, kernel="spline16", w=960, h=500, interlaced=False, interlacedd=False)
# original resizing to 960x500
original = core.fmtc.resample(clip=original, kernel="spline16", w=960, h=500, interlaced=False, interlacedd=False)

If you got another explanation for it please share.
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 1st May 2017, 14:21   #2492  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,277
Can someone aside from me reproduce the issue?
(just to be sure this isn't somehow related to my setup)
Minimal example would be:
Code:
clip = core.lsmas.LWLibavSource(source="F:/TESTCL~1/TEST-A~1.AVI", format="YUV420P8", cache=0) # source and source filter don't matter, tried different sources and source filters
original = clip # copying current clip state to original
clip = core.fmtc.resample(clip=clip, kernel="spline16", w=960, h=720, interlaced=False, interlacedd=False) # resizing clip
original = core.fmtc.resample(clip=original, kernel="spline16", w=960, h=720, interlaced=False, interlacedd=False) # resizing clip
stacked = core.std.StackHorizontal([original,clip]) # stacking 
stacked.set_output() # return
Cu Selur
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 1st May 2017, 14:29   #2493  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,565
No crash here. (R37 x64 on Windows 7, i5-2500K, fmtconv r20)

Last edited by sneaker_ger; 1st May 2017 at 14:33.
sneaker_ger is offline   Reply With Quote
Old 1st May 2017, 14:42   #2494  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,565
I just got crashes immediately after upgrading to R38 test2. Then it worked after a few tries.

/edit:
Then crashes again. Kinda random. No idea what's going on. Just doing vspipe - script.vpy > NUL

Last edited by sneaker_ger; 1st May 2017 at 14:51.
sneaker_ger is offline   Reply With Quote
Old 1st May 2017, 15:00   #2495  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,277
Still using R37 so that isn't it. But since it works for you it might be something with my setup. (R37 64bit, on Win 10 pro, Ryzen 7 1800x, fmtconv r20)
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 1st May 2017, 15:51   #2496  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,277
Quote:
What's the resolution of your avi file?
640x352 (this is one of my test samples which I have converted hundreds of times; https://drive.google.com/drive/folde...UZibG5XZkRfeTg -> test.avi)

Quote:
Does it still crash if you simply use core.std.BlankClip(width=1920, height=1080, format=vs.YUV420P8) as the source clip?
Yes
Quote:
Does it still crash if you specify cpuopt=0 in both fmtc.resample()?
Yes

----
downloaded:
https://www.python.org/ftp/python/3....mbed-amd64.zip
and
https://github.com/vapoursynth/vapou...ortable-R37.7z
extracted both into one folder

called:
Code:
VSPipe.exe c:\Users\Selur\Desktop\Test.vpy - | ffplay.exe -
vspipe still crashing.

copied the files to my laptop, got the same crash. (Both run Win10 latest updates; laptop is an i7, main system is a Ryzen 7 1800x)

---
replacing:
Code:
original = core.fmtc.resample(clip=original, kernel="spline16", w=960, h=500, interlaced=False, interlacedd=False)
with
Code:
original = clip
and thus not using fmtc two files also 'fixes' the issue.
RAM usage of vspip is ~870MB upon the crash.

Cu Selur
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 1st May 2017, 16:06   #2497  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,277
Copied the whole thing into a Win 8.1 64bit VM and there the script worked as it should. No problem.
-> HolyWu what OS are you on? Could this be a problem thanks to Windows 10 Creators Update?

replacing:
Code:
clip = core.lsmas.LWLibavSource(source="F:/TESTCL~1/test.avi", format="YUV420P8", cache=0)

original = clip

clip = core.fmtc.resample(clip=clip, kernel="spline16", w=960, h=500, interlaced=False, interlacedd=False)
original = core.fmtc.resample(clip=original, kernel="spline16", w=960, h=500, interlaced=False, interlacedd=False)
with:
Code:
clip = core.lsmas.LWLibavSource(source="F:/TESTCL~1/test.avi", format="YUV420P8", cache=0)
original = core.lsmas.LWLibavSource(source="F:/TESTCL~1/test.avi", format="YUV420P8", cache=0)

clip = core.fmtc.resample(clip=clip, kernel="spline16", w=960, h=500, interlaced=False, interlacedd=False)
original = core.fmtc.resample(clip=original, kernel="spline16", w=960, h=500, interlaced=False, interlacedd=False)
doesn't help either,...
__________________
Hybrid here in the forum, homepage

Last edited by Selur; 1st May 2017 at 16:24.
Selur is offline   Reply With Quote
Old 1st May 2017, 16:56   #2498  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,277
Since the core resizer only covers Bicubic/Point/Lanczos/Spline16/Spline36, but I sometimes like gauss more I normally stick with fmtconv. (I also like to have the option to use the other resizers offered by fmtconv.)
Strange thing that I get the crash each time (on both my i7 and my Ryzen system) and you only very seldom and random.
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 2nd May 2017, 16:36   #2499  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,277
Tested it. Still crashing here.
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 2nd May 2017, 17:13   #2500  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,277
Correction: New version does fix the crash for me too.
(somehow overlooked that Win10 asked whether the file should be overwritten and tested the old version again before. )

Cu Selur
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Reply

Tags
speed, vaporware, vapoursynth


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 04:36.


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