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

Reply
 
Thread Tools Search this Thread Display Modes
Old 26th September 2015, 23:55   #1  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,370
How to call Histogram ?

It's probably something stupid, but I can't get Histogram to work . I tried bunch of combos, lower case "h", input = ret, etc... It works fine without the Histogram line

I either get a "There is no attribute or namespace named histogram", or "There is no function named histogram" message. "libhistogram.dll" is in my C:\Program Files (x86)\VapourSynth\core64\plugins directory

Can someone please give an example of the syntax ? I couldn't find any documentation or examples

Code:
import vapoursynth as vs
import havsfunc as haf
core = vs.get_core()

ret = core.lsmas.LWLibavSource(source=r'E:\video.avi', format="YUV420P8")
#ret = core.std.Histogram(ret)
ret.set_output()
Thanks

Last edited by poisondeathray; 27th September 2015 at 00:01.
poisondeathray is offline   Reply With Quote
Old 27th September 2015, 00:06   #2  |  Link
Are_
Registered User
 
Join Date: Jun 2012
Location: Ibiza, Spain
Posts: 321
Code:
import vapoursynth as vs
import havsfunc as haf
core = vs.get_core()

ret = core.lsmas.LWLibavSource(source=r'E:\video.avi', format="YUV420P8")
ret = core.hist.Classic(ret)
ret.set_output()
https://github.com/dubhater/vapoursy...istogram.c#L11

Last edited by Are_; 27th September 2015 at 00:10.
Are_ is offline   Reply With Quote
Old 27th September 2015, 00:25   #3  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,370
Thanks!

Maybe the wrong thread to make a suggestion, but for many new users, I think if some simple examples were given in the documentation it would help. Not everyone knows how to read from the code
poisondeathray is offline   Reply With Quote
Old 27th September 2015, 01:17   #4  |  Link
Are_
Registered User
 
Join Date: Jun 2012
Location: Ibiza, Spain
Posts: 321
Certainly. Anyway, when documentation is too vague or nonexistent you can use this script:
Code:
import os
import vapoursynth as vs


core = vs.get_core()

filepath = "/path/to/somewhere"
filename = "vs_function_list.txt"

info = core.list_functions()

fn = os.path.join(filepath, filename)

os.remove(fn) if os.path.exists(fn) else None

with open(fn, 'a') as f:
    for line in info:
        f.write(line)
It will write a file you can search for reference on namespaces an function names.
From that file:
Code:
name: VapourSynth Histogram Plugin
namespace: hist
identifier: com.nodame.histogram
	Classic(clip:clip)
	Color(clip:clip)
	Color2(clip:clip)
	Levels(clip:clip; factor:float:opt)
	Luma(clip:clip)
Are_ is offline   Reply With Quote
Old 27th September 2015, 09:48   #5  |  Link
jackoneill
unsigned int
 
jackoneill's Avatar
 
Join Date: Oct 2012
Location: 🇪🇺
Posts: 760
Quote:
Originally Posted by poisondeathray View Post
Thanks!

Maybe the wrong thread to make a suggestion, but for many new users, I think if some simple examples were given in the documentation it would help. Not everyone knows how to read from the code
I updated the documentation.
__________________
Buy me a "coffee" and/or hire me to write code!
jackoneill is offline   Reply With Quote
Old 27th September 2015, 15:35   #6  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,370
Thanks guys
poisondeathray is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 13:40.


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