View Full Version : Show Frame type (I, P, B) in Avisynth
zappa
6th August 2019, 01:23
Show Frame type (I, P, B) in Avisynth
Hello friends
I wanted to know if there is any other way to see the frame type (I, B, P) in Avisynth apart from these that I mention below.
-FFinfo()
-DGSource("",Show=true)
-Info() ---(this does not show the frame type . but it does show other things)
is there any other way to visualize in avisynth the frame type of the video ?
it would be very good to implement in AVSmod this feature to show the type of frame in the video (I, P, B)
Thank you
StainlessS
6th August 2019, 01:57
Pretty much all you can do.
FN="d:\GetSeq_Test\TEST\tears_of_steel_1080pwebm.webm"
FFVideosource(FN)
SSS=""" Subtitle(String(current_frame,"%.0f] ")+Chr(FFPICT_TYPE)) """
Scriptclip(SSS,After_Frame=True)
Only source filter can ever know the frame type, above FFVideosource exposes this [so that it could be used Programmatically].
videoh
6th August 2019, 02:41
DGSource(...,show=true) will show the frame coding type. Make sure you have the top left corner of the video showing. Why is this not enough for you?
zappa
14th September 2019, 16:43
Pretty much all you can do.
FN="d:\GetSeq_Test\TEST\tears_of_steel_1080pwebm.webm"
FFVideosource(FN)
SSS=""" Subtitle(String(current_frame,"%.0f] ")+Chr(FFPICT_TYPE)) """
Scriptclip(SSS,After_Frame=True)
Only source filter can ever know the frame type, above FFVideosource exposes this [so that it could be used Programmatically].
thanks so much
StainlessS
16th September 2019, 05:43
DGSource(...,show=true) will show the frame coding type. Make sure you have the top left corner of the video showing. Why is this not enough for you?
Good to know, thanks. [I've never used DGSource].
Would not be such a bad thing if DGSource exposed frame type similar to FFVideoSource [something to consider for some future update].
Set some named Global or Local variable [your choice], maybe let user select some prefix to the variable name.
A bit easier if return type Int as FFVideoSource does, string return swallows string memory [at every frame EDIT: unless you know for sure its maximum possible length] and requires messing about with
env->SaveString() for the string variable value, but still need to env->SaveString() for the variable Name [if Global, can do once in constructor so that
you know that the variable name already exists EDIT: or can check for already existing name before setting variable].
EDIT: ApparentFPS() sets some variables for user script use.
Would not be out of order if LSmashSource() did the same too.
Groucho2004
16th September 2019, 10:05
I've never used DGSource.If you have a compatible NVidia card/chip it's really a no-brainer.
StainlessS
16th September 2019, 19:52
If you have a compatible NVidia card/chip
I dont, so thats a no-brainer too :)
[I got an NV GT520 [OEM Palit] which I aint never got to do much, old crappish but small low power 2GB card (29Watts)].
MeteorRain
16th September 2019, 20:41
I bought exclusively Nvidia just for using DGNV toolsets XD
videoh
16th September 2019, 20:49
Would not be such a bad thing if DGSource exposed frame type similar to FFVideoSource [something to consider for some future update]. It already does so for Vapoursynth native use. I could do it for Avisynth+ native. Are there any standard variables that have been used for this?
@MeteorRain
Smart move. ;)
Groucho2004
16th September 2019, 21:42
I got an NV GT520 [OEM Palit] which I aint never got to do much, old crappish but small low power 2GB card (29Watts)].So, why don't you use that one?
StainlessS
17th September 2019, 01:28
Are there any standard variables that have been used for this?
As posted previously in post #2 codeblock, FFPICT_TYPE, Type Int.
Single letter ASCII code for frame type, value as Ord('I'), Ord('P'), ord('B'), for I, P and B frames, cant remember if upper or lowercase. See FFMPEGSource docs, may be more defined, (dont know).
EDIT: Think uppercase, I seem to remember code 73 as 'I' frame.
FN="d:\GetSeq_Test\TEST\tears_of_steel_1080pwebm.webm"
FFVideosource(FN)
SSS=""" Subtitle(String(current_frame,"%.0f] ")+Chr(FFPICT_TYPE)) """
Scriptclip(SSS,After_Frame=True)
So, why don't you use that one?
Guess I just expect it not to work, never has been much use at anything else I've tried.
I got a GT220 as well I think (somewhere).
videoh
17th September 2019, 01:59
Thanks StainlessS. Sounds good.
The 520 is pretty low end these days. No HEVC for example. But it's not totally useless; you can run CUDA filters and it does support 4K AVC.
StainlessS
17th September 2019, 03:01
Thanks, so not a complete loser then :)
The m/c that its in is Small Form Factor, only room for 6 inch card and very power limited (total power 300Watt), max for PCI express is I think 30W so 29 watt is about as hi power as it can take.
tebasuna51
17th September 2019, 11:57
The m/c that its in is Small Form Factor, only room for 6 inch card and very power limited (total power 300Watt), max for PCI express is I think 30W so 29 watt is about as hi power as it can take.
I have only a GT 1030 (https://www.gigabyte.com/uk/Graphics-Card/GV-N1030SL-2GL#kf), less than 70 € in my country, silent (without coolers), only 30 W (without need extra power).
I can't encode (https://developer.nvidia.com/video-encode-decode-gpu-support-matrix) but yes decode until HEVC 4:2:0 12 bit and use DG filters.
EDIT: but the 6 inch card is a hard limit, mine is 7
Maybe this one (https://www.gigabyte.com/Graphics-Card/GV-N1030D5-2GL#kf)
StainlessS
17th September 2019, 12:59
Thanks Teb,
seems that you have to be a little careful with that card (there are two versions, one fast, one not so fast):- https://www.forbes.com/sites/jasonevangelho/2018/07/09/buyer-beware-nvidias-geforce-gt-1030-is-a-grossly-misleading-gpu/#47baa35393d9
The one you point to is of the faster variety (GDDR5)
.
EDIT: @videoh
You might also want to check that resultant variable name (assuming user adjustable in some way), is a legal variable name, ie '_' or alpha for start character, and thereafter digits also allowed.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.