Mediainfo is a useful tool but sorely lacks the ability to determine the keyframe interval of a movie. I did not see such a feature in GSpot, either. So apart from counting the frames between I-frames in an app like the excellent AVIdemux, is there an app that that is more comprehensive and determines the size of a GOP?
+ Reply to Thread
Results 1 to 13 of 13
-
Djard
medfaith@yahoo.com -
If you Shift-Right or Shift-Left in VirtualDub, you will navigate to the next or previous keyframe. The frame number is normally displayed below the timeline.
-
Thanks for your kind reaponse. I did not know VD supported Matroska and MP4 files. I'll search for the plugin. What I would really like is an app that will give me the M and N values of the GOP. Getting info about the GOP structure would be a bonus. AVIdemux identifies the frame types, but you must note them one at a time (sigh!).
When concatenating files, I often find the need to recode them to ensure identical parameters. The resolution and DAR are easily determined, but other info, like the GOP size, is a challenge. Matching the keyframe interval seems to help (no AV asynchrony or pixalization and smooth scrolling).
I found that GSpot does give some info about I-frame intervals but so frequently leaves those fields blank.Djard
medfaith@yahoo.com -
If you use a smart-rendering app you don't have to re-encode.
http://tmpgenc.pegasys-inc.com/en/product/tmsr5.html- My sister Ann's brother -
It is often variable (keyframes inserted on scene change when encoding). In VDFM there is command Edit->Markers from keys. It lets me see all keyframes immediately but this is only usable with short movies
-
As suggested by Budman1 ffmpeg (ffprobe) can be used to get information about keyframes - ffprobe can be used with
Code:-skip_frame nokey
Code:@ffprobe -hide_banner -v 32 -stats -y -skip_frame nokey -i "%1" -select_streams v:0 -print_format compact -show_entries "frame=key_frame,pkt_pts_time" > "%~n1_.txt"
-
As pointed above, ffprobe really works great, but what do you needed to know to use same settings about keyframes? Scene cut settinss and many more (most of them you can get with Mediainfo) In case somebody changed usual settings i.e. Keyint to <> 10xfps and similar, scenecut is usually also on its recommended settings.
Mediainfo gives you basic but i think for you important keyint=250 / min-keyint=25 (copy from random file) it means at fps 25 keyint (max keyframe interval 10xfps) min-keyin minimal keyframe interval usually equal to fps.
You will find it in Mediainfo text form on the longest line.
Somebody corrects me if iam as usually wrong.
BernixLast edited by Bernix; 14th Jan 2018 at 11:15. Reason: typo
-
I merged some files together using AVIDemux, not minding keyframes. Each merge suffered issues. So I joined them from I-frames without any issues... doubtful that was a cooincidence. Some files I had to recode and found that apps like ConvertXtoDVD do not like video if the specifications differ, so I use XMediaRecode to match the parameters, hence the need to identify the keyframe intervals. It is annoying to have MPC play a converted compilation (IFOs, VOBs) properly then find that the audio was lost after burning to disk, using MPC for both tasks.
Maybe I'm overdoing it, and only the frame size matters when merging files; but joining at the I-frame surely beats time-consuming trial and error, even with re-writable disks to avoid waste of media. I know I lose a tad of video quality recoding, but what else can one do? I have Corel Video Studio Pro 10 but cannot get it to mux/demux losslessly: it wants to recode.
Another thing I learned is that AVIDemux fails to mux MP4 in an MKV container if the audio has been edited with Audacity and saved as M4A (AAC)...yeah, I tried renaming the extension to AAC. But MKVToolNix multiplexes the two perfectly. Tool bad MKVToolNix does not offer a preview window.Djard
medfaith@yahoo.com -
If you just wish to display keyframes and their times you can use:
Code:"C:\{PathToFFmpeg}\ffmpeg.exe" -i "C:\{PathToVideo}\Frame.mpg" -vf select="eq(pict_type\,PICT_TYPE_I)" -vsync 2 -f null NUL -loglevel debug 2>&1| for /f "tokens=4,8,9 delims=. " %d in ('findstr "pict_type:I"') do echo %d %e.%f>>"C:\{PathToGeneratedTextFile}\KeyFrames.txt"
[Attachment 44423 - Click to enlarge]
You should receive a text file as hown below. To display other types just substitute 'B' or 'P' for the 'I' in PICT_TYPE_I and pict_type:I
There may be a way to show all at once but I haven't found it yet.
n:1 t:0.040000
n:2 t:0.080000
n:3 t:0.120000
n:4 t:0.160000
n:5 t:0.200000
n:6 t:0.240000
n:7 t:0.280000
n:8 t:0.320000
n:9 t:0.360000
n:15 t:0.600000
n:18 t:0.720000
n:21 t:0.840000
n:24 t:0.960000
n:27 t:1.080000 -
Yikes! The script is something I will need to study as such commands are beyond my comprehension. Thsnks for sharing the valuable info. I'll use the clipboard to past the string. Thanks.
Djard
medfaith@yahoo.com -
if you are actually going to do a conversion (or if you don't mind waiting, slower) you can use:
Code:for %%a in (*.mpg,*.MP4) Do ( ffmpeg -i %%a -vf showinfo "info%%~nxa" > info.txt 2>&1 for /F "tokens=5,8,16 delims= " %%b in ('findstr /I "type:" info.txt') do ( @echo frame no. %%b %%c %%d >> %%~nainfo.txt ) del "info%%~nxa" del "info.txt" )
Similar Threads
-
Professional desktop app similar to Boomerang app? (Looping GIF)
By savvyguy in forum Newbie / General discussionsReplies: 5Last Post: 8th Jan 2017, 03:08 -
how to create 3s picture pause at 30s intervals of a video with ffmpeg
By rey1 in forum EditingReplies: 2Last Post: 20th May 2016, 09:10 -
New framerate 24.000384 that make the sound resync at intervals on tsmuxer
By tnt83 in forum Video ConversionReplies: 1Last Post: 30th Dec 2015, 07:56 -
utility to show keyframe, p, b frames intervals
By cpliu in forum Newbie / General discussionsReplies: 6Last Post: 14th Aug 2014, 04:57 -
For research, I need software to play videos in one-second intervals
By Rckeller093 in forum EditingReplies: 12Last Post: 24th Mar 2014, 18:34