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 15th September 2013, 16:24   #941  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
Quote:
Originally Posted by Reel.Deel View Post
I fixed the links. Is there any way to change planar to packed within VS?
If not then I guess I'll create an account over IM to ask if there's a way for IM to correctly accept planar RGB.
Thanks for the help regardless.
No, I try to keep everything planar as much as possible. The easiest way would probably be to write a small program that converts planar rgb48 to packed when it's piped through it.

Btw, the links are still broken. I don't think the files are public in your dropbox.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 15th September 2013, 16:35   #942  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,664
Fair enough. If I find a solution in ImageMagick I'll post it here. Thanks again.

Ok, this time I really fixed the links .
Third times a charm .
Reel.Deel is offline   Reply With Quote
Old 16th September 2013, 04:59   #943  |  Link
SAPikachu
Registered User
 
SAPikachu's Avatar
 
Join Date: Aug 2007
Posts: 218
Quote:
Originally Posted by Reel.Deel View Post
Hello,

I'm trying to pipe RGB48 to ImageMagick in order to create a 16-bit PNG but I'm not having much success.
This is the script I'm using:
Code:
import vapoursynth as vs
core = vs.get_core()
core.std.LoadPlugin(path=r'C:/vsimagereader.dll')

# 16-bit 720X1280 PNG
src = core.imgr.Read(['C:/IMG_0577_720.png'])

# Resize
src = core.fmtc.resample(clip=src, w=360, h=640)

# Output
src.set_output()
The command line I'm using:
Code:
"vspipe.exe" "RGB48 Test.vpy" - | convert -depth 16 -size 360x640 rgb:- "RGB48 Test.png"
The result should look like this, instead I get this.

In the quest for answers I read this thread but I still can't figure it out.
Any help will be greatly appreciated.
You can emulate packed RGBA with GRAY output. Here is a snippet I just tried:
Code:
r = core.std.ShufflePlanes([src], [0], vs.GRAY)
g = core.std.ShufflePlanes([src], [1], vs.GRAY)
b = core.std.ShufflePlanes([src], [2], vs.GRAY)
a = core.std.BlankClip(clip=r, color=[65535])

last = core.std.Interleave([r,b,g,a])# r b g a -> rb ga -> rgba

# Turn right
last = core.std.Transpose(last)
# last = core.std.FlipHorizontal(last) # EDIT: Not needed

last = core.std.DoubleWeave(last, True)
last = core.std.SelectEvery(last, 2, 0)
last = core.std.DoubleWeave(last, True)
last = core.std.SelectEvery(last, 2, 0)

# Turn left
last = core.std.Transpose(last)
# last = core.std.FlipVertical(last) # EDIT: Not needed

last.set_output()
Tested conversion with the following command (note that we have to use rgba instead of rgb):
Code:
"vspipe.exe" test.vpy -  | convert -depth 16 -size 1920x1080 rgba:- test.png
__________________
f3kdb 1.5.1 / MP_Pipeline 0.18

ffms2 builds with 10bit output hack:
libav-9a60b1f / ffmpeg-1e4d049 / FFmbc-0.7.1
Built from ffms2 6e0d654 (hack a9fe004)

Mirrors: http://bit.ly/19TwDD3

Last edited by SAPikachu; 16th September 2013 at 06:40.
SAPikachu is offline   Reply With Quote
Old 16th September 2013, 05:27   #944  |  Link
Chikuzen
typo lover
 
Chikuzen's Avatar
 
Join Date: May 2009
Posts: 595
@SAPikachu
I think that FlipHorizontal/FlipVertical is unneeded.
Just Transpose x 2 is enough.
__________________
my repositories

Last edited by Chikuzen; 16th September 2013 at 17:36.
Chikuzen is offline   Reply With Quote
Old 16th September 2013, 06:41   #945  |  Link
SAPikachu
Registered User
 
SAPikachu's Avatar
 
Join Date: Aug 2007
Posts: 218
Quote:
Originally Posted by Chikuzen View Post
@SAPikachu
I think that FlipHorizontal/FlipVertical is unneeded.
Just Transpose x 2 is enugh.
Yes they are indeed unneeded. I followed advice of Vapoursynth documentation and didn't notice that. Just updated the snippet. Thanks for pointing out this.
__________________
f3kdb 1.5.1 / MP_Pipeline 0.18

ffms2 builds with 10bit output hack:
libav-9a60b1f / ffmpeg-1e4d049 / FFmbc-0.7.1
Built from ffms2 6e0d654 (hack a9fe004)

Mirrors: http://bit.ly/19TwDD3
SAPikachu is offline   Reply With Quote
Old 18th September 2013, 18:24   #946  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
Welcome to the weekly "the project isn't dead" announcement.

Due to wanting to fix some issues properly the x64 builds will be delayed a bit.

Note that the current and past 4 git revisions are broken.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 20th September 2013, 14:51   #947  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,664
@SAPikachu

I've been out of town so I just now tried your solution.
It works as expected. Thank you very much.
Reel.Deel is offline   Reply With Quote
Old 27th September 2013, 13:02   #948  |  Link
aegisofrime
Registered User
 
Join Date: Apr 2009
Posts: 478
Hi!

Sorry if I'm asking in the wrong section. I'm wondering, how do I replicate the rpow2 function of NNEDI3? As far as I understand the VS version of NNEDI3 lacks the rpow2 function. Thanks!
aegisofrime is offline   Reply With Quote
Old 27th September 2013, 16:21   #949  |  Link
jackoneill
unsigned int
 
jackoneill's Avatar
 
Join Date: Oct 2012
Location: 🇪🇺
Posts: 760
Quote:
Originally Posted by aegisofrime View Post
Hi!

Sorry if I'm asking in the wrong section. I'm wondering, how do I replicate the rpow2 function of NNEDI3? As far as I understand the VS version of NNEDI3 lacks the rpow2 function. Thanks!
Yes, it belongs here: http://forum.doom9.org/showthread.php?t=166434.

I'm fairly confident I can add that functionality.
__________________
Buy me a "coffee" and/or hire me to write code!
jackoneill is offline   Reply With Quote
Old 28th September 2013, 08:14   #950  |  Link
aegisofrime
Registered User
 
Join Date: Apr 2009
Posts: 478
Quote:
Originally Posted by jackoneill View Post
Yes, it belongs here: http://forum.doom9.org/showthread.php?t=166434.

I'm fairly confident I can add that functionality.
I searched through that topic but no one asked about rpow2

Thanks, looking forward to it!
aegisofrime is offline   Reply With Quote
Old 1st October 2013, 19:21   #951  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
Here's RC1 for R20.

Report any bugs you find here. I'll post some FrameEval examples later.

Changes:
Code:
r20:
rewrote the ugliest threading code, the locking is now a bit more fine grained in general
added frameeval, a function to allow per frame filter evaluation
blankclip now generates a new frame on every request to keep memory usage down, added the keep argument to optionally always return the same frame
the message handler now takes an extra user data pointer, the handler and data pointer is still per process instead of per core though
added plugin autoloading for linux (jackoneill)
added plugin autoloading for windows, autoloaded plugins for all users go into <installdir>\plugins and per user autoloaded plugins go into <appdata>\vapoursynth\plugins
include the python backtrace in errors when available
fixed a bug in the propagation of filter errors, requesting a frame with an error twice no longer makes vapoursynth hang
fixed the error that happens when avisource is used to open a vs script inside a vs script
added override support to vdecimate (nodame)
added -version option to vspipe and other small fixes
addborders now properly rejects clips where the colorspace can change
addborders and blankclip now properly default to black for all colorspaces
added tdeint propery to the prefetch list_functions
fixed a cache bug that would make caches adapt too slowly/not at all
only output the first 200 slow warnings per avisynth filter
don't prefetch any frames by default for avisynth filters
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 1st October 2013, 21:37   #952  |  Link
Tima
Registered User
 
Join Date: Aug 2004
Location: Russia, Novosibirsk
Posts: 176
Anyone else has RemoveGrain crash when trying to use QTGMC?

[the same was with r19 too]
Tima is offline   Reply With Quote
Old 5th October 2013, 18:22   #953  |  Link
Are_
Registered User
 
Join Date: Jun 2012
Location: Ibiza, Spain
Posts: 321
Long time no testing due to various things and now non of my scripts works :/

I can easily make VS crash with a simple Repari call (0.9 and 1.0).

This script for instance:
Code:
import vapoursynth as vs
core = vs.get_core()

core.avs.LoadPlugin(path=r'DGDecodeNV.dll')
core.avs.LoadPlugin(path=r'RepairSSE2.dll')
core.avs.LoadPlugin(path=r'RemoveGrainSSE2.dll')

src = core.avs.DGSource('01.dgi')

main = core.avs.RemoveGrain(src, 1)
main = core.avs.Repair(main, src, 17)

main.set_output()
Are_ is offline   Reply With Quote
Old 5th October 2013, 19:55   #954  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,664
Just tested with the script Are_ posted, I can confirm the crash with R20 RC1.
Here's the log from VDub.
Reel.Deel is offline   Reply With Quote
Old 6th October 2013, 10:20   #955  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
Quote:
Originally Posted by Reel.Deel View Post
Just tested with the script Are_ posted, I can confirm the crash with R20 RC1.
Here's the log from VDub.
Time to look into it. Let's see what evils these plugins do...
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 6th October 2013, 13:52   #956  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
Here's R20 RC2.

It fixes the avisynth compatibility for filters without prefetching. I also added removegrain and repair to the prefetch list since apparently I forgot them.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 6th October 2013, 20:38   #957  |  Link
Tima
Registered User
 
Join Date: Aug 2004
Location: Russia, Novosibirsk
Posts: 176
RC2 still crashes with RemoveGrain.

VirtualDub log
Tima is offline   Reply With Quote
Old 6th October 2013, 20:42   #958  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
Quote:
Originally Posted by Tima View Post
RC2 still crashes with RemoveGrain.

VirtualDub log
I used the same script Are_ posted (but with blankclip as the source). Does that one crash for you as well now?

If it still crashes, can you send me the exact repair and removegrain dlls you are using?

There are simply too many variations of them for me to find and try all. It's also interesting because it now crashes inside removegrain code and not in vapoursynth like like in reel.deel's log.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet

Last edited by Myrsloik; 6th October 2013 at 20:53. Reason: Clarifications
Myrsloik is offline   Reply With Quote
Old 7th October 2013, 04:41   #959  |  Link
Tima
Registered User
 
Join Date: Aug 2004
Location: Russia, Novosibirsk
Posts: 176
Quote:
Originally Posted by Myrsloik View Post
I used the same script Are_ posted (but with blankclip as the source). Does that one crash for you as well now?

If it still crashes, can you send me the exact repair and removegrain dlls you are using?
I used my own script, similar to Are_'s. It crashes for me with any RemoveGrain version I tried.
Code:
src=r'video-raw\\n01-01.avi'
plugins_avs_custom=r'C:\\Bin\\avisynth_plugins_custom\\'

import vapoursynth as vs
import sys
core = vs.get_core(threads = 1)

core.avs.LoadPlugin(plugins_avs_custom + r'RemoveGrainSSE2.dll')

clip = core.ffms2.Source(src)
clip = core.avs.RemoveGrain(clip, 1)

clip.set_output()
RemoveGrain DLL (correct link)

Last edited by Tima; 7th October 2013 at 16:25. Reason: Correct link for my version of RemoveGrain
Tima is offline   Reply With Quote
Old 7th October 2013, 09:39   #960  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
Quote:
Originally Posted by Tima View Post
I used my own script, similar to Are_'s. It crashes for me with any RemoveGrain version I tried.
Code:
src=r'video-raw\\n01-01.avi'
plugins_avs_custom=r'C:\\Bin\\avisynth_plugins_custom\\'

import vapoursynth as vs
import sys
core = vs.get_core(threads = 1)

core.avs.LoadPlugin(plugins_avs_custom + r'RemoveGrainSSE2.dll')

clip = core.ffms2.Source(src)
clip = core.avs.RemoveGrain(clip, 1)

clip.set_output()
RemoveGrain DLL
You uploaded the wrong dll. Try again.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Reply

Tags
speed, vaporware, vapoursynth

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 17:39.


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