当前位置:网站首页>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 install
The 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)
边栏推荐
- 弹性盒子flex
- 使用微信小程序扫码登录系统PC端web的功能
- Similarities and differences between REM and PX and EM
- TXT 纯文本操作
- nmap是什么以及使用教程
- Display effect of uniapp page title
- Basic concepts of MySQL + database system structure + extended application + basic command learning
- 解决表单校验提示信息不消失问题以及赋值不生效问题
- Detailed explanation of typical application code of C language array - master enters by mistake (step-by-step code explanation)
- Solve the problem that the prompt information of form verification does not disappear and the assignment does not take effect
猜你喜欢
[C language series] - constants and variables that confuse students
QPalette学习笔记
Wechat applet - component parameter transmission, state management
About local variables
ClickHouse学习(六)语法优化
shell基本操作(上)
解决表单校验提示信息不消失问题以及赋值不生效问题
Basic concepts of MySQL + database system structure + extended application + basic command learning
365 day challenge leetcode1000 question - day 036 binary tree pruning + subarray and sorted interval sum + delete the shortest subarray to order the remaining arrays
HCIA-R&S自用笔记(25)NAT技术背景、NAT类型及配置
随机推荐
Solve the problem that the prompt information of form verification does not disappear and the assignment does not take effect
Seay源代码审计系统
Summary of knowledge points related to forms and forms
Clickhouse learning (V) cluster operation
Related knowledge of elastic box
Dynamic sorting of DOM object element blocks in applets
Three handshakes and four waves for the interview summary
弹性盒子flex
About local variables
2022 mathematical modeling competition summer training lecture - optimization method: goal planning
Basic use of redis
Masscan使用教程.
Provincial and urban three-level linkage (simple and perfect)
Clickhouse learning (IV) SQL operation
Merge the same items in the same column in table
虚拟增强与现实第二篇 (我是一只火鸟)
nmap是什么以及使用教程
[typescript] type reduction (including type protection) and type predicate in typescript
Wapiti是什么以及使用教程
【无标题】