Code Monkey home page Code Monkey logo

playerdemo's Introduction

playerdemo

GitHub issues GitHub stars GitHub forks GitHub release Build Status Build Status Build Status language GitHub license

一个视频播放器,开源版 potplayer。
用于学习和交流音视频技术。
欢迎音视频开发爱好者交流相关问题。
https://itisyang.github.io/playerdemo/

简介

  • 使用 FFmpeg-3.4 (x64) 解码,SDL2-2.0.7 (x64) 渲染。
  • 在 Windows 下使用 Qt5.12.x (MinGW x64) 开发。
  • 项目目录下的 .pro 文件,支持在多平台(Windows、Linux、Mac)下 QtCreator 打开编译调试。

playerdemo_play

沟通

  • Issues: 欢迎给我提 issues,关于本项目的问题,请优先提 issues,我会尽量当天回复。

Windows平台编译调试

  1. 下载 FFmpeg、SDL2 动态库,dll放在 bin 目录下,头文件和lib文件替换掉lib文件夹中的内容。(直接从官网下载即可)
    FFmpeg 库下载地址 https://ffmpeg.zeranoe.com/builds/
    SDL2 库下载地址 https://www.libsdl.org/download-2.0.php
  2. 使用 QtCreator 打开 playerdemo.pro。
  3. 编译运行。

Linux平台编译调试

  1. 安装 SDL2相关的开发包 libsdl2-dev。
    sudo apt-get install libsdl2-dev
    
  2. 安装 FFmpeg相关的开发包 libavformat-dev、libavutil-dev、libavcodec-dev、libswscale-dev...
    sudo apt-get install libavformat-dev
    sudo apt-get install libavutil-dev
    sudo apt-get install libavcodec-dev
    sudo apt-get install libswscale-dev
    
  3. 使用 QtCreator 打开 playerdemo.pro。
  4. 编译运行。

Macos平台编译调试

  1. 安装 FFmpeg相关的开发包。

    brew install ffmpeg
    
  2. 使用 QtCreator 打开 playerdemo.pro。

  3. 修改 playerdemo.pro 配置 ffmpeg、SDL2 头文件和库目录。

    # 将下面的路径改为自己设备上的路径
    macx {
        INCLUDEPATH += /usr/local/Cellar/sdl2/2.24.1/include
        LIBS += -L/usr/local/Cellar/sdl2/2.24.1/lib -lSDL2
        INCLUDEPATH += /usr/local/Cellar/[email protected]/5.1.1_1/include
        LIBS += -L/usr/local/Cellar/[email protected]/5.1.1_1/lib -lavcodec -lavdevice -lavfilter -lavformat -lavutil -lswresample -lswscale
    }
    

    通过 brew info ffmpeg 查询 ffmpeg 安装目录
    ffmpeg 安装时会自动安装SDL2依赖,通过 brew info SDL2 查询 SDL2 安装目录

  4. 编译运行。

其他

编译时,注意统一静态库与动态库的版本、位数。若开发环境为64位,库及头文件均要64位。  
tag中的打包版本使用actions打包,不包含ffmpeg和SDL2动态库,后续研究如何一起打包。

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.