Giter VIP home page Giter VIP logo

ffmpeg-compilation's Introduction

FFmpeg 编译

大家都知道,要播放多种格式MP4,MOV, 视频流的rtmp,rtsp,还有直播格式的m3u8,是一件好蛋疼的事情,幸好:

##步骤一般是这样的

  • 1.编译FFmpeg,生成适合arm7,arm7s,arm64等架构的静态库跟源文件
  • 2.把编译好的文件放到项目里面
  • 3.项目是基于KXMovie的直接用OC使用,直接使用的用FFmpeg的C语言API

##但是第一步编译FFmpeg都是好复杂好容易崩溃的事情: 现在好了,有yasm,FFmpeg-iOS-build-script这些大神弄出来的东西帮我们简化工作,直接搞到播放视频,播放直播的任务:

PS:编译后的包大小有189M,太大了,大家按着步骤走也可以运行Demo的

#方法A ###用脚本形式来生成ffmpeg所需要的静态库跟源文件

  • 把FFmpeg-iOS这个包含所有架构的文件添加到kxmovie里,并添加必要的框架

FFmpeg-iOS1

  • 下面是项目需要的框架,不用加少了,特别VideoTool那些

FFmpeg-iOS2

  • 编译运行Demo

    • 蜗壳是本地的,普通网络的

Demo

  • HLS,m3u8结尾的,是凤凰卫视,视频直播

HLS

##可能出现的错误:

#方法B

###官方方法

  • git clone git://github.com/kolyvan/kxtorrent.git kxmovie

  • 配置编译ffmpeg

    • cd kxmovie
    • git submodule update --init
    • rake
    • git submodule update --init超级无敌慢

#参考链接:

ffmpeg-compilation's People

Contributors

sam5-hub 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.