<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div>I'm writing a libAV application in C, and I'm trying to use the<br>av_seek_frame() or avformatseek_file() to move within the video stream.<br>Ideally, I'd like to seek to frame number N. I'd like a subroutine that seeks<br>to frame number N, but I think from previous discussions, that isn't the way<br>things are done in ffmpeg and libav. Okay.<br><br>I'm trying to understand how things actually are done in ffmpeg/libav. When<br>decoding a video file (all my files, for now, are AVI containers with no<br>compression, or ffvhuff compression), the AVFrame struct has several members:<br> pts<br> pkt_pts<br> pkt_dts<br> coded_picture_number<br> display_picture_number<br> best_effort_timestamp (the name of
this one really worries me)<br> pkt_pos<br> pkt_duration<br>What do those all mean? Can I use those to figure out which frame this is?<br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;">Also, AVStream has some members:<br> pts (has 3 components)<br> timebase (2 components)<br> start_time<br> duration<br>What do they mean?<br><br>I have test code and the only thing that seems useful to me is that pkt_pos<br>seems to increase by a very large value for each frame (over 4 million) and the it<br>is usually the same difference between two frames, but not always.<br><br>Anyway,
can someone tell me what the above struct members mean, and how I can<br>use them to tell where each frame is in the overall video file? Thanks.<br></div></div></body></html>