VideoHelp Forum




+ Reply to Thread
Results 1 to 13 of 13
  1. 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?
    Quote Quote  
  2. Member
    Join Date
    Aug 2010
    Location
    San Francisco, California
    Search PM
    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.
    Quote Quote  
  3. 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.
    Quote Quote  
  4. Member
    Join Date
    May 2014
    Location
    Memphis TN, US
    Search PM
    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
    Quote Quote  
  5. GOP size is mostly irrelevant for concatenating files.
    Quote Quote  
  6. Originally Posted by Djard View Post
    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?
    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
    Quote Quote  
  7. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    Ffmpeg will show all frame with command showinfo include in the script.

    ffmpeg -i myvid.avi -vf showinfo OUTPUT

    ffmpeg -i file.mpg -vf showinfo -an -y test.mp4 > test.txt 2>&1
    Quote Quote  
  8. As suggested by Budman1 ffmpeg (ffprobe) can be used to get information about keyframes - ffprobe can be used with
    Code:
     -skip_frame nokey
    - should speedup whole process.

    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"
    Quote Quote  
  9. Member Bernix's Avatar
    Join Date
    Apr 2016
    Location
    Europe
    Search Comp PM
    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.

    Bernix
    Last edited by Bernix; 14th Jan 2018 at 11:15. Reason: typo
    Quote Quote  
  10. 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.
    Quote Quote  
  11. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    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"
    Image
    [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
    Quote Quote  
  12. 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.
    Quote Quote  
  13. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    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"
    )
    Yeah... Yeah... I know there's a way to pipe it to NUL but none of the methods work on my Windows 7 CMD. Either they say it needs an output file or the pipe fails to work when the program actually tries to get data from it. Maybe someone can show a similar method that uses Nul and pipe successfully but this does work and I've had good luck splitting and concatenating at the keyframe using the Avisynth Trim and the list of times and frames.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!