
Recherche avancée
Médias (1)
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (112)
-
Configurer la prise en compte des langues
15 novembre 2010, parAccéder à la configuration et ajouter des langues prises en compte
Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...) -
Déploiements possibles
31 janvier 2010, parDeux types de déploiements sont envisageable dépendant de deux aspects : La méthode d’installation envisagée (en standalone ou en ferme) ; Le nombre d’encodages journaliers et la fréquentation envisagés ;
L’encodage de vidéos est un processus lourd consommant énormément de ressources système (CPU et RAM), il est nécessaire de prendre tout cela en considération. Ce système n’est donc possible que sur un ou plusieurs serveurs dédiés.
Version mono serveur
La version mono serveur consiste à n’utiliser qu’une (...) -
Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs
12 avril 2011, parLa manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras.
Sur d’autres sites (6698)
-
Unable to integrate ffmpeg as a native dependency for an Android NDK project
28 février 2019, par mmarkI have an Android NDK project which consists entirely of C/C++ code, and it basically processes images without using any external libraries.
I’m using Android Studio + Gradle NDK Experimental plugin (0.7.0-alpha1).
Now, I need to integrate ffmpeg as a native library to use it from the C/C++ code in order to decode a H.264 video frame.
These are the questions I’ve found here regarding this issue :
Android - Integrating ffmpeg and android-ndk-r9c
Android NDK w/ ffmpeg library - error running project
Using FFmpeg native libraries with Android-NDK
Can not build with prebuilt static libraries using gradle-experimental
Here is my build.gradle file :
apply plugin: 'com.android.model.application'
def ffmpeg_path = file(project(':ffmpeg').projectDir).absolutePath + "/ffmpeg-android"
model {
repositories {
libs(PrebuiltLibraries) {
libavcodec {
headers.srcDir "${ffmpeg_path}/include"
binaries.withType(StaticLibraryBinary) {
staticLibraryFile = file("${ffmpeg_path}/${targetPlatform.getName()}/lib/libavcodec.a")
}
}
libavutil {
headers.srcDir "${ffmpeg_path}/include"
binaries.withType(StaticLibraryBinary) {
staticLibraryFile = file("${ffmpeg_path}/${targetPlatform.getName()}/lib/libavutil.a")
}
}
libswresample {
headers.srcDir "${ffmpeg_path}/include"
binaries.withType(StaticLibraryBinary) {
staticLibraryFile = file("${ffmpeg_path}/${targetPlatform.getName()}/lib/libswresample.a")
}
}
libswscale {
headers.srcDir "${ffmpeg_path}/include"
binaries.withType(StaticLibraryBinary) {
staticLibraryFile = file("${ffmpeg_path}/${targetPlatform.getName()}/lib/libswscale.a")
}
}
libavformat {
headers.srcDir "${ffmpeg_path}/include"
binaries.withType(StaticLibraryBinary) {
staticLibraryFile = file("${ffmpeg_path}/${targetPlatform.getName()}/lib/libavformat.a")
}
}
libavdevice {
headers.srcDir "${ffmpeg_path}/include"
binaries.withType(StaticLibraryBinary) {
staticLibraryFile = file("${ffmpeg_path}/${targetPlatform.getName()}/lib/libavdevice.a")
}
}
libavfilter {
headers.srcDir "${ffmpeg_path}/include"
binaries.withType(StaticLibraryBinary) {
staticLibraryFile = file("${ffmpeg_path}/${targetPlatform.getName()}/lib/libavfilter.a")
}
}
libpostproc {
headers.srcDir "${ffmpeg_path}/include"
binaries.withType(StaticLibraryBinary) {
staticLibraryFile = file("${ffmpeg_path}/${targetPlatform.getName()}/lib/libpostproc.a")
}
}
}
}
android {
compileSdkVersion = 23
buildToolsVersion = "23.0.2"
defaultConfig.with {
applicationId = "com.example.hellojni"
minSdkVersion.apiLevel = 4
targetSdkVersion.apiLevel = 23
}
}
/*
* native build settings
*/
android.ndk {
moduleName = "hello-jni"
platformVersion = 9 //same as minSdkVersion.apiLevel for better compatibility
stl = "c++_static"
abiFilters.addAll(["armeabi", "armeabi-v7a", "x86"]) //filtering ABIs on the ones Google Play Games library is compatible with.
}
android.buildTypes {
release {
minifyEnabled = false
proguardFiles.add(file('proguard-rules.txt'))
}
}
android.sources {
main {
jni {
dependencies {
library "libavcodec" linkage "static"
library "libavutil" linkage "static"
library "libswresample" linkage "static"
library "libswscale" linkage "static"
library "libavformat" linkage "static"
library "libavdevice" linkage "static"
library "libavfilter" linkage "static"
library "libpostproc" linkage "static"
}
}
}
}
}I based on this sample from Google which integrates an external native library.
This is the ffmpeg project I compiled before importing it into mine :
https://github.com/WritingMinds/ffmpeg-androidI’ve added all the .a and .h files and I’m able to import the headers in my C/C++ code, but when I try to compile it I get the following error :
/Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(utils.o):utils.c:function try_decode_frame: error: undefined reference to 'avpriv_h264_has_num_reorder_frames'
/Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(utils.o):utils.c:function compute_pkt_fields: error: undefined reference to 'avpriv_h264_has_num_reorder_frames'
/Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(utils.o):utils.c:function parse_packet: error: undefined reference to 'av_parser_parse2'
/Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(utils.o):utils.c:function parse_packet: error: undefined reference to 'av_parser_close'
/Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(utils.o):utils.c:function read_frame_internal: error: undefined reference to 'av_parser_init'
/Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(utils.o):utils.c:function avformat_find_stream_info: error: undefined reference to 'av_parser_init'
/Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(utils.o):utils.c:function avformat_find_stream_info: error: undefined reference to 'avcodec_pix_fmt_to_codec_tag'
/Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(utils.o):utils.c:function avformat_find_stream_info: error: undefined reference to 'avpriv_get_raw_pix_fmt_tags'
/Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(utils.o):utils.c:function ff_stream_add_bitstream_filter: error: undefined reference to 'av_bitstream_filter_init'
/Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(utils.o):utils.c:function ff_stream_add_bitstream_filter: error: undefined reference to 'av_bitstream_filter_close'
/Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(utils.o):utils.c:function av_apply_bitstream_filters: error: undefined reference to 'av_bitstream_filter_filter'
/Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(aadec.o):aadec.c:function aa_read_packet: error: undefined reference to 'av_tea_init'
/Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(aadec.o):aadec.c:function aa_read_packet: error: undefined reference to 'av_tea_crypt'
/Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(aadec.o):aadec.c:function aa_read_header: error: undefined reference to 'av_tea_alloc'
/Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(aadec.o):aadec.c:function aa_read_header: error: undefined reference to 'av_tea_init'
/Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(aadec.o):aadec.c:function aa_read_header: error: undefined reference to 'av_tea_crypt'
/Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(ac3dec.o):ac3dec.c:function ac3_eac3_probe.isra.0: error: undefined reference to 'avpriv_ac3_parse_header'
/Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(adtsenc.o):adtsenc.c:function adts_write_header: error: undefined reference to 'avpriv_mpeg4audio_get_config'
/Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(adtsenc.o):adtsenc.c:function adts_write_header: error: undefined reference to 'avpriv_copy_pce_data'
/Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(asfcrypt.o):asfcrypt.c:function ff_asfcrypt_dec: error: undefined reference to 'av_rc4_alloc'
/Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(asfcrypt.o):asfcrypt.c:function ff_asfcrypt_dec: error: undefined reference to 'av_rc4_init'
/Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(asfcrypt.o):asfcrypt.c:function ff_asfcrypt_dec: error: undefined reference to 'av_rc4_crypt'
/Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(asfcrypt.o):asfcrypt.c:function ff_asfcrypt_dec: error: undefined reference to 'av_rc4_init'
/Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(asfcrypt.o):asfcrypt.c:function ff_asfcrypt_dec: error: undefined reference to 'av_rc4_crypt'
/Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(matroska.o):matroska.c:function ff_mkv_stereo3d_conv: error: undefined reference to 'av_stereo3d_alloc'
/Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(nut.o):nut.c:function ff_nut_add_sp: error: undefined reference to 'av_tree_node_alloc'
/Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(nut.o):nut.c:function ff_nut_add_sp: error: undefined reference to 'av_tree_insert'
/Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(nut.o):nut.c:function ff_nut_free_sp: error: undefined reference to 'av_tree_enumerate'
/Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(nut.o):nut.c:function ff_nut_free_sp: error: undefined reference to 'av_tree_destroy'
Error:error: ld returned 1 exit status
Error:Execution failed for task ':app:linkHello-jniArmeabi-v7aDebugSharedLibrary'.
> A build operation failed.
Linker failed while linking libhello-jni.so.
See the complete log at: file:///Users/marcos/Documents/Android/fdecoder/app/build/tmp/linkHello-jniArmeabi-v7aDebugSharedLibrary/output.txt
Information:BUILD FAILED
Information:Total time: 14.993 secs
Information:2 errors
Information:0 warnings
Information:See complete output in consoleThere’s obviously something I’m not importing properly, but can’t figure exactly what’s missing.
-
Using FFMPEG in a Visual Studio 2013 ultimate project, linking error LNK2019
27 mars 2015, par Jokke RuokolainenI’m trying to use FFmpeg library and TIFF lib in my project (I’m making a .dll and/or .exe also). I have searched through the answers provided in here and Google, and linked the /dev/include 64-bit (32-bit VS making 64-bit project) to Additional Include Directories and shared/bin (library files) 64-bit to linker->Additional Library Directories and did the Linker->Additional Depedencies->avformat.lib addition. I also copied the .dll files to my project folder, but I still keep getting the LNK2019. Here’s how I use the libs and the output of the compiler :
extern "C" {
#ifndef inline
#define inline __inline
#endif
#ifndef UINT64_C
#define UINT64_C uint64_t
#define INT64_C int64_t
#endif
#include
#include
#include
}
#pragma comment(lib, "avformat.lib")
1>------ Build started: Project: GHSOM_V3, Configuration: FFmpeg x64 ------
1> ffmpeg_io.cpp
1>ffmpeg_io.obj : error LNK2019: unresolved external symbol av_malloc referenced in function "struct AVFrame * __cdecl alloc_picture(enum AVPixelFormat,int,int)" (?alloc_picture@@YAPEAUAVFrame@@W4AVPixelFormat@@HH@Z)
1>ffmpeg_io.obj : error LNK2019: unresolved external symbol av_free referenced in function "struct AVFrame * __cdecl alloc_picture(enum AVPixelFormat,int,int)" (?alloc_picture@@YAPEAUAVFrame@@W4AVPixelFormat@@HH@Z)
1>ffmpeg_io.obj : error LNK2019: unresolved external symbol av_freep referenced in function "void __cdecl aviCloseWriter(struct tagAVIWriter *)" (?aviCloseWriter@@YAXPEAUtagAVIWriter@@@Z)
1>ffmpeg_io.obj : error LNK2019: unresolved external symbol av_rescale_q referenced in function "void __cdecl aviWriteFrame(struct tagAVIWriter *,unsigned char *)" (?aviWriteFrame@@YAXPEAUtagAVIWriter@@PEAE@Z)
1>ffmpeg_io.obj : error LNK2019: unresolved external symbol av_frame_alloc referenced in function "struct AVFrame * __cdecl alloc_picture(enum AVPixelFormat,int,int)" (?alloc_picture@@YAPEAUAVFrame@@W4AVPixelFormat@@HH@Z)
1>ffmpeg_io.obj : error LNK2019: unresolved external symbol avcodec_open2 referenced in function "void __cdecl initiate_avi_create(struct tagAVIWriter *,int,int)" (?initiate_avi_create@@YAXPEAUtagAVIWriter@@HH@Z)
1>ffmpeg_io.obj : error LNK2019: unresolved external symbol avcodec_close referenced in function "void __cdecl aviCloseReader(struct tagAVIReader *)" (?aviCloseReader@@YAXPEAUtagAVIReader@@@Z)
1>ffmpeg_io.obj : error LNK2019: unresolved external symbol av_init_packet referenced in function "void __cdecl aviWriteFrame(struct tagAVIWriter *,unsigned char *)" (?aviWriteFrame@@YAXPEAUtagAVIWriter@@PEAE@Z)
1>ffmpeg_io.obj : error LNK2019: unresolved external symbol av_free_packet referenced in function "void __cdecl aviReadFrame(struct tagAVIReader *,unsigned char *,int)" (?aviReadFrame@@YAXPEAUtagAVIReader@@PEAEH@Z)
1>ffmpeg_io.obj : error LNK2019: unresolved external symbol avcodec_find_decoder referenced in function "void __cdecl initiate_avi_open(struct tagAVIReader *)" (?initiate_avi_open@@YAXPEAUtagAVIReader@@@Z)
1>ffmpeg_io.obj : error LNK2019: unresolved external symbol avcodec_decode_video2 referenced in function "void __cdecl aviReadFrame(struct tagAVIReader *,unsigned char *,int)" (?aviReadFrame@@YAXPEAUtagAVIReader@@PEAEH@Z)
1>ffmpeg_io.obj : error LNK2019: unresolved external symbol avcodec_find_encoder referenced in function "void __cdecl initiate_avi_create(struct tagAVIWriter *,int,int)" (?initiate_avi_create@@YAXPEAUtagAVIWriter@@HH@Z)
1>ffmpeg_io.obj : error LNK2019: unresolved external symbol avcodec_find_encoder_by_name referenced in function "void __cdecl initiate_avi_create(struct tagAVIWriter *,int,int)" (?initiate_avi_create@@YAXPEAUtagAVIWriter@@HH@Z)
1>ffmpeg_io.obj : error LNK2019: unresolved external symbol avcodec_encode_video referenced in function "void __cdecl aviWriteFrame(struct tagAVIWriter *,unsigned char *)" (?aviWriteFrame@@YAXPEAUtagAVIWriter@@PEAE@Z)
1>ffmpeg_io.obj : error LNK2019: unresolved external symbol avpicture_fill referenced in function "struct AVFrame * __cdecl alloc_picture(enum AVPixelFormat,int,int)" (?alloc_picture@@YAPEAUAVFrame@@W4AVPixelFormat@@HH@Z)
1>ffmpeg_io.obj : error LNK2019: unresolved external symbol avpicture_get_size referenced in function "struct AVFrame * __cdecl alloc_picture(enum AVPixelFormat,int,int)" (?alloc_picture@@YAPEAUAVFrame@@W4AVPixelFormat@@HH@Z)
1>ffmpeg_io.obj : error LNK2019: unresolved external symbol sws_getContext referenced in function "void __cdecl initiate_avi_create(struct tagAVIWriter *,int,int)" (?initiate_avi_create@@YAXPEAUtagAVIWriter@@HH@Z)
1>ffmpeg_io.obj : error LNK2019: unresolved external symbol sws_scale referenced in function "void __cdecl aviReadFrame(struct tagAVIReader *,unsigned char *,int)" (?aviReadFrame@@YAXPEAUtagAVIReader@@PEAEH@Z)
1>tiff_io.obj : error LNK2019: unresolved external symbol TIFFClose referenced in function "void __cdecl tiffReadRGBA(char *,int *,int *,unsigned char *)" (?tiffReadRGBA@@YAXPEADPEAH1PEAE@Z)
1>tiff_io.obj : error LNK2019: unresolved external symbol TIFFGetField referenced in function "void __cdecl tiffReadRGBA(char *,int *,int *,unsigned char *)" (?tiffReadRGBA@@YAXPEADPEAH1PEAE@Z)
1>tiff_io.obj : error LNK2019: unresolved external symbol TIFFSetField referenced in function "void __cdecl tiffWriteRGBA(char *,int,int,unsigned char *)" (?tiffWriteRGBA@@YAXPEADHHPEAE@Z)
1>tiff_io.obj : error LNK2019: unresolved external symbol TIFFReadRGBAImage referenced in function "void __cdecl tiffReadRGBA(char *,int *,int *,unsigned char *)" (?tiffReadRGBA@@YAXPEADPEAH1PEAE@Z)
1>tiff_io.obj : error LNK2019: unresolved external symbol TIFFOpen referenced in function "void __cdecl tiffReadRGBA(char *,int *,int *,unsigned char *)" (?tiffReadRGBA@@YAXPEADPEAH1PEAE@Z)
1>tiff_io.obj : error LNK2019: unresolved external symbol TIFFWriteEncodedStrip referenced in function "void __cdecl tiffWriteRGBA(char *,int,int,unsigned char *)" (?tiffWriteRGBA@@YAXPEADHHPEAE@Z)
1>Video.obj : error LNK2019: unresolved external symbol "void __cdecl DCT2d(double *,double *,long,long)" (?DCT2d@@YAXPEAN0JJ@Z) referenced in function "void __cdecl ForwardDCT(class DataShuffle *,unsigned char *,char *,int,int,int,int,int,bool)" (?ForwardDCT@@YAXPEAVDataShuffle@@PEAEPEADHHHHH_N@Z)
1>Video.obj : error LNK2019: unresolved external symbol "void __cdecl IDCT2d(double *,double *,long,long)" (?IDCT2d@@YAXPEAN0JJ@Z) referenced in function "void __cdecl ExportVideoFromDCT(class DataShuffle *,char *,char *,int,int,int,int)" (?ExportVideoFromDCT@@YAXPEAVDataShuffle@@PEAD1HHHH@Z)
1>Video.obj : error LNK2019: unresolved external symbol "void __cdecl CopyToZigZag(double *,double *,long,long,long)" (?CopyToZigZag@@YAXPEAN0JJJ@Z) referenced in function "void __cdecl ForwardDCT(class DataShuffle *,unsigned char *,char *,int,int,int,int,int,bool)" (?ForwardDCT@@YAXPEAVDataShuffle@@PEAEPEADHHHHH_N@Z)
1>Video.obj : error LNK2019: unresolved external symbol "void __cdecl CopyFromZigZag(double *,double *,long,long,long)" (?CopyFromZigZag@@YAXPEAN0JJJ@Z) referenced in function "void __cdecl ExportVideoFromDCT(class DataShuffle *,char *,char *,int,int,int,int)" (?ExportVideoFromDCT@@YAXPEAVDataShuffle@@PEAD1HHHH@Z) -
A C language ffmpeg project organized with CMakeLists, encounters errors in the Windows MinGW64 environment
20 juin 2023, par flywenProject Structure


ffmpeg-tutorial


- 

- include

- 

- libavcodec
- libavdevice
- libavfilter
- libavformat
- libavutil
- libswresample
- libswscale
















- lib

- 

- pkgconfig
- libavcodec.a
- libavdevice.a
- libavfilter.a
- libformat.a
- libavutil.a
- libswresample.a
- libswscale.a


















- CMakeLists.txt
- main.c










CMakeLists.txt


cmake_minimum_required(VERSION 3.20)
project(ffmpeg_tutorial)

set(CMAKE_C_STANDARD 11)

include_directories(include)
link_directories(lib)
add_executable(ffmpeg_tutorial main.cpp)
target_link_libraries(ffmpeg_tutorial
 avformat
 avcodec
 avutil
 swscale
 swresample
 z
 bz2
 iconv
 ws2_32
 schannel
 kernel32
 advapi32
 kernel32
 user32
 gdi32
 winspool
 shell32
 ole32
 oleaut32
 uuid
 comdlg32
 advapi32
 )



main.c


#include 
#include "libavcodec/avcodec.h"
#include "libavformat/avformat.h"
#include "libswresample/swresample.h"
int main() {
 std::cout << "Hello, World!" << std::endl;
 std::cout << av_version_info() << std::endl;
 printf("ffmpeg version is %s\n", av_version_info());
 // Open input file
 AVFormatContext *inputContext = nullptr;
 if (avformat_open_input(&inputContext, "input.mp3", nullptr, nullptr) != 0) {
 printf("Couldn't open input file\n");
 return -1;
 }

 // Read input stream
 if (avformat_find_stream_info(inputContext, nullptr) < 0) {
 printf("Couldn't find stream information\n");
 return -1;
 }

 // Get audio stream index
 int audioStream = -1;
 for (int i = 0; i < inputContext->nb_streams; i++) {
 if (inputContext->streams[i]->codecpar->codec_type == AVMEDIA_TYPE_AUDIO) {
 audioStream = i;
 break;
 }
 }

 if (audioStream == -1) {
 printf("Couldn't find audio stream\n");
 return -1;
 }
}




IDE


clion


ERRORS


[ 50%] Building CXX object CMakeFiles/ffmpeg_tutorial.dir/main.cpp.obj
[100%] Linking CXX executable ffmpeg_tutorial.exe
D:/Msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: G:/cywen_private/cpp_projects/ffmpeg-tutorial/lib/libavformat.a(tls_schannel.o): in function `tls_write':
D:\Msys64\usr\src\ffmpeg/libavformat/tls_schannel.c:563: undefined reference to `EncryptMessage'
D:/Msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: G:/cywen_private/cpp_projects/ffmpeg-tutorial/lib/libavformat.a(tls_schannel.o): in function `tls_read':
D:\Msys64\usr\src\ffmpeg/libavformat/tls_schannel.c:441: undefined reference to `DecryptMessage'
D:/Msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: G:/cywen_private/cpp_projects/ffmpeg-tutorial/lib/libavcodec.a(mfenc.o):mfenc.c:(.rdata$.refptr.IID_ICodecAPI[.refptr.IID_ICodecAPI]+0x0): undefined reference to `IID_ICodecAPI'
D:/Msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: G:/cywen_private/cpp_projects/ffmpeg-tutorial/lib/libavcodec.a(tiff.o): in function `tiff_uncompress_lzma':
D:\Msys64\usr\src\ffmpeg/libavcodec/tiff.c:577: undefined reference to `lzma_stream_decoder'
D:/Msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:\Msys64\usr\src\ffmpeg/libavcodec/tiff.c:582: undefined reference to `lzma_code'
D:/Msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:\Msys64\usr\src\ffmpeg/libavcodec/tiff.c:583: undefined reference to `lzma_end'
D:/Msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: G:/cywen_private/cpp_projects/ffmpeg-tutorial/lib/libavutil.a(random_seed.o): in function `av_get_random_seed':
D:\Msys64\usr\src\ffmpeg/libavutil/random_seed.c:127: undefined reference to `BCryptOpenAlgorithmProvider'
D:/Msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:\Msys64\usr\src\ffmpeg/libavutil/random_seed.c:130: undefined reference to `BCryptGenRandom'
D:/Msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:\Msys64\usr\src\ffmpeg/libavutil/random_seed.c:131: undefined reference to `BCryptCloseAlgorithmProvider'
collect2.exe: error: ld returned 1 exit status
mingw32-make[3]: *** [CMakeFiles\ffmpeg_tutorial.dir\build.make:95: ffmpeg_tutorial.exe] Error 1
mingw32-make[2]: *** [CMakeFiles\Makefile2:82: CMakeFiles/ffmpeg_tutorial.dir/all] Error 2
mingw32-make[1]: *** [CMakeFiles\Makefile2:89: CMakeFiles/ffmpeg_tutorial.dir/rule] Error 2
mingw32-make: *** [Makefile:123: ffmpeg_tutorial] Error 2



What is the way I compile ffmpeg


- 

-
downlaod msys2


-
install mingw64








pacman -S mingw-w64-x86_64-toolchain



- 

-
install make,diffutils,nasm,yasm,pkg-config






pacman -S base-devl yasm nasm pkg-config



- 

-
download ffmpeg 5.1


-
compile








cd ffmpeg
./configure --disable-shared --enable-static --arch=x86_64 --target-os=mingw32 --cross-prefix=x86_64-w64-mingw32- --pkg-config-flags=--static --prefix=../ffmpeg-build

make -j $(nproc)

make install




Project Repoistory


https://github.com/joinwen/learn_ffmpeg.git


Expectation


- 

- How to solve errors
- In CMakeLists target_link_libraries's parameters is too much, Can I make it short
- some advices on the project








- include