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 19th October 2021, 00:51   #4521  |  Link
_Al_
Registered User
 
Join Date: May 2011
Posts: 321
Quote:
Originally Posted by poisondeathray View Post
no attribute 'YUV420PS'
former register_format(), now it is query_video_format(), I guess because of audio formats addition:
Code:
my_float_format = core.query_video_format(color_family=vs.YUV, sample_type=vs.FLOAT, bits_per_sample=32, subsampling_w=1, subsampling_h=1)
clip2 = clip.resize.Point(format=my_float_format)
print(clip2)
>>>
VideoNode
	Format: YUV420PS32
_Al_ is offline   Reply With Quote
Old 19th October 2021, 01:59   #4522  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,377
Quote:
Originally Posted by Izuchi View Post
Would this be the correct command? vspipe script.vpy - | ffmpeg -f rawvideo -pix_fmt gbrpf32le -s 1920x1080 -r 24000/1001 -i - denoise.rgb

For raw RGB... but you can't read raw rgb float with vsrawsource. You would use denoise_%05d.exr for ffmpeg output, and imwri.Read with float_output=True for import back into vapoursynth. But there are issues with that workflow for some reason, it's not lossless if you check MakeDiff, I'm looking into it.

But if you use imwri.Write in vapoursynth it's lossless

output
Code:
clip = core.imwri.Write(clip, "TIFF", "imwri_Write_%05d.tiff",firstnum=0)
reimport
Code:
clipc = core.imwri.Read(r'imwri_Write_%05d.tiff', float_output=True)
poisondeathray is offline   Reply With Quote
Old 19th October 2021, 02:04   #4523  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,377
Quote:
Originally Posted by _Al_ View Post
former register_format(), now it is query_video_format(), I guess because of audio formats addition:
Code:
my_float_format = core.query_video_format(color_family=vs.YUV, sample_type=vs.FLOAT, bits_per_sample=32, subsampling_w=1, subsampling_h=1)
clip2 = clip.resize.Point(format=my_float_format)
print(clip2)
>>>
VideoNode
	Format: YUV420PS32
Thanks it works.

I remember asking about not included pixel formats and Holy Wu told me about register_format - I should have remembered

https://forum.doom9.org/showthread.p...30#post1904930
poisondeathray is offline   Reply With Quote
Old 19th October 2021, 10:44   #4524  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
Quote:
Originally Posted by poisondeathray View Post
Thanks it works.

I remember asking about not included pixel formats and Holy Wu told me about register_format - I should have remembered

https://forum.doom9.org/showthread.p...30#post1904930
How did you end up with YUV420PS in the first place? Subsampled float is a quite weird thing to have
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 19th October 2021, 15:21   #4525  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,377
Quote:
Originally Posted by Myrsloik View Post
How did you end up with YUV420PS in the first place? Subsampled float is a quite weird thing to have
It was not for me, scroll up a few posts
poisondeathray is offline   Reply With Quote
Old 20th October 2021, 12:21   #4526  |  Link
Quadratic
Registered User
 
Join Date: Jul 2021
Posts: 26
Quote:
Originally Posted by Myrsloik View Post
How did you end up with YUV420PS in the first place? Subsampled float is a quite weird thing to have
Why is YUV420PS "weird"? It can be achieved with vsutil and fmtc. It is not uncommon.
Quadratic is offline   Reply With Quote
Old 20th October 2021, 12:31   #4527  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
Quote:
Originally Posted by Quadratic View Post
Why is YUV420PS "weird"? It can be achieved with vsutil and fmtc. It is not uncommon.
It's a very inefficient use of bits. You'd have an image that definitely looks better with full resolution chroma in YUV444P16 format and smaller size.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 22nd October 2021, 15:17   #4528  |  Link
Julek
Registered User
 
Julek's Avatar
 
Join Date: Dec 2020
Posts: 88
Quote:
Originally Posted by Myrsloik View Post
Now I need some input on which frame statistics to implement. If you generalize all of the functions in avisynth you get these 6 left. I've seen that difference is used a lot but are there any of these I could skip? I can't remember seeing the min/max/median used ever.
You can also suggest new ones if they're not too complicated.

Average(clip)
Difference(clip1, clip2)
PlaneMax(clip, float threshold)
PlaneMin(clip, float threshold)
PlaneMedian(clip)
PlaneMinMaxDifference(clip, float threshold)

The full list here:
http://avisynth.org/mediawiki/ScriptClip
Any chance to implement threshold for Min/Max now?
Dogway's retinex uses this, I know there is a plugin for it, but the output is not the same and I wanted to do some tests, if possible.
Julek is offline   Reply With Quote
Old 22nd October 2021, 15:53   #4529  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,361
Quote:
Originally Posted by ChaosKing View Post
Vapoursynth still has no official logo. How about something like this?




Beautiful logos! I like 3rd and 4th the best. 4th looks more like consumer oriented, it's third or fourth in neutral tones.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 22nd October 2021, 16:46   #4530  |  Link
groucho86
Registered User
 
Join Date: Apr 2016
Posts: 85
Hi everyone,
I opened an issue on github but thought it may be worth posting here. I installed Vapoursynth R57 and imwri via homebrew and am trying to load a half-float EXR.

Code:
clip = core.imwri.Read(filename='halffloat.%03d.exr', firstnum=1,
                       float_output=True)
print(clip.get_frame(0))
Returns:
Code:
Filter Read returned a frame that's not of the declared format
VapourSynth encountered a fatal error: Filter Read returned a frame that's not of the declared format
libc++abi.dylib: terminating
float_output set to False works.
groucho86 is offline   Reply With Quote
Old 23rd October 2021, 09:34   #4531  |  Link
Yomiko
Registered User
 
Join Date: Aug 2021
Posts: 73
What's the reason for not allowing a GRAY plane extracted from an RGB clip resized to RGB because of its tagged matrix? It seems the matrix itself (if supported by VS) doesn't affect the output result.
Yomiko is offline   Reply With Quote
Old 23rd October 2021, 14:00   #4532  |  Link
vxzms
Registered User
 
Join Date: Nov 2018
Posts: 11
Would you plan to let the vspipe’s filter-time also show namespace? I think it would be more intuitive.
vxzms is offline   Reply With Quote
Old 23rd October 2021, 14:12   #4533  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
Quote:
Originally Posted by vxzms View Post
Would you plan to let the vspipe’s filter-time also show namespace? I think it would be more intuitive.
Filter don't have a namespace but the functions that create them may or may not. So it's actually very hard to add what you'd expect as the namespace to your list.

If anything extending the graph output with time spent in various filters is probably the best way since then you can see which function is responsible.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 24th October 2021, 22:11   #4534  |  Link
GB452
Registered User
 
Join Date: Mar 2019
Posts: 8
Having a very strange issue: vsrepo can't detect VapourSynth. I had updated to VS 57, but had some issues (including this one) and uninstalled it and went back to what I was using previously, version 54, but I keep getting this error and I cannot find any suggestions on how to fix it online.

GB452 is offline   Reply With Quote
Old 24th October 2021, 22:14   #4535  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,795
Same happend to me after updating to R57.
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database
ChaosKing is online now   Reply With Quote
Old 25th October 2021, 00:37   #4536  |  Link
Yomiko
Registered User
 
Join Date: Aug 2021
Posts: 73
Quote:
Originally Posted by Yomiko View Post
What's the reason for not allowing a GRAY plane extracted from an RGB clip resized to RGB because of its tagged matrix? It seems the matrix itself (if supported by VS) doesn't affect the output result.
Meanwhile GRAY clip with unspec matrix can be resampled. A bug?
Yomiko is offline   Reply With Quote
Old 25th October 2021, 10:41   #4537  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
Quote:
Originally Posted by Yomiko View Post
Meanwhile GRAY clip with unspec matrix can be resampled. A bug?
No, gray clips are the Y in YUV so the same rules apply. You can resize unknown matrix YUV but you can't convert it to RGB.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 25th October 2021, 14:11   #4538  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,277
I'm on Ubuntu 20.04, I compiled and installed Vapoursynth R57.
I also compiled a bunch of filters to "/home/selur/opt/vapoursynth/lib/python3.8/site-packages"

paths seem to be correct:
Code:
echo $LD_LIBRARY_PATH
/home/selur/opt/vapoursynth/lib
echo $PYTHONPATH
/home/selur/opt/vapoursynth/lib/python3.8/site-packages
echo $PATH
/home/selur/.local/bin:/home/selur/opt/vapoursynth/bin:/home/selur/.local/bin:/home/selur/opt/vapoursynth/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
Code:
import vapoursynth as vs
core = vs.core
clip = core.std.BlankClip(format=vs.RGB24, color=[255, 255, 255])
clip = core.text.Text(clip, core.version())
clip.set_output()
works fine

explicit loading a library (libvslsmashsource.so):
Code:
import vapoursynth as vs
core = vs.core

core.std.LoadPlugin('/home/selur/opt/vapoursynth/lib/vapoursynth/libvslsmashsource.so')

clip = core.lsmas.LWLibavSource(source="test.mov", format="YUV422P10", cache=0, fpsnum=30000, fpsden=1001, prefer_hw=0)
clip = core.resize.Point(clip, matrix_in_s="470bg",range_s="limited")

clip.set_output()
works fine too,

but using:
Code:
import sys
import vapoursynth as vs
core = vs.core

sys.path.append('/home/selur/opt/vapoursynth/lib/vapoursynth')

clip = core.lsmas.LWLibavSource(source="test.mov", format="YUV422P10", cache=0, fpsnum=30000, fpsden=1001, prefer_hw=0)
clip = core.resize.Point(clip, matrix_in_s="470bg",range_s="limited")

clip.set_output()
doesn't.
It returns "Python exception: No attribute with the name lsmas exists. Did you mistype a plugin namespace?"

-> How can I tell Vapoursynth where to look for the libraries?
I though:
Code:
sys.path.append('/home/selur/opt/vapoursynth/lib/vapoursynth')
would do the trick, which it doesn't.

Cu Selur
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 25th October 2021, 14:13   #4539  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
You're specifying the python search path, it's only used for import and similar python commands. You also shouldn't install filters in site-packages.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 25th October 2021, 14:18   #4540  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,277
Sorry, my mistake. Didn't put the iflters in the site-packages.
site-packages only contains vapoursynth.la and vapoursynth.so
all compiled filters are in "/home/selur/opt/vapoursynth/lib/vapoursynth/"

Okay, so is there a way to somehow to use my folder as "/home/selur/opt/vapoursynth/lib/vapoursynth/" source for autoloading?
__________________
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 23:28.


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