{"id":13466536,"url":"https://github.com/itisyang/playerdemo","last_synced_at":"2025-05-16T12:09:12.707Z","repository":{"id":40432469,"uuid":"101305947","full_name":"itisyang/playerdemo","owner":"itisyang","description":"一个视频播放器，开源版 potplayer ，用于总结播放器开发技术。","archived":false,"fork":false,"pushed_at":"2023-01-29T05:56:48.000Z","size":55095,"stargazers_count":1067,"open_issues_count":16,"forks_count":282,"subscribers_count":33,"default_branch":"master","last_synced_at":"2025-04-12T06:14:51.112Z","etag":null,"topics":["ffmpeg","media-player","player","potplayer","qt-player","sdl2","video","video-player"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/itisyang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-08-24T14:47:21.000Z","updated_at":"2025-04-06T14:42:09.000Z","dependencies_parsed_at":"2023-02-15T21:16:03.088Z","dependency_job_id":null,"html_url":"https://github.com/itisyang/playerdemo","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itisyang%2Fplayerdemo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itisyang%2Fplayerdemo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itisyang%2Fplayerdemo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itisyang%2Fplayerdemo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/itisyang","download_url":"https://codeload.github.com/itisyang/playerdemo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248525138,"owners_count":21118619,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ffmpeg","media-player","player","potplayer","qt-player","sdl2","video","video-player"],"created_at":"2024-07-31T15:00:45.748Z","updated_at":"2025-04-12T06:15:03.748Z","avatar_url":"https://github.com/itisyang.png","language":"C++","funding_links":[],"categories":["C++"],"sub_categories":[],"readme":"# playerdemo\n\n\n[![GitHub issues](https://img.shields.io/github/issues/itisyang/playerdemo.svg)](https://github.com/itisyang/playerdemo/issues)\n[![GitHub stars](https://img.shields.io/github/stars/itisyang/playerdemo.svg)](https://github.com/itisyang/playerdemo/stargazers)\n[![GitHub forks](https://img.shields.io/github/forks/itisyang/playerdemo.svg)](https://github.com/itisyang/playerdemo/network)\n[![GitHub release](https://img.shields.io/github/release/itisyang/playerdemo.svg)](https://github.com/itisyang/playerdemo/releases)\n![Build Status](https://github.com/itisyang/playerdemo/actions/workflows/windows.yml/badge.svg)\n![Build Status](https://github.com/itisyang/playerdemo/actions/workflows/macos.yml/badge.svg)\n![Build Status](https://github.com/itisyang/playerdemo/actions/workflows/ubuntu.yml/badge.svg)\n![language](https://img.shields.io/badge/language-c++-DeepPink.svg)\n[![GitHub license](https://img.shields.io/github/license/itisyang/playerdemo.svg)](https://github.com/itisyang/playerdemo/blob/master/LICENSE)\n\n一个视频播放器，开源版 potplayer。  \n用于学习和交流音视频技术。  \n欢迎音视频开发爱好者交流相关问题。  \nhttps://itisyang.github.io/playerdemo/\n\n## 简介\n- 使用 FFmpeg-3.4 (x64) 解码，SDL2-2.0.7 (x64) 渲染。  \n- 在 Windows 下使用 Qt5.12.x (MinGW x64) 开发。  \n- 项目目录下的 .pro 文件，支持在多平台（Windows、Linux、Mac）下 QtCreator 打开编译调试。  \n\n![playerdemo_play](https://cdn.staticaly.com/gh/itisyang/MyImages@master/images/playerdemo_play.png)\n\n## 沟通\n- Issues: 欢迎给我提 issues，关于本项目的问题，请优先提 issues，我会尽量当天回复。\n\n## Windows平台编译调试\n1. 下载 FFmpeg、SDL2 动态库，dll放在 bin 目录下，头文件和lib文件替换掉lib文件夹中的内容。(直接从官网下载即可)  \n    FFmpeg 库下载地址 [https://ffmpeg.zeranoe.com/builds/](https://ffmpeg.zeranoe.com/builds/)  \n    SDL2 库下载地址 [https://www.libsdl.org/download-2.0.php](https://www.libsdl.org/download-2.0.php)  \n2. 使用 QtCreator 打开 playerdemo.pro。  \n3. 编译运行。  \n\n## Linux平台编译调试  \n1. 安装 SDL2相关的开发包 libsdl2-dev。  \n    ```\n    sudo apt-get install libsdl2-dev\n    ```\n2. 安装 FFmpeg相关的开发包 libavformat-dev、libavutil-dev、libavcodec-dev、libswscale-dev...\n    ```\n    sudo apt-get install libavformat-dev\n    sudo apt-get install libavutil-dev\n    sudo apt-get install libavcodec-dev\n    sudo apt-get install libswscale-dev\n    ```\n3. 使用 QtCreator 打开 playerdemo.pro。  \n4. 编译运行。  \n\n## Macos平台编译调试\n1. 安装 FFmpeg相关的开发包。\n    ```\n    brew install ffmpeg\n    ```\n2. 使用 QtCreator 打开 playerdemo.pro。  \n3. 修改 playerdemo.pro 配置 ffmpeg、SDL2 头文件和库目录。\n    ```\n    # 将下面的路径改为自己设备上的路径\n    macx {\n        INCLUDEPATH += /usr/local/Cellar/sdl2/2.24.1/include\n        LIBS += -L/usr/local/Cellar/sdl2/2.24.1/lib -lSDL2\n        INCLUDEPATH += /usr/local/Cellar/ffmpeg@5.1.1/5.1.1_1/include\n        LIBS += -L/usr/local/Cellar/ffmpeg@5.1.1/5.1.1_1/lib -lavcodec -lavdevice -lavfilter -lavformat -lavutil -lswresample -lswscale\n    }\n    ```\n    *通过 brew info ffmpeg 查询 ffmpeg 安装目录*  \n    *ffmpeg 安装时会自动安装SDL2依赖，通过 brew info SDL2 查询 SDL2 安装目录*  \n\n4. 编译运行。  \n\n## 其他\n\n    编译时，注意统一静态库与动态库的版本、位数。若开发环境为64位，库及头文件均要64位。  \n    tag中的打包版本使用actions打包，不包含ffmpeg和SDL2动态库，后续研究如何一起打包。\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitisyang%2Fplayerdemo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitisyang%2Fplayerdemo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitisyang%2Fplayerdemo/lists"}