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 ?
Thank you
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 7 of 7
Thread
-
Last edited by zerowalk; 5th Aug 2019 at 19:24.
-
You can also use Win7DSFilterTweaker to make sure that FFDSHOW is picked to decode the codec you are using, with Directshowsource() in Avisynth.
-
If you like Avisynth and just want to see the frame number, timer, and type you can use be code below and just play the AVS file in a media player that supports AVS. (Most do)
I used -atrack -2 because that video has no audio.
Code:FFmpegSource2("C:\Users\Bud\Desktop\trimnmerge\250.mp4", atrack=-2).Crop(0,0,-0,-0) ScriptClip(Last, """Subtitle("[ "+Chr(FFPICT_TYPE)+" ]", size=(Height*56.0/720), align=2)""", after_frame=true) #Subtitle("C:\Users\Bud\Desktop\Test Pattern 2.mp4", x=720, y=560, font="Arial", size=24, text_color=$ff0000, align=3) ShowFrameNumber(scroll=true, x=22, y=200, font="Arial", size=24, text_color=$ff0000) ShowTime(x=84, y=220, font="Arial", size=24, text_color=$ffff80) ShowSMPTE(fps=29.97, x=80, y=240, font="Arial", size=24, text_color=$ffff80)
[Attachment 49749 - Click to enlarge]
If you want a list of frame types and a list of key frames you can use the below CMD file. It is for drag and drop but
by altering line 3 and 4 it can be used as a batch.
Code:setlocal enabledelayedexpansion @echo off ::for %%a in (*.mp4,*.mpg,*.flv) Do ( for %%a in ("%~nx1") Do ( set /a count=0 cd %%~dpa echo frame,media_type,stream_index,key_frame,pkt_pts,pkt_pts_time,pkt_dts,pkt_dts_time,best_effort_timestamp,^ best_effort_timestamp_time,pkt_duration,pkt_duration_time,pkt_pos,pkt_size,^ Width,Height,pix_fmt,sample_aspect_ratio,pict_type,coded_picture_number,display_picture_number,^ interlaced_frame,top_field_first,repeat_pict,color_range,color_space,color_primaries,color_transfer,^ chroma_location > "%%~na_ffprobe.csv" echo No. pts_time type > "%%~na_AllFrames.txt" @echo. > "%%~na_keys.txt" ver > nul" set /a Number=0 ffprobe.exe -v quiet -select_streams v:0 -print_format csv -show_entries frame "%%~nxa" >> "%%~na_ffprobe.csv" for /F "tokens=4,6,18,19 delims=," %%b in ('findstr "video" "%%~na_ffprobe.csv"') do ( set "x=%%b" set "y=%%c" set "z=%%d" set "w=%%e" set "v=%%f" set "u=%%g" set sort=!y:~0,-7! ::if !sort! GEQ 0 if !sort! LEQ 10 echo !count! !y:~0,13! !x! !w:~0,1! >> "%%~na_AllFrames.txt" echo !count! !y:~0,13! !x! !w:~0,1! >> "%%~na_AllFrames.txt" set "key=!w:~0,1!" if !key! == I echo !count! !y:~0,13! !x! !w:~0,1! >> "%%~na_keys.txt" set /a count+=1 set /a ekko=count%%100 if !ekko! EQU 0 echo Frame !count! processed ) ) pause
No. pts_time type
0 0.000000 1 I
1 0.033333 0 B
2 0.066667 0 B
3 0.100000 0 B
4 0.133333 0 P
5 0.166667 0 B
6 0.200000 0 B
7 0.233333 0 B
8 0.266667 0 P
9 0.300000 0 B
250_key frames.txt
0 0.000000 1 I
250 8.333333 1 I
500 16.666667 1 I
750 25.000000 1 I
1000 33.333333 1 I
1250 41.666667 1 I
1500 50.000000 1 I
1750 58.333333 1 I
Similar Threads
-
Potplayer: show frame number
By madbucky in forum Software PlayingReplies: 37Last Post: 13th Jul 2021, 13:33 -
Why frame numbers in VirtualDub and Avisynth different?
By Megafox in forum Newbie / General discussionsReplies: 5Last Post: 15th Sep 2018, 11:56 -
Understanding original frame rate & type for this clip
By Imy in forum Video ConversionReplies: 4Last Post: 16th Apr 2018, 14:26 -
How to Determine Original DVD Frame Rate & Frame Type
By lomaidala in forum Video ConversionReplies: 30Last Post: 3rd Jul 2017, 07:42 -
[avisynth] how to double frame rate?
By marcorocchini in forum Newbie / General discussionsReplies: 6Last Post: 11th Feb 2016, 19:02