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 11th October 2012, 15:10   #1  |  Link
Chikuzen
typo lover
 
Chikuzen's Avatar
 
Join Date: May 2009
Posts: 595
vsrawsource - Raw Video Reader for VapourSynth

I wrote a VapourSynth plugin named vsrawsource.
vsrawsource-0.3.2.zip

source code repository
https://github.com/chikuzen/vsrawsource

This plugin is the rewrited version of avisynth's rawsource.dll to for VS from scratch.

I am inviting the patch for MacOS X build now.

EDIT:
2013/07/31
updated to 0.3.2
__________________
my repositories

Last edited by Chikuzen; 31st July 2013 at 10:53.
Chikuzen is offline   Reply With Quote
Old 12th October 2012, 00:34   #2  |  Link
active1
Registered User
 
Join Date: Nov 2011
Location: spain
Posts: 45
cool! thank you Chikuzen
i compiled it successfully on linux, but why does the configure script will work only when i run it as root? (sudo sh configure)
active1 is offline   Reply With Quote
Old 12th October 2012, 01:08   #3  |  Link
Chikuzen
typo lover
 
Chikuzen's Avatar
 
Join Date: May 2009
Posts: 595
Quote:
Originally Posted by active1 View Post
cool! thank you Chikuzen
i compiled it successfully on linux, but why does the configure script will work only when i run it as root? (sudo sh configure)
because I forgot to 'chmod +x' to configure
__________________
my repositories
Chikuzen is offline   Reply With Quote
Old 12th October 2012, 19:21   #4  |  Link
kolak
Registered User
 
Join Date: Nov 2004
Location: Poland
Posts: 2,843
Which formats are supported?
kolak is offline   Reply With Quote
Old 12th October 2012, 19:23   #5  |  Link
SassBot
Guest
 
Posts: n/a
To query the list of formats:

Quote:
supported color formats:
see core.raws.FormatList()
  Reply With Quote
Old 13th October 2012, 01:41   #6  |  Link
Chikuzen
typo lover
 
Chikuzen's Avatar
 
Join Date: May 2009
Posts: 595
or see source code.
https://github.com/chikuzen/vsrawsou.../format_list.c
__________________
my repositories
Chikuzen is offline   Reply With Quote
Old 13th October 2012, 16:15   #7  |  Link
kolak
Registered User
 
Join Date: Nov 2004
Location: Poland
Posts: 2,843
Thanks-all clear now
kolak is offline   Reply With Quote
Old 13th October 2012, 23:24   #8  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,547
I looked at the source. It's a bad idea to write to stdout directly. If you want to return text you really should return it as a string value from the function because as it is it won't even interact with the python interpreter nicely.
My personal opinion is that this kind of stuff belongs in the documentation but that's up to you.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 17th October 2012, 12:35   #9  |  Link
Chikuzen
typo lover
 
Chikuzen's Avatar
 
Join Date: May 2009
Posts: 595
Update to 0.2.0

* new option 'rowbytes_align'.
* support Windows Bitmap(.bmp)

BMP support is only for 24bit/32bit uncompressed RGB (palette,RLE and the others are not supported).
__________________
my repositories
Chikuzen is offline   Reply With Quote
Old 2nd November 2012, 13:24   #10  |  Link
Chirico
Guest
 
Posts: n/a
OS X compiled version can be grabbed from here.
  Reply With Quote
Old 14th November 2012, 20:56   #11  |  Link
Robert Martens
Registered User
 
Join Date: Feb 2010
Location: New York
Posts: 116
Just a quick note, it seems that your function registration is looking for parameters named "header_off" and "frame_off":

Code:
...

VS_EXTERNAL_API(void) VapourSynthPluginInit(
    VSConfigPlugin f_config, VSRegisterFunction f_register, VSPlugin *plugin)
{
    f_config("chikuzen.does.not.have.his.own.domain.raws", "raws",
             "Raw-format file Reader for VapourSynth " VS_RAWS_VERSION,
             VAPOURSYNTH_API_VERSION, 1, plugin);
    f_register("Source", "source:data;width:int:opt;height:int:opt;"
               "fpsnum:int:opt;fpsden:int:opt;src_fmt:data:opt;"
               "header_off:int:opt;frame_off:int:opt;rowbytes_align:int:opt",
               create_source, NULL, plugin);
}
Whereas the readme, and your argument setting code, use "off_header" and "off_frame":

Code:
...

vs_args_t va = { in, out, core, vsapi };

    if (header > 0) {
        set_args_int(&rh->vi.width, 720, "width", &va);
        set_args_int(&rh->vi.height, 480, "height", &va);
        set_args_int(&rh->off_header, 0, "off_header", &va);
        set_args_int(&rh->off_frame, 0, "off_frame", &va);
        set_args_int(&rh->row_adjust, 1, "rowbytes_align", &va);
        set_args_data(rh->src_format, "I420", "src_fmt", FORMAT_MAX_LEN, &va);
    }

...
In my quest to get my hands on planar RGB input to test my own plugin, I found the need to use those options, but they don't seem to work as expected, and it looks like it's just a mixup of the names.
Robert Martens is offline   Reply With Quote
Old 14th November 2012, 21:06   #12  |  Link
Chikuzen
typo lover
 
Chikuzen's Avatar
 
Join Date: May 2009
Posts: 595
oops, sorry.
I didn't notice that typo.

It seems that VS-r15 is coming soon and API version is bumped up.
so i'll release new version with fixed it as soon as r15 is come.
__________________
my repositories
Chikuzen is offline   Reply With Quote
Old 14th November 2012, 21:10   #13  |  Link
Robert Martens
Registered User
 
Join Date: Feb 2010
Location: New York
Posts: 116
That's great, thank you! I'm in no rush, mind you, I just wanted to make sure I mentioned it. In the meantime, I've written a little command line application that strips out the headers of the files I'm working with, so I can work around it for as long as I need to. I appreciate your work on this plugin, it's proving to be very useful!
Robert Martens is offline   Reply With Quote
Old 16th November 2012, 02:15   #14  |  Link
Chikuzen
typo lover
 
Chikuzen's Avatar
 
Join Date: May 2009
Posts: 595
updated to 0.3.0

* Alpha channel support
* fix typo

All alpha channel data will be stored in "_Alpha" prop.
You can extract it with 'alpha = core.std.PropToClip(clip)' as a Gray clip.
__________________
my repositories
Chikuzen is offline   Reply With Quote
Old 11th January 2013, 17:52   #15  |  Link
Chikuzen
typo lover
 
Chikuzen's Avatar
 
Join Date: May 2009
Posts: 595
updated to 0.3.1

* change alpha support method.
__________________
my repositories
Chikuzen is offline   Reply With Quote
Old 31st July 2013, 10:54   #16  |  Link
Chikuzen
typo lover
 
Chikuzen's Avatar
 
Join Date: May 2009
Posts: 595
update to 0.3.2

* fix memory leak
* cope with the filename which includes non-ASCII characters
__________________
my repositories
Chikuzen is offline   Reply With Quote
Old 2nd December 2013, 16:55   #17  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,547
New compiles for 64 bit are available here.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 19th June 2015, 10:41   #18  |  Link
feisty2
I'm Siri
 
feisty2's Avatar
 
Join Date: Oct 2012
Location: void
Posts: 2,633
how do I compile this thing exactly?
I followed the instructions
Quote:
$ cd ./vsrawsource
$ ./configure
$ make
and everything went okay actually, no error occurred, I got a 22kb .dll file
and I copied that file along with cygwin1.dll to the plugin directory and tried to run it
and vaporsynth just crashed without any warning
feisty2 is offline   Reply With Quote
Old 19th June 2015, 10:50   #19  |  Link
jackoneill
unsigned int
 
jackoneill's Avatar
 
Join Date: Oct 2012
Location: 🇪🇺
Posts: 760
Quote:
Originally Posted by feisty2 View Post
how do I compile this thing exactly?
I followed the instructions

and everything went okay actually, no error occurred, I got a 22kb .dll file
and I copied that file along with cygwin1.dll to the plugin directory and tried to run it
and vaporsynth just crashed without any warning
Maybe your changes are incorrect and that's why it crashed. (If you're not making any changes, just use the existing DLLs.) Since you have Cygwin, you can probably install gdb and find out more about the crash.

There are no secret compilation instructions that make it not crash. Probably.
__________________
Buy me a "coffee" and/or hire me to write code!
jackoneill is offline   Reply With Quote
Old 19th June 2015, 10:57   #20  |  Link
feisty2
I'm Siri
 
feisty2's Avatar
 
Join Date: Oct 2012
Location: void
Posts: 2,633
I don't know, after failed to run that modified version, I tried to compile Chikuzen's original code, and it still crashed
I'll get gdb and report back soon
feisty2 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 07:21.


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