VideoHelp Forum




+ Reply to Thread
Results 1 to 10 of 10
  1. Member
    Join Date
    Jan 2010
    Location
    United States
    Search Comp PM
    I like to encode my movies with --keyint 24. This allows the most robust fowarding, rewinding when streaming to a TV through a media server.

    Is there a utility that I can use to open an mkv and m2ts file that will tell me at what keyframe interval the media was encoded? I have done some searching and cannot find a tool that will give me this.

    Thanks
    Quote Quote  
  2. If the file was encoded with x264, you can use mediainfo (view=>text) to see the encoding settings metadata

    Otherwise you have to parse the file with a stream analyzer e.g. elecard streameye , h264visa . These will tell you the actual frametypes instead of just what the maximum keyframe interval was
    Quote Quote  
  3. Member
    Join Date
    Jan 2010
    Location
    United States
    Search Comp PM
    Thanks thats great. Can anybody tell me the difference between keyint and keyint_min?
    Quote Quote  
  4. --keyint is the maximum interval. The encoder will automatically place a new keyframe once it gets to 24, but that doesn't mean it always occurs at 24. (You can have shorter intervals, because keyframes are dynamically placed. e.g. a quick flash or quick scene changes would produce closely spaced IDR-frames) . --min-keyint is the minimum or shortest interval between IDR frames
    Quote Quote  
  5. Member
    Join Date
    Jan 2010
    Location
    United States
    Search Comp PM
    Thanks, I understand. Can anyone explain something -

    I have just reviewed all my HD m2ts files in MediaInfo. They are all movies that range between 5 and 20 gig in size. The ones that I encoded (or re-encoded) with a keyint of 24 and keyint_min of 13 are very robust when fowarding/rewinding through my media server. The others have the values 250/25 or 240/24 and were encoded by others. They are ok to foward and rewind but nowhere near as good as the 24/13. I would expect that. What I can't explain is why do some of the 250/240 seem to work better than others? If there is a keyframe no more than 250 or 240 frames from each other then I would expect all things being equal that they would perform the same when it comes to foward/rewind/Goto responsiveness. Are there other settings/attributes that factor into this?
    Quote Quote  
  6. There are other factors than max keyframe interval. If you are streaming things like overall bitrate and bitrate distribution (if VBV is used) can affect smoothness of playback or seeks. Huge unbuffered bitrate peaks can cause stuttering and slow seeks (because the device or network is congested; it has to decode all that information. This is similar to the reason why shorter keyframe intervals help with "snappier" seeks: the keyframe and all the frames up to the seek poing must be decoded)
    Quote Quote  
  7. Member
    Join Date
    Jan 2010
    Location
    United States
    Search Comp PM
    My network is solid (gigabit network; cat6 cable; no other traffic during streaming)
    The computer streaming from is solid (I7cpu, 6GB ram, Windows on two RAID-0 SSD drives, Movies on RAID-0 of 2 7200rpm HDD drives; no other computer activity during streaming)

    So if I have 2 90 minute movies; one is 6GB and the other is 12GB you say that with a roughly 10sec max interval the smaller movie is snappier. Why exactly is that? How does seeking work exactly? I thought it just jumps form keyframe to keyframe till you command it to stop. When you seek directly on the computer the keyframe hardly matters. It is almost instantaneous when you drag.

    VBV is max bitrate right? so that factors into how big your encoding will end up right? I am not sure what you mean by huge "unbuffered" birate peaks. Do the encoding settings determine how the device buffers on playback? (Not sure how that works either)
    Quote Quote  
  8. Member PuzZLeR's Avatar
    Join Date
    Oct 2006
    Location
    Toronto Canada
    Search Comp PM
    I agree with PDR.

    This is why there are short GOP requirements AND bitrate caps with blu-ray - to ensure smooth playback and, of course, better navigation. Honestly, can you imagine playing, for example, HD video, using a highly compressed and processor demanding video format on a spinning disc without them?

    Let me also suggest you use --open-gop when working with x264 and shorter GOPs (available in patched versions). I'm sure you've accepted one drawback, ceteris paribus, of shorter GOPs of slightly bigger file size, but be aware of "pulsing", or what I call "shimmering GOPs".

    You may notice on low bitrate, rather static, scenes a slight "twitch" or "throb", a noticeable "oscillation" in short GOP transitions. I find --open-gop takes care of most of them.
    I hate VHS. I always did.
    Quote Quote  
  9. Originally Posted by mario595 View Post
    So if I have 2 90 minute movies; one is 6GB and the other is 12GB you say that with a roughly 10sec max interval the smaller movie is snappier. Why exactly is that?
    12GB movie will have 2x the bitrate. As mentioned earlier, higher bitrates lead to slower seeking because more data to be decoded and transferred. There is still added latency when streaming compared to playing locally

    VBV is max bitrate right? so that factors into how big your encoding will end up right? I am not sure what you mean by huge "unbuffered" birate peaks. Do the encoding settings determine how the device buffers on playback? (Not sure how that works either)
    No, it's not the max bitrate. It's Video buffer verifier. Think of it as a "leaky bucket" model where data comes into a bucket (the buffer), and "drips out" as it plays. So there is an input rate, and an output rate. If you run out of buffer it will stutter (buffer underrun). This is required for most devices to ensure smooth playback

    vbv-maxrate is the rate at which data enters the buffer
    vbv-bufsize is the buffer size

    Using VBV can only harm quality , never improve it (unbuffered video means no restrictions, encoder can allocate whatever it chooses, but may not be compatible with all devices). Use values specific for your device or target. E.g. a mobile phone would use different values than a blu-ray player. Generic values for blu-ray would be --vbv-bufsize 30000 --vbv-maxrate 40000 . But you may need different values for your setup for streaming
    Quote Quote  
  10. Member PuzZLeR's Avatar
    Join Date
    Oct 2006
    Location
    Toronto Canada
    Search Comp PM
    Hi again, we posted roughly the same time.

    Originally Posted by mario595
    VBV is max bitrate right? so that factors into how big your encoding will end up right? I am not sure what you mean by huge "unbuffered" birate peaks. Do the encoding settings determine how the device buffers on playback? (Not sure how that works either)
    VBV is not directly the max bitrate requirements, but implies it since it satisfies buffer requirements first before assigning bitrate. Stricter VBV assignments are required when indeed streaming (or even BD playback) as opposed to the more tolerant hard drive playback.

    I can get into detail, but this link will explain everything much better than I could:
    http://mewiki.project357.com/wiki/X264_Encoding_Suggestions#VBV_Encoding

    "Huge unbuffered bitrate peaks" is simply, in layman's terms, bitrate spurts that are not controlled by a buffer. During the encoding, the encoder does what it wishes on that particular movie segment in bitrate allocation and has no regard for a ceiling, hence, on some scenes alot more bitrate than required may be assigned.

    Originally Posted by mario595
    So if I have 2 90 minute movies; one is 6GB and the other is 12GB you say that with a roughly 10sec max interval the smaller movie is snappier. Why exactly is that? How does seeking work exactly? I thought it just jumps form keyframe to keyframe till you command it to stop. When you seek directly on the computer the keyframe hardly matters. It is almost instantaneous when you drag.
    It depends on the playback medium. If playing from a hard drive it shouldn't matter between the 6GB and 12GB movie but may be an issue on other mediums if the double bitrate is an issue. As well, "snappier" navigation means it's easier to pinpoint a segment without missing by too much. The shorter the GOP, the more accurate the pinpointing. Longer GOPs can create havoc on navigating mechanisms when key frames are far apart.
    I hate VHS. I always did.
    Quote Quote  



Similar Threads

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