有没有办法让Android上的视频帧的总数? [英] Is there a way to get the total number of video frames on Android?

查看:1120
本文介绍了有没有办法让Android上的视频帧的总数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前解压,解码,编辑和重新编码的视频在Android上使用Media codeC和MediaExtractor在Android上。在这个过程中,我想给用户的进展的一些信息。我已经计数多少帧是如何提取,德codeD和连接codeD。为了计算一百分比和向用户展示的过程多远是,我需要的原始流中的帧的总数。但是,我无法找到在MediaExtractor的方法。

I am currently extracting, decoding, editing and re-encoding a video on Android using MediaCodec and MediaExtractor on Android. In the course of this process I would like to give users some information on the progress. I am already counting how many frames were extracted, decoded and encoded. In order to compute a percentage and to show users how far the process is, I would need the total number of frames in the original stream. However, I am unable to find a method in the MediaExtractor.

有谁知道我怎样才能得到一个视频帧的总数之前,我开始解压?

Does anybody know how I can get the total number of frames in a video before I start extracting?

推荐答案

您可以使用影片总长度和当前帧时间戳显示进度

you can use total video duration and current frame timestamp to show the progress

有关总帧数没有API可在MediaExtractor

no API for total frames is available in MediaExtractor

这篇关于有没有办法让Android上的视频帧的总数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆