On Sun, Sep 15, 2013 at 11:37 PM, James Board <jpboa...@yahoo.com> wrote: > I'm writing a libAV application in C, and I'm trying to use the > av_seek_frame() or avformatseek_file() to move within the video stream. > Ideally, I'd like to seek to frame number N. I'd like a subroutine that > seeks > to frame number N, but I think from previous discussions, that isn't the way > things are done in ffmpeg and libav. Okay. > > I'm trying to understand how things actually are done in ffmpeg/libav. When > decoding a video file (all my files, for now, are AVI containers with no > compression, or ffvhuff compression), the AVFrame struct has several > members: > pts > pkt_pts > pkt_dts > coded_picture_number > display_picture_number > best_effort_timestamp (the name of this one really worries me) > pkt_pos > pkt_duration > What do those all mean? Can I use those to figure out which frame this is? > > Also, AVStream has some members: > pts (has 3 components) > timebase (2 components) > start_time > duration > What do they mean? > > I have test code and the only thing that seems useful to me is that pkt_pos > seems to increase by a very large value for each frame (over 4 million) and > the it > is usually the same difference between two frames, but not always. > > Anyway, can someone tell me what the above struct members mean, and how I > can > use them to tell where each frame is in the overall video file? Thanks. >
Try looking at the documentation in the header files, in this case avcodec.h. It should help you quite a bit. _______________________________________________ Libav-user mailing list Libav-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/libav-user