GithubHelp home page GithubHelp logo

destroyer716 / ffmpegvideorange2 Goto Github PK

View Code? Open in Web Editor NEW
225.0 1.0 52.0 19.13 MB

android ffmpeg 仿剪映 视频剪辑 预览条 快速抽帧

Java 15.75% C++ 18.60% CMake 0.16% C 52.78% Makefile 0.06% GLSL 0.06% Kotlin 12.60%
android ffmpeg frame mediacodec timeline video

ffmpegvideorange2's Introduction

FFmpegVideoRange2

此项目是android 仿照剪映一些功能,暂时只有预览条的精准快速抽帧显示,以及滑动过程中与播放逐帧显示,我观察了下,基本只有大厂的剪辑软件中会有这样的功能。

网上的一些开源项目中,都仅仅是非精准抽帧或者只是关键帧,有些速度很慢。

本项目抽帧速度已经和快手的快影差不多了,但是比剪映还是要慢一些,大家可以实际对比一下。

demo 需要在内部存储根目录创建一个testVideo目录,将测试视频放到这里

开局一张效果图

image

这是剪映的预览条加载显示的速度效果

image

这是本项目的效果展示

image

image

其中预览条的UI 用的是https://github.com/meitu/VideoTimeLine

项目本身是自己学习音视频的demo,从基本的解码播放器开始一边学习一边写出来的,只支持h264的视频,此项目一点不能直接用于实际项目开发中

仅作为类似功能的参考,欢迎star

ffmpegvideorange2's People

Contributors

destroyer716 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

ffmpegvideorange2's Issues

I/CCodecBufferChannel: [c2.mtk.avc.decoder#6] cannot render buffer without surface

你好,我将PreviewFrameActivity.java及其必要依赖复制到本地项目中运行后发现并没有抽帧画面,调试发现OnGetFrameBitmapCallback接口返回的Bitmap为null。
部分日志如下:

......
E/kzg: **********************:
E/getBitmapBySec: sec: 5000000    presentationTimeUs:1656377   ,extractor.getSampleTime():1689700
I/CCodecBufferChannel: [c2.mtk.avc.decoder#6] cannot render buffer without surface
E/getBitmapBySec: presentationTimeUs: 1689700
E/kzg: **********************:
E/getBitmapBySec: sec: 5000000    presentationTimeUs:1689700   ,extractor.getSampleTime():1733077
I/CCodecBufferChannel: [c2.mtk.avc.decoder#6] cannot render buffer without surface
E/getBitmapBySec: presentationTimeUs: 1733077
E/kzg: **********************:
E/getBitmapBySec: sec: 5000000    presentationTimeUs:1733077   ,extractor.getSampleTime():1766422
I/CCodecBufferChannel: [c2.mtk.avc.decoder#6] cannot render buffer without surface
E/getBitmapBySec: presentationTimeUs: 1766422
E/kzg: **********************:
E/getBitmapBySec: sec: 5000000    presentationTimeUs:1766422   ,extractor.getSampleTime():1799766
I/CCodecBufferChannel: [c2.mtk.avc.decoder#6] cannot render buffer without surface
E/getBitmapBySec: presentationTimeUs: 1799766
D/PipelineWatcher: [0xb400007deea54068] pipelineFull: too many frames in pipeline (19)
E/kzg: **********************:
E/getBitmapBySec: presentationTimeUs: 1833111
D/PipelineWatcher: [0xb400007deea54068] pipelineFull: too many frames in pipeline (19)
E/kzg: **********************:
E/getBitmapBySec: sec: 5000000    presentationTimeUs:1833111   ,extractor.getSampleTime():1866455
D/PipelineWatcher: [0xb400007deea54068] pipelineFull: too many frames in pipeline (19)
I/CCodecBufferChannel: [c2.mtk.avc.decoder#6] cannot render buffer without surface
E/getBitmapBySec: presentationTimeUs: 1866455
D/PipelineWatcher: [0xb400007deea54068] pipelineFull: too many frames in pipeline (19)
E/kzg: **********************:
......

调试跟进到getBitmapBySec中,找到最后为bitmap赋值的分支,发现presentationTimeUs>=secdoRender在控制是否输出图片,于是修改上层调用处的传入参数sec,发现又有图片输出了,但仍然存在上述报错。请问如何解决?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.