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. |
22nd November 2019, 03:30 | #3641 | Link |
Registered User
Join Date: May 2011
Posts: 321
|
http://www.vapoursynth.com/doc/insta...n-via-pip-pypi says that pip install should be done only after Vapoursynth is installed. So what is it for, or what is the purpose of that PIP installation?
|
23rd November 2019, 13:49 | #3642 | Link |
Registered User
Join Date: Aug 2012
Posts: 203
|
I've reinstalled my whole system so i am now on a clean OS.
Installed Python 3.7.5 for all user (so it is in "C:\Program Files\Python37" ), installed Vapoursynth R48 and it gives me the same error. I've then started debuging and the line that is failing is the PyImport_ImportModule in vapoursynth_api.h, the module returned is NULL. Folder "Lib\site-packages", where i would put my script, is empty, would expect to find file "vapoursynth.pth" and the folder "vapoursynth" (checked in another system with R45), probably is that that is making VSPipe fails? Last edited by MonoS; 26th November 2019 at 21:14. Reason: The correct version of Vapoursynht is R45, not R46 |
23rd November 2019, 21:13 | #3643 | Link |
Registered User
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
|
If both timestamps and module version info is missing (it's missing very often in my experience), what else do we have? The file size will be the only thing left and that isn't very much.
__________________
https://github.com/stax76/software-list https://www.youtube.com/@stax76/playlists |
23rd November 2019, 23:05 | #3644 | Link |
Registered User
Join Date: Dec 2005
Location: Germany
Posts: 1,795
|
We have the hash...
https://github.com/vapoursynth/vsrep...t3dfilter.json
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth VapourSynth Portable FATPACK || VapourSynth Database |
26th November 2019, 21:23 | #3645 | Link | |
Registered User
Join Date: Aug 2012
Posts: 203
|
Quote:
|
|
27th November 2019, 16:28 | #3646 | Link |
Registered User
Join Date: Sep 2018
Posts: 14
|
Code:
core.resize.Bicubic(core.std.BlankClip(format=vs.YUV444PS), format=vs.RGB24, matrix_in=1, primaries_in=1, primaries=1) #errors out (Resize error 3074: invalid colorspace definition (1/2/1 => 0/2/1). May need to specify additional colorspace parameters.) core.resize.Bicubic(core.std.BlankClip(format=vs.YUV444PS), format=vs.RGB24, matrix_in=1, primaries_in=1, primaries=1, transfer_in=1, transfer=1) #works core.resize.Bicubic(core.std.BlankClip(format=vs.YUV444PS), format=vs.RGB24, matrix_in=1) #works |
29th November 2019, 21:25 | #3647 | Link | |
Guest
Posts: n/a
|
Quote:
|
|
29th November 2019, 22:09 | #3648 | Link |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
|
It's useful if you want to install vapoursynth into multiple python environments. The normal installer only lets you choose one.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
4th December 2019, 15:46 | #3649 | Link | |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
|
Quote:
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
|
5th December 2019, 10:58 | #3650 | Link | |
Registered User
Join Date: Sep 2018
Posts: 14
|
Quote:
Again, this isn’t just a hypothetical case of passing these particular arguments to resize manually: When you have a YCbCR clip that has _Primaries other than 2 but _Transfer == 2 (=undefined) and try to convert to RGB (or to preview with VSEdit), vsresize will throw this error: Resize error 3074: invalid colorspace definition (1/2/1 => 0/2/1). May need to specify additional colorspace parameters. This behaviour is likely very confusing to the unsuspecting user (as it was to me), because in theory, matrix is all the colorspace parameters that should be needed for a YUV->RGB conversion. Last edited by Lypheo; 6th December 2019 at 08:10. |
|
18th December 2019, 21:02 | #3651 | Link |
Registered User
Join Date: Apr 2016
Posts: 85
|
Code:
invalid colorspace definition (1/2/1 => 0/2/1) I'm getting the error as well, even though I'm not explicitly using the resize function: Code:
File "script.py", line 329, in write_img print(clip.get_frame(0).props) File "src/cython/vapoursynth.pyx", line 1244, in vapoursynth.VideoNode.get_frame vapoursynth.Error: Resize error: Resize error 3074: invalid colorspace definition (1/2/1 => 0/2/1). May need to specify additional colorspace parameters. |
23rd December 2019, 01:10 | #3652 | Link |
Registered User
Join Date: Jun 2006
Posts: 452
|
Are you converting YUV -> RGB somewhere ? Like writing frames from a YUV-clip to RGB-images using "write_img" ?
You're not running vspipe or any other piping and do not use clip.set_output, are you ? Just plain python.. ? correct ? I guess it's Matrix /Transfer / Primaries. I guess VS is complaining because you're going from matrix=1 (=709) to matrix=0 (=RGB) with undef for Transfer, but 1 for primaries. It would have been no problem if the primaries were also undef (2), but now you 've to specify the other colorspace info as wel. Please correct me if I'm wrong with this. Last edited by Pat357; 23rd December 2019 at 01:42. |
23rd December 2019, 15:28 | #3653 | Link | |
Registered User
Join Date: Apr 2016
Posts: 85
|
Quote:
https://www.mediafire.com/file/gzacc..._h264.mov/file Reproduced the issue in vsedit. This fails: Code:
import vapoursynth as vs core = vs.get_core() clip = core.ffms2.Source(source='bars_h264.mov') clip = core.text.FrameProps(clip) clip.set_output() Code:
import vapoursynth as vs core = vs.get_core() clip = core.ffms2.Source(source='bars_h264.mov') clip = core.text.FrameProps(clip) if clip.get_frame(0).props['_Transfer'] == 2: clip = core.std.SetFrameProp(clip, prop="_Transfer", intval=1) clip.set_output() |
|
23rd December 2019, 15:53 | #3654 | Link |
Registered User
Join Date: Sep 2018
Posts: 14
|
Seems like this is the exact issue I talked about a earlier (or rather a consequence of it), namely zimg requiring the transfer func to be specified too when the primaries are given (even implicitly as frame properties) despite it not being needed at all for the conversion.
|
23rd December 2019, 18:06 | #3655 | Link |
Registered User
Join Date: Feb 2018
Posts: 5
|
Hi,
I want to crop a video into four parts and separate each part into its own video. It would be like: clip.mkv -> Crop Top Left -> clip1.mkv clip.mkv -> Crop Top Right -> clip2.mkv clip.mkv -> Crop Bottom Left -> clip3.mkv ... So far, the cropping seems to be fine, but I don't know how to cut the frames and output multiple files, instead of one. This is my script: Code:
import vapoursynth as vs core = vs.get_core() clip = core.lsmas.LWLibavSource(source=r'clip.mkv') clip = core.std.Trim(clip, 0, 59) clip = core.fmtc.resample(clip, w=600, h=338, css="444", kernel="spline36") clip = core.fmtc.bitdepth(clip, bits=8) h = clip.height h_n = h // 2 clip1 = core.std.CropAbs(clip, x=0, y=0, width=299, height=h_n-0.5) #Top Left clip2 = core.std.CropAbs(clip, x=300, y=0, width=299, height=h_n-0.5) #Top Right clip3 = core.std.CropAbs(clip, x=0, y=h_n+0.5, width=299, height=h_n-0.5) #Bottom Left clip4 = core.std.CropAbs(clip, x=300, y=h_n+0.5, width=299, height=h_n-0.5) #Bottom Right clip = clip1 + clip2 + clip3 + clip4 clip.set_output() |
23rd December 2019, 18:52 | #3656 | Link | |
Registered User
Join Date: Jun 2006
Posts: 452
|
Quote:
Without your workaround, you can still open the .VPY file in anything that understands YUV : VirtualDub, or any mediaplayer like MPC-HC, MPV, FFplay, ... Also encoding works without the work-around as all encoders understand YUV. Last edited by Pat357; 24th December 2019 at 13:07. |
|
24th December 2019, 20:06 | #3657 | Link | |
Registered User
Join Date: Sep 2007
Posts: 5,345
|
Quote:
Another approach would be to tag all 3 matrix/transfer/primaries . Note that was a change in Resolve 16.x behavior from previous . Older versions tagged all 3 by default. There is some discussion about this on the Resolve forum, and you can see it tags differently depending on the timeline settings https://forum.blackmagicdesign.com/v...?f=21&t=101253 Or you can also do it afterwards , for AVC, HEVC, or Prores with ffmpeg bitstream filters without re-encoding . But there isn't one for DNxHD/DNxHR https://ffmpeg.org/ffmpeg-bitstream-...4_005fmetadata https://ffmpeg.org/ffmpeg-bitstream-...c_005fmetadata https://ffmpeg.org/ffmpeg-bitstream-...s_005fmetadata |
|
24th December 2019, 21:11 | #3658 | Link | |
Registered User
Join Date: Apr 2016
Posts: 85
|
Quote:
I've occasionally used BBC's tool as well: https://github.com/bbc/qtff-parameter-editor |
|
26th December 2019, 07:34 | #3659 | Link |
Registered User
Join Date: Oct 2001
Location: Germany
Posts: 7,259
|
Can someone with MSVC 2017 or 2019 compile a static version of https://github.com/sekrit-twc/EdgeFixer which does not rely on tons of dlls like the currently linked version in the release section?
-> Problem solved: seems like something with my Windows installation was 'off' Last edited by Selur; 27th December 2019 at 14:06. |
26th December 2019, 19:26 | #3660 | Link |
Registered User
Join Date: May 2011
Posts: 321
|
Not sure if I understand, do you want to encode each cropped clip separately?
You can use vspipe --outputindex to specify what output to process Code:
import vapoursynth as vs from vapoursynth import core clip = core.lsmas.LWLibavSource(source=r'clip.mkv') clip = core.std.Trim(clip, 0, 59) clip = core.resize.Bicubic(clip, 600,340) new_resolution = (clip.width/2, clip.height/2) clip1 = core.std.CropAbs(clip, *new_resolution, top=0, left=0, ) #Top Left clip2 = core.std.CropAbs(clip, *new_resolution, top=0, left=clip.width/2) #Top Right clip3 = core.std.CropAbs(clip, *new_resolution, top=clip.height/2, left=0) #Bottom Left clip4 = core.std.CropAbs(clip, *new_resolution, top=clip.height/2, left=clip.width/2) #Bottom Right clip1.set_output(1) clip2.set_output(2) clip3.set_output(3) clip4.set_output(4) clip = clip1 + clip2 + clip3 + clip4 clip.set_output() #if not stated , default is zero: clip.set_output(0) vspipe --y4m your_script.vpy - | ffmpeg -f yuv4mpegpipe .. ....default is output zero vspipe --outputindex 1 --y4m your_script.vpy - | ffmpeg -f yuv4mpegpipe ....... for clip1 vspipe --outputindex 2 --y4m your_script.vpy - | ffmpeg -f yuv4mpegpipe ....... etc for each output odd video dimensions cannot be used here, it has to be at least even, (mod 2). In Vapoursynth it depends on video subsampling. |
Tags |
speed, vaporware, vapoursynth |
Thread Tools | Search this Thread |
Display Modes | |
|
|