Dark-Cracker
27th December 2003, 07:07
hi,
does someone know how to get only the hight motion scene ?
in fact i try to made a function who return only the frame who are in the hight scene (for exemple if i use the function with a 500 frames sample while in these 500 frames only 50 frames are an hight scene motion, i want it return me a clip with only 50 frames).
but apparently i am not sure u can only get a part of the clip.
for the moment i use this script :
#----
Video=Mpeg2Source("sceneaction.d2v").trim(100,600)
Video=OnlyHightMotion(video)
Return(Video).Limiter()
function OnlyHightMotion(clip Source)
{
Source=ConvertToYv12(Source)
global Source = Source
global threshold_hm = 5
Slow = blankclip(Source,1)
Hight = Source.subtitle("hight")
Result = Conditionalfilter(Source, Hight, Slow, "0.5*YDifferenceFromPrevious() + 0.25*UDifferenceFromPrevious() + 0.25*VDifferenceFromPrevious()", ">", "threshold_hm", False)
return result
}
#----------
but it return me a black frame for each frame detected as slow or medium scene action :( so at the end i still have a 500 frames lenght clip.
if someone have an idear he is welcome :)
++
does someone know how to get only the hight motion scene ?
in fact i try to made a function who return only the frame who are in the hight scene (for exemple if i use the function with a 500 frames sample while in these 500 frames only 50 frames are an hight scene motion, i want it return me a clip with only 50 frames).
but apparently i am not sure u can only get a part of the clip.
for the moment i use this script :
#----
Video=Mpeg2Source("sceneaction.d2v").trim(100,600)
Video=OnlyHightMotion(video)
Return(Video).Limiter()
function OnlyHightMotion(clip Source)
{
Source=ConvertToYv12(Source)
global Source = Source
global threshold_hm = 5
Slow = blankclip(Source,1)
Hight = Source.subtitle("hight")
Result = Conditionalfilter(Source, Hight, Slow, "0.5*YDifferenceFromPrevious() + 0.25*UDifferenceFromPrevious() + 0.25*VDifferenceFromPrevious()", ">", "threshold_hm", False)
return result
}
#----------
but it return me a black frame for each frame detected as slow or medium scene action :( so at the end i still have a 500 frames lenght clip.
if someone have an idear he is welcome :)
++