
Recherche avancée
Médias (1)
-
The Slip - Artworks
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
Autres articles (77)
-
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 ) (...) -
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir
Sur d’autres sites (5896)
-
undefined reference in ffmpeg (use code blocks)
6 février 2015, par Yonghao ZhaoI am currently testing a video encoding program using ffmepg codeblocks.I encountered several undefined reference warning. I have checked on internet and add extern "c" to the headers but it still doesnt work. Please help me check.
Here is part of the code :
extern "C" {
#include "libavcodec/avcodec.h"
#include "libavutil/channel_layout.h"
#include "libavutil/common.h"
#include "libavutil/imgutils.h"
#include "libavutil/mathematics.h"
#include "libavutil/samplefmt.h"
}
#include
#include "libavutil/opt.h"
static void video_encode_example(const char *filename, int codec_id)
{
AVCodec *codec;
AVCodecContext *c= NULL;
int i, ret, x, y, got_output;
FILE *f;
AVFrame *frame;
AVPacket pkt;
uint8_t endcode[] = { 0, 0, 1, 0xb7 };
printf("Encode video file %s\n", filename);
/* find the mpeg1 video encoder */
codec = avcodec_find_encoder(AV_CODEC_ID_H264);
if (!codec) {
fprintf(stderr, "Codec not found\n");
exit(1);
}
c = avcodec_alloc_context3(codec);
if (!c) {
fprintf(stderr, "Could not allocate video codec context\n");
exit(1);
}
int main(int argc, char **argv)
{
avcodec_register_all();
video_encode_example("test.mpg", AV_CODEC_ID_MPEG1VIDEO);
return 0;
}The error given :
||=== Build : Debug in ffmepg_video_en (compiler : GNU GCC Compiler) ===|
obj/Debug/main.o||In functionvideo_encode_example':|
codeblocksfile/ffmepg_video_en/main.cpp|36|undefined reference toavcodec_find_encoder’|
codeblocksfile/ffmepg_video_en/main.cpp|41|undefined reference toavcodec_alloc_context3'|
codeblocksfile/ffmepg_video_en/main.cpp|63|undefined reference toav_opt_set(void*, char const*, char const*, int)’|
codeblocksfile/ffmepg_video_en/main.cpp|65|undefined reference toavcodec_open2'|
codeblocksfile/ffmepg_video_en/main.cpp|74|undefined reference toav_frame_alloc’|
codeblocksfile/ffmepg_video_en/main.cpp|85|undefined reference toav_image_alloc(unsigned char**, int*, int, int, AVPixelFormat, int)'|
codeblocksfile/ffmepg_video_en/main.cpp|92|undefined reference toav_init_packet’|
codeblocksfile/ffmepg_video_en/main.cpp|112|undefined reference toavcodec_encode_video2'|
codeblocksfile/ffmepg_video_en/main.cpp|120|undefined reference toav_free_packet’|
codeblocksfile/ffmepg_video_en/main.cpp|126|undefined reference toavcodec_encode_video2'|
/home/yonghao/codeblocksfile/ffmepg_video_en/main.cpp|134|undefined reference toav_free_packet’|
codeblocksfile/ffmepg_video_en/main.cpp|140|undefined reference toavcodec_close'|
codeblocksfile/ffmepg_video_en/main.cpp|141|undefined reference toav_free’|
codeblocksfile/ffmepg_video_en/main.cpp|142|undefined reference toav_freep'|
codeblocksfile/ffmepg_video_en/main.cpp|143|undefined reference toav_frame_free’|
obj/Debug/main.o||In functionmain':|
codeblocksfile/ffmepg_video_en/main.cpp|151|undefined reference toavcodec_register_all’|
||=== Build failed : 16 error(s), 0 warning(s) (0 minute(s), 1 second(s)) ===| -
flac and metaflac : Don’t always call setlocale() in Windows.
19 juillet 2014, par Erik de Castro Lopoflac and metaflac : Don’t always call setlocale() in Windows.
Windows (MSVC, MinGW) versions of setlocale don’t care about LC_*
environment variables. For example, flac cannot pass the test for
— until and —skip options the script calls it with —skip=0:01.1001
and it expects decimal comma (—skip=0:01,1001) on some locales.Solve this (on Windows) by calling setlocale(LC_ALL, "") if some
LC_* variable is set to "C".Patch-from : lvqcl <lvqcl.mail@gmail.com>
-
cmake build error with libswresample, works fine with clang
19 août 2018, par Dan GordonI’m building an FFmpeg project with CLion which uses cmake to compile the code. Everything has been working great until I started to use the libswresample library. For some reason, cmake isn’t seeing the dylib and won’t build the code.
/Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake --build /Users/user/CLionProjects/IC4D/cmake-build-debug --target all -- -j 4
[ 50%] Linking C executable IC4D
Undefined symbols for architecture x86_64:
"_swr_alloc_set_opts", referenced from:
_audio_decode_frame in main.c.o
"_swr_convert", referenced from:
_audio_decode_frame in main.c.o
"_swr_free", referenced from:
_audio_decode_frame in main.c.o
"_swr_init", referenced from:
_audio_decode_frame in main.c.o
"_swr_set_compensation", referenced from:
_audio_decode_frame in main.c.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [IC4D] Error 1
make[1]: *** [CMakeFiles/IC4D.dir/all] Error 2
make: *** [all] Error 2But if I run this clang code, it compiles just fine
clang -I/usr/local/include -L/usr/local/lib -lavcodec -lavcodec -lswscale -lavformat -lswresample -lSDL2 -lavutil -o IC4D2 ../main.c
Here’s my CMakeList.txt file :
cmake_minimum_required(VERSION 3.10)
project(IC4D C)
set(CMAKE_C_STANDARD 99)
include_directories( /Users/user/CLionProjects/IC4D/include/ )
link_directories( /Users/user/CLionProjects/IC4D/lib/ )
find_path(AVDEVICE_INCLUDE_DIR include/libavdevice/avdevice.h)
find_library(AVDEVICE_LIBRARY lib/libavdevice.58.dylib)
find_path(AVFORMAT_INCLUDE_DIR include/libavformat/avformat.h)
find_library(AVFORMAT_LIBRARY lib/libavformat.58.dylib)
find_path(AVCODEC_INCLUDE_DIR include/libavcodec/avcodec.h)
find_library(AVCODEC_LIBRARY lib/libavcodec.58.dylib)
find_path(SWSCALE_INCLUDE_DIR include/libswscale/swscale.h)
find_library(SWSCALE_LIBRARY lib/libswscale.5.dylib)
find_path(AVUTIL_INCLUDE_DIR include/libavutil/avutil.h)
find_library(AVUTIL_LIBRARY lib/libavutil.56.dylib)
find_path(SWRESAMPLE_INCLUDE_DIR include/libswresample/swresample.h)
find_library(SWRESAMPLE_LIBRARY lib/libswresample.3.dylib)
find_package(SDL2 REQUIRED)
add_executable(IC4D main.c)
target_include_directories(IC4D PRIVATE ${SDL2_INCLUDE_DIRS} ${AVDEVICE_INCLUDE_DIR} ${AVFORMAT_INCLUDE_DIR} ${AVCODEC_INCLUDE_DIR} ${SWSCALE_INCLUDE_DIR} ${AVUTIL_INCLUDE_DIR} ${SWRESAMPLE_INCLUDE_DIR})
target_link_libraries(IC4D PRIVATE ${SDL2_LIBRARIES} ${AVDEVICE_LIBRARY} ${AVFORMAT_LIBRARY} ${AVCODEC_LIBRARY} ${SWSCALE_LIBRARY} ${AVUTIL_LIBRARY} ${SWRESAMPLE_LIBRARY})What am I doing wrong with cmake ?
Thanks