Skip to content

Instantly share code, notes, and snippets.

@Davidj361
Last active September 1, 2021 23:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Davidj361/df582b73506708971815da4e1ed31aec to your computer and use it in GitHub Desktop.
Save Davidj361/df582b73506708971815da4e1ed31aec to your computer and use it in GitHub Desktop.
double fileDuration = ifmt_ctx->duration * av_q2d(AV_TIME_BASE_Q);
double pktPts = pkt.pts * av_q2d(ifmt_ctx->streams[pkt.stream_index]->time_base);
int64_t prog = ceil((pktPts / fileDuration) * 100);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment