VideoHelp Forum
+ Reply to Thread
Results 1 to 4 of 4
Thread
  1. Hello,
    Trying to cut certain JAV movies into single scenes without re-encoding files.
    AviDemux software is used [for MP4, MKV] as it's simple and quite reliable and fast.

    Only problem noticed that sometimes, when scene got cut by I frames, it happens that start of video being shifted to previous I frame.
    1) Is this normal in certain cases and can still occur now and then, or mainly should not happen and I'm doing something wrong.

    2) As addition question, is this fine to stop scene on B/P frames instead of I if it looks better ?
    Found info somewhere that I-frames are main ones, and these are critical, and if not used at start, will result in artifacts. While for video ending its not quite important to stick to I frames.
    Quote Quote  
  2. Originally Posted by TempUser_ View Post
    Hello,
    Trying to cut certain JAV movies into single scenes without re-encoding files.
    AviDemux software is used [for MP4, MKV] as it's simple and quite reliable and fast.

    Only problem noticed that sometimes, when scene got cut by I frames, it happens that start of video being shifted to previous I frame.
    1) Is this normal in certain cases and can still occur now and then, or mainly should not happen and I'm doing something wrong.
    avidemux does not distinguish between IDR frames (true keyframes) and "i" frames. ie. If video uses open GOP, you can have problems cutting


    2) As addition question, is this fine to stop scene on B/P frames instead of I if it looks better ?
    Found info somewhere that I-frames are main ones, and these are critical, and if not used at start, will result in artifacts. While for video ending its not quite important to stick to I frames.
    It's ok only when you re-encode, because there are no I/B/P frames anymore, it's all uncompressed then recompressed

    In "copy" mode it's not ok . You can only cut on keyframes. The reason is frames can reference other frames (the current frame might rely on information from other frames). If you cut frames that were relied upon, you get decoded garbage for that GOP section. True keyframes have no references from other frames, they are "self sufficient"
    Quote Quote  
  3. Originally Posted by poisondeathray View Post
    avidemux does not distinguish between IDR frames (true keyframes) and "i" frames. ie. If video uses open GOP, you can have problems cutting
    Thought that AviDemux can understand frame types, and cut these appropriately. Because in app, it actually shows frame type.
    It seems there are even more nitty-gritty details.
    Quote Quote  
  4. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    Just adding a visually example of what PoisonDeathRay has explained in detail, using ffprobe to check a video frames can show what is and isn't a key Frame. In the text below obtained from one of my test videoes, Notice around frame 127 shows an 'I' frame but is missing the key frame Indicator '1' showing a '0' instead.

    No. pts_time dts_time type Frame#
    0 0.000000 0.000000 1 I 0
    1 0.033333 0.033333 0 B 3
    2 0.066667 0.066667 0 B 2

    124 4.133329 4.133329 0 P 121
    125 4.166663 4.166663 0 I 127 0 I instead of 1 I
    126 4.199996 4.199996 0 B 126

    249 8.299992 8.299992 0 P 249
    250 8.333325 8.333325 1 I 250

    As far as cutting the end of a video, You can cut at a 'P' frame PROVIDED nothing after it must be decoded before it can be displayed. Notice below how FFMpeg (used in a lot of cutting/editting programs) will try to handle this by adding an additional 'P' frame with a longer Presentation Time Stamp(PTS). This normally isn't appareent since it is the last frame of the cut, but if you merging something behind it you will see the frozen frame glitch.

    C:\Users\Bud\Desktop\5_0_test.mp4
    UnSuccessful Cut at Frame 492
    16.233317,B
    16.266650,B
    16.299984,B
    16.333317,P
    16.466650,P 0.133333 after preceding frame instead of normal 0.033333
    FPS Duration on final frames too large
    Decreasing Ending Frame to 491

    C:\Users\Bud\Desktop\5_0_test.mp4
    Successful Cut at Frame 491
    16.199984,P
    16.233317,B
    16.266650,B
    16.299984,B
    16.333317,P Normal 0.033333 after preceding frame
    Quote Quote  



Similar Threads

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