
Recherche avancée
Autres articles (33)
-
La file d’attente de SPIPmotion
28 novembre 2010, parUne file d’attente stockée dans la base de donnée
Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...) -
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)
Sur d’autres sites (4882)
-
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

-
‘ffbuild/library.mak : No such file or directory’ on building ffmpeg for android
20 octobre 2022, par JustinGongI use
ffmpeg-5.1
andandroid-ndk-r22b
inbuntu 20.04.4 LTS
system for building ffmpeg for android.

Firstly, under
ffmpeg-5.1
dir, I run./configure --disable-x86asm
.

Second, I run
sh build_android_clang.sh
, it shows error :

Makefile:113: ffbuild/library.mak: No such file or directory
make: *** No rule to make target 'ffbuild/library.mak'. Stop.
Makefile:113: ffbuild/library.mak: No such file or directory
make: *** No rule to make target 'ffbuild/library.mak'. Stop.
Makefile:113: ffbuild/library.mak: No such file or directory
make: *** No rule to make target 'ffbuild/library.mak'. Stop.



How to fix it ? Can anyone give some advises ?


The content of
build_android_clang.sh
is as follows :

#!/bin/bash
 
export NDK=/home/shicheng/gongzhenting/tools/android-tools/android-ndk-r22b
TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/linux-x86_64

ARCH=arm 
CPU=armv7-a 
OS=android
PLATFORM=armv7a-linux-androideabi
PREFIX=$(pwd)/android/$CPU 
OPTIMIZE_CFLAGS="-mfloat-abi=softfp -mfpu=vfp -marm -march=$CPU "

PREFIX=$(pwd)/android/arm
SYSROOT=$TOOLCHAIN/sysroot
CROSS_PREFIX=$TOOLCHAIN/bin/llvm-
ANDROID_CROSS_PREFIX=$TOOLCHAIN/bin/${PLATFORM}21-

./configure \
--prefix=$PREFIX \
--enable-shared \
--enable-gpl \
--enable-neon \
--enable-hwaccels \
--enable-postproc \
--enable-jni \
--enable-small \
--enable-mediacodec \
--enable-decoder=h264_mediacodec \
--enable-ffmpeg \
--disable-ffplay \
--disable-ffprobe \
--disable-ffplay \
--disable-avdevice \
--disable-debug \
--disable-static \
--disable-doc \
--disable-symver \
--cross-prefix=$CROSS_PREFIX \
--target-os=$OS \
--arch=$ARCH \
--cpu=$CPU \
--cc=${ANDROID_CROSS_PREFIX}clang \
--cxx=${ANDROID_CROSS_PREFIX}clang++ \
--enable-cross-compile \
--sysroot=$SYSROOT \
--extra-cflags="-Os -fPIC $OPTIMIZE_CFLAGS" \
--extra-ldflags="$ADDI_LDFLAGS" \

make clean
make
make install



-
tools : Make sure to create the tools directory before building decode_simple.o
8 août 2022, par Martin Storsjötools : Make sure to create the tools directory before building decode_simple.o
This directory dependency is normally added implicitly by rules
in ffbuild/common.mak ; for tools it's created by a rule for TOOLOBJS.
TOOLOBJS is populated implicitly from TOOLS, and decode_simple.o
doesn't end up there because it's an odd occurrance of a lone
object file in the tools subdirectory, not belonging to any other
tool.Signed-off-by : Martin Storsjö <martin@martin.st>