Giter VIP home page Giter VIP logo

jeffm3u8lib's Introduction

JeffM3U8Lib

M3U8视频合并为MP4视频专用库,已经尽量裁减优化,减少包大小,只保留这个功能

  • 尽量将so包裁减到最小了
  • 提供M3U8合成MP4的合成进度
  • 解决了合成过程中的pts和dts异常问题

怎么做裁减优化

  • 明确M3U8合成MP4所需要支持的格式
  • 去掉不用的模块和格式
  • 解决合成过程中的异常问题,主要是pts和dts的异常问题
  • 一些不用的protocols或者decoder可以disable掉

具体参考https://github.com/JeffMony/AndroidFFmpegCompile工程

--disable-gpl \
--disable-doc \
--disable-static \
--disable-x86asm \
--disable-asm \
--disable-symver \
--disable-devices \
--disable-avdevice \
--disable-postproc \
--disable-avfilter \
--disable-avresample \
--disable-ffmpeg \
--disable-ffplay \
--disable-ffprobe \
--disable-programs \
--disable-encoders \
--disable-decoders \
--enable-decoder=h264 \
--enable-decoder=hevc \
--enable-decoder=aac \
--enable-decoder=mp3 \
--disable-muxers \
--enable-muxer=mp4 \
--disable-demuxers \
--enable-demuxer=hls \
--enable-demuxer=mov \
--enable-demuxer=mpegts \
--disable-parsers \
--enable-parser=aac \
--enable-parser=aac_latm \
--enable-parser=ac3 \
--enable-parser=h264 \
--enable-parser=hevc \
--disable-protocols \
--enable-protocol=http \
--enable-protocol=https \
--enable-protocol=crypto \
--enable-protocol=file \
--enable-protocol=hls \
--enable-protocol=tls \
--enable-protocol=tcp \

如何接入这个SDK

目前最新的版本号是1.2.0,如果需要在自己项目中集成,需要做好特定的依赖。
在build.gradle中引入

allprojects {
    repositories {
	    maven { url 'https://jitpack.io' }
	}
}

在你的app中直接引用

dependencies {
    implementation 'com.github.JeffMony:JeffM3U8Lib:1.2.0'
}

如何调用这个SDK

传入的M3U8路径需要是本地文件路径,如何下载这个M3U8文件,可以参考开源项目:
https://github.com/JeffMony/VideoDownloader

VideoProcessManager.getInstance().transformM3U8ToMp4(final String inputFilePath, final String outputFilePath, @NonNull final IVideoTransformListener listener)


public interface IVideoTransformListener {

    void onTransformProgress(float progress);

    void onTransformFailed(Exception e);

    void onTransformFinished();
}

jeffm3u8lib's People

Contributors

jeffmony avatar

Watchers

 avatar

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.