how can I discover the GOP parameter value in a video file using either existing linux app or python library?
Thanks!!!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The first step towards the solution is to get information about the frame number, time, is_key_frame information and frame type:
What the command above really does is that it takes an input file and it extracts each frame out of it. When extracting, ffmpeg returns information about the currently processed frame on stderr.
Thus I have redirected the frame output into the /dev/null (otherwise it would save each frame as jpeg) and I redirected stderr to stdout using 2>$1. The rest is trivial, as I used awk to print only the relevant columns.
The second question is – how do I calculate GOP out of this data?