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 7th August 2017, 20:50   #2641  |  Link
lansing
Registered User
 
Join Date: Sep 2006
Posts: 625
I'm trying to append two clips with different resolution, but I'm getting nothing shown in the Vapoursynth editor preview, but there's no error message
Code:
clip = core.std.Splice([clip, clip2], mismatch=1)
Also how do I use the mismatch function in the operator method?
Code:
clip + clip2

Last edited by lansing; 8th August 2017 at 13:32. Reason: typo
lansing is offline   Reply With Quote
Old 7th August 2017, 21:35   #2642  |  Link
blaze077
Registered User
 
Join Date: Jan 2016
Posts: 76
Make sure zoom's not on fixed ratio in VSEdit.
blaze077 is offline   Reply With Quote
Old 7th August 2017, 22:32   #2643  |  Link
lansing
Registered User
 
Join Date: Sep 2006
Posts: 625
Quote:
Originally Posted by blaze077 View Post
Make sure zoom's not on fixed ratio in VSEdit.
Thanks my first problem was solved
lansing is offline   Reply With Quote
Old 8th August 2017, 08:20   #2644  |  Link
lansing
Registered User
 
Join Date: Sep 2006
Posts: 625
Where do I find the list of properties of a frame? For example, I want to get the frame number of a frame. There nothing written in the documentation about this.
lansing is offline   Reply With Quote
Old 8th August 2017, 08:51   #2645  |  Link
blaze077
Registered User
 
Join Date: Jan 2016
Posts: 76
It's all there in the documentation:
FrameNum | FrameProps | SetFrameProp

A frame's properties can be accessed by using the get_frame function along with the props attribute. Like so:
Code:
src.get_frame(num).props.someFrameProperty = someValue
Reference.

Last edited by blaze077; 8th August 2017 at 09:08. Reason: Additional Information
blaze077 is offline   Reply With Quote
Old 8th August 2017, 09:27   #2646  |  Link
lansing
Registered User
 
Join Date: Sep 2006
Posts: 625
Quote:
Originally Posted by blaze077 View Post
It's all there in the documentation:
FrameNum | FrameProps | SetFrameProp

A frame's properties can be accessed by using the get_frame function along with the props attribute. Like so:
Code:
src.get_frame(num).props.someFrameProperty = someValue
Reference.
That still doesn't tell me the list of properties of a frame. The problem I have is that I didn't even know the name. In my example, how do I know the name to call frame number? Is it ".props.frame_number" or ".props.frame_num", or is it "props.framenum"? The reference sure doesn't have them.
lansing is offline   Reply With Quote
Old 8th August 2017, 09:34   #2647  |  Link
TheFluff
Excessively jovial fellow
 
Join Date: Jun 2004
Location: rude
Posts: 931
http://www.vapoursynth.com/doc/apire...ame-properties

I'm not sure if there's a standard for anything else. The props are just a key-value map that can contain anything though so just iterate over the keys and all secrets will be revealed to you. Maybe.
TheFluff is offline   Reply With Quote
Old 8th August 2017, 22:35   #2648  |  Link
lansing
Registered User
 
Join Date: Sep 2006
Posts: 625
Quote:
Originally Posted by TheFluff View Post
http://www.vapoursynth.com/doc/apire...ame-properties

I'm not sure if there's a standard for anything else. The props are just a key-value map that can contain anything though so just iterate over the keys and all secrets will be revealed to you. Maybe.
Thanks, I didn't know that they were listed on that page, I was looking all over the python reference and function reference page.
lansing is offline   Reply With Quote
Old 11th August 2017, 17:24   #2649  |  Link
lansing
Registered User
 
Join Date: Sep 2006
Posts: 625
Hi I have another question, is there a function that can delete a series of ranges of frames? For example, I wanted to delete frame 1-10, 100-200 and 500-600 of a clip.
lansing is offline   Reply With Quote
Old 11th August 2017, 17:26   #2650  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Ikea Chair
Posts: 1,479
Quote:
Originally Posted by lansing View Post
Hi I have another question, is there a function that can delete a series of ranges of frames? For example, I wanted to delete frame 1-10, 100-200 and 500-600 of a clip.
Sure is. Trim and splice.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 12th August 2017, 03:31   #2651  |  Link
HolyWu
Registered User
 
HolyWu's Avatar
 
Join Date: Aug 2006
Location: Taiwan
Posts: 381
DeleteFrames should be easier to use.
HolyWu is offline   Reply With Quote
Old 12th August 2017, 09:39   #2652  |  Link
lansing
Registered User
 
Join Date: Sep 2006
Posts: 625
Quote:
Originally Posted by HolyWu View Post
DeleteFrames should be easier to use.
Can you give an example?
lansing is offline   Reply With Quote
Old 12th August 2017, 15:28   #2653  |  Link
tuanden0
Registered User
 
Join Date: Oct 2016
Posts: 47
I'm new to vapoursynth, Can someone help me?
I need to change this line in Aviysnth with aWarpSharp filter to Vapoursynth with aWarpSharp2.
I haven't used aWarpSharp2 filter with Avisynth yet
Quote:
aWarpSharp(depth=12, thresh=0.2, cm=1)
tuanden0 is offline   Reply With Quote
Old 12th August 2017, 18:52   #2654  |  Link
WolframRhodium
Registered User
 
Join Date: Jan 2016
Posts: 46
Quote:
Originally Posted by tuanden0 View Post
I'm new to vapoursynth, Can someone help me?
I need to change this line in Aviysnth with aWarpSharp filter to Vapoursynth with aWarpSharp2.
I haven't used aWarpSharp2 filter with Avisynth yet
According to pinterf's code


Code:
aWarpSharp(depth=12, thresh=0.2, cm=1)
in Avisynth is (almost) equivalent to

Code:
aWarpSharp2(depth=12, thresh=51, chroma=4)
So in VapourSynth, I think it should be

Code:
last = core.warp.AWarpSharp2(last, depth=12, thresh=51, chroma=0)

Last edited by WolframRhodium; 12th August 2017 at 18:54.
WolframRhodium is offline   Reply With Quote
Old 12th August 2017, 18:55   #2655  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 151
Quote:
Originally Posted by tuanden0 View Post
I'm new to vapoursynth, Can someone help me?
I need to change this line in Aviysnth with aWarpSharp filter to Vapoursynth with aWarpSharp2.
I haven't used aWarpSharp2 filter with Avisynth yet
From aWarpSharp2 readme (avisynth)
Quote:
Original aWarpSharp compatibility:
Mapping from original aWarpSharp parameters:
thresh = thresh*256
blur = blurlevel
depth = depth*blurlevel/2
chroma = 0->2, 1->4, 2->3
Code:
aWarpSharp(depth=12, thresh=0.2, cm=1)
You should change thresh to 51 or 52 in awarpsharp2
__________________
Search and denoise
ChaosKing is offline   Reply With Quote
Old 12th August 2017, 19:00   #2656  |  Link
WolframRhodium
Registered User
 
Join Date: Jan 2016
Posts: 46
Quote:
Originally Posted by lansing View Post
Can you give an example?
I'll use following code in this case:

Code:
frame_list = list(range(1, 10+1)) + list(range(100, 200+1)) + list(range(500, 600+1))
last = core.std.DeleteFrames(last, frame_list)
WolframRhodium is offline   Reply With Quote
Old 12th August 2017, 21:05   #2657  |  Link
lansing
Registered User
 
Join Date: Sep 2006
Posts: 625
Quote:
Originally Posted by WolframRhodium View Post
I'll use following code in this case:

Code:
frame_list = list(range(1, 10+1)) + list(range(100, 200+1)) + list(range(500, 600+1))
last = core.std.DeleteFrames(last, frame_list)
Thanks, this is what I'm looking for.
lansing is offline   Reply With Quote
Old 13th August 2017, 03:15   #2658  |  Link
tuanden0
Registered User
 
Join Date: Oct 2016
Posts: 47
@WolframRhodium, @ChaosKing

Thank You very much
tuanden0 is offline   Reply With Quote
Old 13th August 2017, 04:25   #2659  |  Link
hydra3333
Registered User
 
Join Date: Oct 2009
Location: crow-land
Posts: 435
Quote:
Originally Posted by Myrsloik View Post
R38 is released.

The usual post
Thank you for your great work !

I also appreciate your enabling people to compile their own bits (in my case avisynth_compat.cpp). Beaut !
hydra3333 is offline   Reply With Quote
Old 13th August 2017, 09:45   #2660  |  Link
lansing
Registered User
 
Join Date: Sep 2006
Posts: 625
How do I overlay text on the frame, like showing frame number of every frame? I can only think of this, but it's certainly a wrong way to do it because it ate up all my ram until the program crashed on longer videos.

Code:
for i in range (len(clip)):
	if (i==0):
		sub_clip = core.sub.Subtitle(clip[i], text=str(i))
	else:
		sub_clip += core.sub.Subtitle(clip[i], text=str(i))
lansing 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:24.


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