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. Domains: forum.doom9.org / forum.doom9.net / forum.doom9.se |
|
|
#3 | Link |
|
Registered User
Join Date: May 2011
Posts: 398
|
you can check clip frame properties if original frame was I, P or B, if source plugin read those:
Code:
n=234
frame_type = clip.get_frame(n).props.get("_PictType")
if frame_type is not None:
print(f'frame number: {n}, frame type: {frame_type.decode("utf-8")}')
|
|
|
|
|
|
#4 | Link | |
|
.
![]() Join Date: Oct 2001
Location: Germany
Posts: 7,860
|
Quote:
ClipInfo might be interesting too. Something like Code:
src = core.bs.VideoSource(source="G:/TestClips&Co/files/test.avi")
def show_frame_type(n, f):
# read the pict type prop, handling both bytes and str
frame_type = f.props.get("_PictType")
if isinstance(frame_type, bytes):
frame_type = frame_type.decode("utf-8")
if frame_type is None:
frame_type = "unknown"
txt = f"Frame: {n} | Type: {frame_type}"
return core.text.Text(src, text=txt)
# FrameEval expects you to return a clip; prop_src gives you 'f' in the callback
clip = core.std.FrameEval(src, eval=show_frame_type, prop_src=src)
Cu Selur Last edited by Selur; 13th September 2025 at 08:02. |
|
|
|
|
![]() |
| Tags |
| frames, keyframes, vapoursynth |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|