当前位置:网站首页>Win10 compiles ffmpeg (including ffplay)
Win10 compiles ffmpeg (including ffplay)
2022-07-29 05:41:00 【cloud_ yq】
1、 install MSYS2
Win10 build MSYS2 Environmental Science _cloud_yq The blog of -CSDN Blog
2、 compile SDL
SDL It's compilation generation ffplay The basis of , You don't have to generate ffplay Do not compile SDL.
1) Download address :https://www.libsdl.org/download-2.0.php
2) As a result of MSYS2 Compile below , download SDL2-2.0.22.tar.gz - GPG signed This package .
3) Compilation steps
step1、mkdir /usr/local/SDL2 This path is used to store SDL Compiled file , It can be changed ( After the change, other subsequent places should also be modified synchronously )
step2、./configure --prefix=$MSYS2/usr/local/SDL2/ here $MSYS2 To express oneself MSYS2 The installation directory ( It's your own situation ).
step3、make
step4、 make install
After the compilation is successful, it will be in $MSYS2/usr/local/SDL2/ Corresponding library directory ( If it is not generated, you need to carefully check whether there are errors in the above three steps ):

4)、 Record the compilation process and report an error , stay SDL2-2.0.18 and SDL2-2.0.22 Versions have encountered .make Step compilation SDL_windows_gaming_input.c, The error information is as follows :
make: *** [makefile:730: build/sdl_windows_gaming_input.lo] error 1

This is supposed to be windows Define the type and linux There are differences , It needs to be revised SDL_windows_gaming_input.c($MSYS2/home/source/SDL2-2.0.18/src/joystick/windows) file , Add new macro ( Here is the reference SDL issue solve , The path is pasted at the end ). The modification is as follows :
// Add macro
#ifdef __MINGW32__
#define __FIReference_1_int __FIReference_1_INT32
#define __FIReference_1_int_get_Value __FIReference_1_INT32_get_Value
#define __FIReference_1_int_Release __FIReference_1_INT32_Release
#endif
// Source code
struct joystick_hwdata
{
__x_ABI_CWindows_CGaming_CInput_CIRawGameController *controller;
__x_ABI_CWindows_CGaming_CInput_CIGameController *gamecontroller;
__x_ABI_CWindows_CGaming_CInput_CIGameControllerBatteryInfo *battery;
__x_ABI_CWindows_CGaming_CInput_CIGamepad *gamepad;
__x_ABI_CWindows_CGaming_CInput_CGamepadVibration vibration;
UINT64 timestamp;
};3、 compile ffmpeg
1)、 The environment needs to be configured
stay mingw64 Execute the command in the command window :
1、Pacman -S nasm
2、Pacman -S yasm
3、Pacman -S make cmake
4、 Pacman -S diffutils
2)、 Set up SDL2 The Library Directory of
export PATH="/usr/local/SDL2/bin/:$PATH"
3)、ffmpeg Compile instructions
1、./configure --enable-shared --disable-static --enable-debug --enable-sdl2 --extra-cflags='-I/usr/local/SDL2/include/SDL2/' --extra-ldflags='-L/usr/local/SDL2/lib/' --prefix=/home/source/ffmpeg_build/
2、make
3、make installThe library file generated after successful compilation is in /home/source/ffmpeg_build/ Under the table of contents .
4、 Reference article
Windows Compile debuggable ffmpeg, contain ffplay_shizheng163 The blog of -CSDN Blog
compilability of WGI code against MinGW headers · Issue #5589 · libsdl-org/SDL (github.com)
边栏推荐
猜你喜欢

Qtcreator+cmake compiler settings

Wechat applet - screen height

Wapiti是什么以及使用教程

公众号不支持markdown格式文件编写怎么办?

ClickHouse学习(八)物化视图

Wechat applet - component parameter transmission, state management

Merge the same items in the same column in table
![[sword finger offer] - explain the library function ATOI and simulate the realization of ATOI function](/img/13/a506861da2db8f5a5181e6d82894b3.png)
[sword finger offer] - explain the library function ATOI and simulate the realization of ATOI function

Qframe class learning notes

ClickHouse学习(四)SQL操作
随机推荐
[C language series] - string + partial escape character explanation + annotation tips
Wapiti是什么以及使用教程
ClickHouse学习(三)表引擎
365 day challenge leetcode 1000 questions - day 035 one question per day + two point search 13
ClickHouse学习(二)ClickHouse单机安装
Seay源代码审计系统
组件传参与生命周期
【TypeScript】TypeScript中类型缩小(含类型保护)与类型谓词
[sword finger offer] - explain the library function ATOI and simulate the realization of ATOI function
Clickhouse learning (V) cluster operation
MySQL解压版windows安装
Integer overflow and printing
个人学习笔记
Clickhouse learning (x) monitoring operation indicators
Playwright实战案例之爬取js加密数据
nmap是什么以及使用教程
Clickhouse learning (IX) Clickhouse integrating MySQL
Set the background color of a cell in the table
table中同一列中合并相同项
基础爬虫实战案例之获取游戏商品数据