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 > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 6th August 2019, 02:23   #1  |  Link
zappa
Registered User
 
zappa's Avatar
 
Join Date: Sep 2018
Posts: 23
Show Frame type (I, P, B) in Avisynth

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
zappa is offline   Reply With Quote
Old 6th August 2019, 02:57   #2  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 7,189
Pretty much all you can do.
Code:
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].
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 6th August 2019 at 15:11.
StainlessS is offline   Reply With Quote
Old 6th August 2019, 03:41   #3  |  Link
videoh
Registered User
 
Join Date: Jul 2014
Posts: 879
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?

Last edited by videoh; 6th August 2019 at 03:44.
videoh is offline   Reply With Quote
Old 14th September 2019, 17:43   #4  |  Link
zappa
Registered User
 
zappa's Avatar
 
Join Date: Sep 2018
Posts: 23
Quote:
Originally Posted by StainlessS View Post
Pretty much all you can do.
Code:
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
zappa is offline   Reply With Quote
Old 16th September 2019, 06:43   #5  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 7,189
Quote:
Originally Posted by videoh View Post
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.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 16th September 2019 at 09:03.
StainlessS is offline   Reply With Quote
Old 16th September 2019, 11:05   #6  |  Link
Groucho2004
►◄
 
Groucho2004's Avatar
 
Join Date: Mar 2006
Location: A wretched hive of scum and villainy
Posts: 4,457
Quote:
Originally Posted by StainlessS View Post
I've never used DGSource.
If you have a compatible NVidia card/chip it's really a no-brainer.
__________________
Groucho's Avisynth Stuff
Groucho2004 is offline   Reply With Quote
Old 16th September 2019, 20:52   #7  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 7,189
Quote:
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)].
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 16th September 2019 at 21:09.
StainlessS is offline   Reply With Quote
Old 16th September 2019, 21:41   #8  |  Link
MeteorRain
結城有紀
 
Join Date: Dec 2003
Location: NJ; OR; Shanghai
Posts: 616
I bought exclusively Nvidia just for using DGNV toolsets XD
MeteorRain is offline   Reply With Quote
Old 16th September 2019, 21:49   #9  |  Link
videoh
Registered User
 
Join Date: Jul 2014
Posts: 879
Quote:
Originally Posted by StainlessS View Post
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.
videoh is offline   Reply With Quote
Old 16th September 2019, 22:42   #10  |  Link
Groucho2004
►◄
 
Groucho2004's Avatar
 
Join Date: Mar 2006
Location: A wretched hive of scum and villainy
Posts: 4,457
Quote:
Originally Posted by StainlessS View Post
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?
__________________
Groucho's Avisynth Stuff
Groucho2004 is offline   Reply With Quote
Old 17th September 2019, 02:28   #11  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 7,189
Quote:
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.

Code:
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)
Quote:
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).
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 17th September 2019 at 02:31.
StainlessS is offline   Reply With Quote
Old 17th September 2019, 02:59   #12  |  Link
videoh
Registered User
 
Join Date: Jul 2014
Posts: 879
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.
videoh is offline   Reply With Quote
Old 17th September 2019, 04:01   #13  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 7,189
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.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 17th September 2019 at 04:30.
StainlessS is offline   Reply With Quote
Old 17th September 2019, 12:57   #14  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 5,638
Quote:
Originally Posted by StainlessS View Post
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, less than 70 € in my country, silent (without coolers), only 30 W (without need extra power).

I can't encode 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
__________________
BeHappy, AviSynth audio transcoder, in Doom9 forums. NicAudio, BassAudio, audio decoders.

Last edited by tebasuna51; 17th September 2019 at 13:47. Reason: add info
tebasuna51 is offline   Reply With Quote
Old 17th September 2019, 13:59   #15  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 7,189
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/jasonev.../#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.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 17th September 2019 at 14:14.
StainlessS is offline   Reply With Quote
Reply

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 07:18.


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