View Single Post
Old 16th July 2015, 14:04   #734  |  Link
rocket_robot
Registered User
 
Join Date: Oct 2001
Posts: 16
Quote:
Originally Posted by videofan3d View Post
Sorry, I have no clue what are "myFFInfo", "FFVAR_PREFIX", "FFVideoSource".

Please provide clear specific example what you are doing (and want to do) - then I can check.
Hi, Basically I want to use FRIMsource in AVSPmod, it is a program to preview .AVS scripts.

I use it to compare screenshots of different encodes to the original. Usually with a normal source I would have the following:

Code:
Import("F:\Encodes\FFMS2.avsi")
Import("F:\Encodes\avisynth\plugins\myffinfo.avsi")
LoadPlugin("F:\Encodes\ffms2.dll")
ffvideosource("f:\encodes\00800 - 2 - h264 (left eye), 1080p24.h264")
#crop(0,20,0,-20)
myFFInfo("Source")
myffinfo is a simple script that pops some useful text on the output like frame number and Frame type (I,P or B).

When I swap ffvideosource to FRIMSource, myffinfo does not work, (as expected).

I think myffinfo uses internal Variables passed from ffvideosource like FFVAR_PREFIX and FFPICT_TYPE, as it contains the frame type.

I just wondered if there was anything like FRAME_TYPE available in FRIMSource that I could use to display on the screen.

Thanks for you time.

myffinfo script below

Code:
function myFFInfo(clip c, string "bonusText") {

varprefix = FFVAR_PREFIX
bonusText = default(bonusText, "")

c.frameevaluate("""
        fftempstring = ""
        varprefix = """" + varprefix + """"
        bonusText = """" + bonusText + """"""")

frameevaluate("""fftempstring = fftempstring + "Frame Number: " + string(current_frame) + " of " + string(framecount()) + "\n" """, after_frame=true)
frameevaluate("""fftempstring = fftempstring + "Picture Type: " + chr(eval(varprefix + "FFPICT_TYPE")) + "\n" """, after_frame=true)
frameevaluate("""fftempstring = fftempstring + bonusText """, after_frame=true)

return scriptclip("subtitle(fftempstring, lsp = 1)", after_frame=true)

}
rocket_robot is offline   Reply With Quote