[RESOLVED] Any way to select specific frame types (ipb) only? (mostly AVC)

Support forum for DGDecNV
Post Reply
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Any way to select specific frame types (ipb) only? (mostly AVC)

Post by admin »

It's in the binaries area called sparktank.rar. I supported all the video types. Let me know if it works and then I can slipstream it.
DAE avatar
sparktank
Posts: 64
Joined: Thu Mar 28, 2013 5:24 pm
Location: Gotham City

Re: Any way to select specific frame types (ipb) only? (mostly AVC)

Post by sparktank »

Alright, it took a little bit to find clips.

For AVC and VC-1, it works perfectly!

Code: Select all

## VC1 source
LoadPlugin("D:\AVS\dgdecnv_test\DGDecodeNV.dll")
DGSource("G:\Clips\Inception\Inception-test.dgi", show=true)
ConvertToRGB32()

return ScriptClip("""(FFPICT_TYPE==3)
\         ? Last.ImageWriter("E:\Temp\Pics\Inception-3-", 
\                    start=current_frame, end=current_frame, type="png")
\         : Last""", 
\         after_frame=true)
^Giving me only screenshots of B frames in the VC-1 source.

Code: Select all

##AVC source
LoadPlugin("D:\AVS\dgdecnv_test\DGDecodeNV.dll")
DGSource("D:\MakeMKV\DARK_KNIGHT_TRILOGY_BONUS_DISC\00064.dgi", show=true)
ConvertToRGB32()

return ScriptClip("""(FFPICT_TYPE==5)
\         ? Last.ImageWriter("E:\Temp\Pics\TDK-", 
\                    start=current_frame, end=current_frame, type="png")
\         : Last""", 
\         after_frame=true)
^Giving me only screenshots of B frames in the AVC source.

Just trying to work out MPEG sourece, however.
Nvidia GeForce GT 1030 | GPU Caps Viewer
Windows 10 Annversary (x64) | ASVPlus_x64
Region A/R1
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Any way to select specific frame types (ipb) only? (mostly AVC)

Post by admin »

Don't worry, if it works for one it works for all. This is the first time I have set an Avisynth environment variable. ;)

Be aware that there can be some ambiguity if you have soft pulldown that you are honoring. FFMS returns 'U' for that. I return the type of the base frame, i.e., the coded frame whose field is not pulled down in the displayed frame. So be careful with soft pulldown. You're unlikely to want to select such frames for your PNGs, but I thought it was worth mentioning it.

Thank you, sparktank, for your suggestion and your testing. I'll slipstream it tomorrow.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Any way to select specific frame types (ipb) only? (mostly AVC)

Post by admin »

Now I think I should use the character indicators 'I', 'P', and 'B' rather than the numbers, because the numbers are different for different video types. I'll do that before I slipstream it.
User avatar
hydra3333
Posts: 394
Joined: Wed Oct 06, 2010 3:34 am
Contact:

Re: Any way to select specific frame types (ipb) only? (mostly AVC)

Post by hydra3333 »

admin wrote:set an Avisynth environment variable
Just checking on the off chance ... it won't break vapoursynth will it ? :)
I really do like it here.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Any way to select specific frame types (ipb) only? (mostly AVC)

Post by admin »

I don't see why it would. You can test it for us. ;)
DAE avatar
sparktank
Posts: 64
Joined: Thu Mar 28, 2013 5:24 pm
Location: Gotham City

Re: Any way to select specific frame types (ipb) only? (mostly AVC)

Post by sparktank »

:bravo: :bravo: Awesome work!

Yeah, I thought about how it would work on DVD rips, so I'll definitely keep that in mind.


This will open up some new ways to look at things. I vaguely saw a script where you can return only I frames with scriptclip. It depended on FFMS2 largely, so I'll have to hammer it out to work for DGdecNV.

Thanks a bunch for this!
Nvidia GeForce GT 1030 | GPU Caps Viewer
Windows 10 Annversary (x64) | ASVPlus_x64
Region A/R1
DAE avatar
sparktank
Posts: 64
Joined: Thu Mar 28, 2013 5:24 pm
Location: Gotham City

Re: Any way to select specific frame types (ipb) only? (mostly AVC)

Post by sparktank »

:scratch: I wonder if it should be renamed to "DGPIC_TYPE" instead of "FFPIC_TYPE" for sake of clarity, in case someone has ffms2 in their auto-load plugin directory.

And maybe update the document? Those with sorcery skills can eventually start showing their work on the interwebs for more things to do with this.

So far, I am loving this function so much.
Already have over 4K images to siphon through for candidate wallpapers.
Nvidia GeForce GT 1030 | GPU Caps Viewer
Windows 10 Annversary (x64) | ASVPlus_x64
Region A/R1
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Any way to select specific frame types (ipb) only? (mostly AVC)

Post by admin »

I doubt the name matters because people won't be using FFMS2 and DGDecodeNV together.

There is an explanation at the start of the DGSource() section of the manual. Did you miss it or are you referring to something else?

Glad you like it and thanks for the suggestion.
DAE avatar
sparktank
Posts: 64
Joined: Thu Mar 28, 2013 5:24 pm
Location: Gotham City

Re: Any way to select specific frame types (ipb) only? (mostly AVC)

Post by sparktank »

I did miss it. :oops:

That seems to be it. :D
Nvidia GeForce GT 1030 | GPU Caps Viewer
Windows 10 Annversary (x64) | ASVPlus_x64
Region A/R1
Post Reply