VideoHelp Forum




+ Reply to Thread
Results 1 to 5 of 5
  1. How to create a program for accurate work with frames? I need to create a simple program that creates text with a list of frames (numbers) and print their type (I, P, B) for each frame. But I do not know how to start, because I'm not a professional, to understand where to find the right source code file that will help me do it. Or libraries, but how to work with them from source code? Tell me where to find the library for detailed work with the video (source code), or a link to the material that explains how to implement it without third-party libraries / source codes. In c++.
    Quote Quote  
  2. Do you just want the final result? or did you want to actually code it from scratch ?

    I already suggested an "easy" way in your other thread. DGIndex. Tools=>parse d2v . You can save it as a text file.

    It looks like this

    Code:
    D2V Parse Output
    
    Encoded Frame: Display Frames....Flags Byte (* means in 3:2 pattern)
    --------------------------------------------------------------------
    
    [Field Operation None, using flags]
    [GOP: open]
    [Clip is BFF]
    0 [B]: 0,0,1....................1
    1 [B]: 1,2......................2 *
    2 [I]: 2,3,3....................3 *
    3 [B]: 4,4......................0 *
    4 [B]: 5,5,6....................1 *
    5 [P]: 6,7......................2 *
    6 [B]: 7,8,8....................3 *
    7 [B]: 9,9......................0 *
    8 [P]: 10,10,11.................1 *
    9 [B]: 11,12....................2 *
    10 [B]: 12,13,13................3 *
    11 [P]: 14,14...................0 *
    [GOP: open]
    12 [B]: 15,15,16................1 *
    13 [B]: 16,17...................2 *
    14 [I]: 17,18,18................3 *
    .
    .
    .

    Another method is ffprobe ffprobe

    Why did you want the frame type? Again, the frame type has no relationship with field matching or anything. The content is completely independent of the encoding frame type
    Quote Quote  
  3. Originally Posted by poisondeathray View Post
    Do you just want the final result? or did you want to actually code it from scratch ?

    I already suggested an "easy" way in your other thread. DGIndex. Tools=>parse d2v . You can save it as a text file.

    It looks like this

    Code:
    D2V Parse Output
    
    Encoded Frame: Display Frames....Flags Byte (* means in 3:2 pattern)
    --------------------------------------------------------------------
    
    [Field Operation None, using flags]
    [GOP: open]
    [Clip is BFF]
    0 [B]: 0,0,1....................1
    1 [B]: 1,2......................2 *
    2 [I]: 2,3,3....................3 *
    3 [B]: 4,4......................0 *
    4 [B]: 5,5,6....................1 *
    5 [P]: 6,7......................2 *
    6 [B]: 7,8,8....................3 *
    7 [B]: 9,9......................0 *
    8 [P]: 10,10,11.................1 *
    9 [B]: 11,12....................2 *
    10 [B]: 12,13,13................3 *
    11 [P]: 14,14...................0 *
    [GOP: open]
    12 [B]: 15,15,16................1 *
    13 [B]: 16,17...................2 *
    14 [I]: 17,18,18................3 *
    .
    .
    .

    Another method is ffprobe ffprobe

    Why did you want the frame type? Again, the frame type has no relationship with field matching or anything. The content is completely independent of the encoding frame type
    I need everything from scratch, creating a program. But I'm looking for functions for c++, previously implemented, for detailed work with video.
    Last edited by Megafox; 24th Mar 2018 at 15:09.
    Quote Quote  
  4. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    I'm not sure what you exactly want but I may be able to help and you can may be able to help me. I am writing in Visual Basic and .Net and if more info is needed it can easily be added. Do you know C++ language? If not, why does it need to be in C++? If you do, just call the FFMPEGg/FFPROBE programs suggested above and then parse the fields from the resulting files. You will get lists as shown below. Do you need more information on the frames?

    Image
    [Attachment 45022 - Click to enlarge]


    Image
    [Attachment 45023 - Click to enlarge]
    Quote Quote  
  5. The source code of FrameCounter (https://github.com/Selur/FrameCounter) should be easy adjust to archive what you want.
    It's some old Qt C/C++-style source code I wrote some time ago which counts the frame inside a different raw formats.
    You probably need to adjust the 'checkMPEG2FrameType' to differentiate between the different frame types. (http://dvd.sourceforge.net/dvdinfo/mpeghdrs.html)

    Cu Selur

    Ps.: there should be quite a lot sources for this on github and similar.
    users currently on my ignore list: deadrats, Stears555, marcorocchini
    Quote Quote  



Similar Threads

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