
Recherche avancée
Autres articles (27)
-
Les formats acceptés
28 janvier 2010, parLes commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
ffmpeg -codecs ffmpeg -formats
Les format videos acceptés en entrée
Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
Les formats vidéos de sortie possibles
Dans un premier temps on (...) -
Ajouter notes et légendes aux images
7 février 2011, parPour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
Modification lors de l’ajout d’un média
Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...) -
Creating farms of unique websites
13 avril 2011, parMediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)
Sur d’autres sites (3883)
-
Compiling c++ program for ffmpeg, error give undefined reference to [duplicate]
6 août 2020, par leonardltk1I have a code
read_mp3.cpp
, which usesffmpeg
to decode an mp3 file into an array.

Code for
read_mp3.cpp
is as follows :

#include 
 #include 

 // I use extern "C" as recommended here: https://blog.csdn.net/qq_18144521/article/details/79608355
 extern "C"
 {
 #include <libavutil></libavutil>opt.h>
 #include <libavcodec></libavcodec>avcodec.h>
 #include <libavformat></libavformat>avformat.h>
 #include <libswresample></libswresample>swresample.h>
 }
 using namespace std;


 int decode_audio_file(const char* path, const int sample_rate, double** data, int* size) {
 // initialize all muxers, demuxers and protocols for libavformat
 // (does nothing if called twice during the course of one program execution)
 av_register_all();

 /*
 Code for the rest of this function is found here :
 https://rodic.fr/blog/libavcodec-tutorial-decode-audio-file/
 */

 return 0;
 }

 int main (int argc, char ** argv) {
 // decode data
 int sample_rate = 44100;
 double* data;
 int size;
 if (decode_audio_file(argv[1], sample_rate, &data, &size) != 0) {
 return -1;
 }

 /*
 Do something with data ...
 */

 return 0;
 }



I tried different ways to compilations, but to no avail :


g++ -o ./read_mp3.out -Ofast -Wall -Wextra \
 -lavformat-ffmpeg -lavdevice-ffmpeg -lavcodec-ffmpeg -lavutil -lswresample \
 -std=c++11 "./read_mp3.cpp"
 
 g++ -o ./read_mp3.out -Ofast -Wall -Wextra \
 -lavformat -lavdevice -lavcodec -lavutil -lswresample \
 -std=c++11 "./read_mp3.cpp"
 
 g++ -o ./read_mp3.out -Ofast -Wall -Wextra \
 -lavformat -lavdevice -lavcodec -lavutil -pthread -ldl -lswscale -lbz2 -lz -lm \
 -std=c++11 "./read_mp3.cpp"



but i get the following error :


/tmp/ccnZzoIh.o: In function `decode_audio_file(char const*, int, double**, int*)':
 read_mp3.cpp:(.text+0x2781): undefined reference to `av_register_all'
 read_mp3.cpp:(.text+0x2786): undefined reference to `avformat_alloc_context'
 read_mp3.cpp:(.text+0x279c): undefined reference to `avformat_open_input'
 read_mp3.cpp:(.text+0x27b7): undefined reference to `avformat_find_stream_info'
 read_mp3.cpp:(.text+0x284b): undefined reference to `avcodec_find_decoder'
 read_mp3.cpp:(.text+0x2858): undefined reference to `avcodec_open2'
 read_mp3.cpp:(.text+0x2865): undefined reference to `swr_alloc'
 read_mp3.cpp:(.text+0x2880): undefined reference to `av_opt_set_int'
 read_mp3.cpp:(.text+0x2896): undefined reference to `av_opt_set_int'
 read_mp3.cpp:(.text+0x28ae): undefined reference to `av_opt_set_int'
 read_mp3.cpp:(.text+0x28c4): undefined reference to `av_opt_set_int'
 read_mp3.cpp:(.text+0x28dc): undefined reference to `av_opt_set_int'
 
 /tmp/ccnZzoIh.o:read_mp3.cpp:(.text+0x28f0): more undefined references to `av_opt_set_int' follow
 /tmp/ccnZzoIh.o: In function `decode_audio_file(char const*, int, double**, int*)':
 read_mp3.cpp:(.text+0x2907): undefined reference to `av_opt_set_sample_fmt'
 read_mp3.cpp:(.text+0x291d): undefined reference to `av_opt_set_sample_fmt'
 read_mp3.cpp:(.text+0x2927): undefined reference to `swr_init'
 read_mp3.cpp:(.text+0x2931): undefined reference to `swr_is_initialized'
 read_mp3.cpp:(.text+0x2943): undefined reference to `av_init_packet'
 read_mp3.cpp:(.text+0x2948): undefined reference to `av_frame_alloc'
 read_mp3.cpp:(.text+0x297b): undefined reference to `av_read_frame'
 read_mp3.cpp:(.text+0x299a): undefined reference to `avcodec_decode_audio4'
 read_mp3.cpp:(.text+0x29cc): undefined reference to `av_samples_alloc'
 read_mp3.cpp:(.text+0x29e6): undefined reference to `swr_convert'
 read_mp3.cpp:(.text+0x2a36): undefined reference to `av_frame_free'
 read_mp3.cpp:(.text+0x2a40): undefined reference to `swr_free'
 read_mp3.cpp:(.text+0x2a48): undefined reference to `avcodec_close'
 read_mp3.cpp:(.text+0x2a52): undefined reference to `avformat_free_context'

 collect2: error: ld returned 1 exit status



-
Revert "lavfi/avfiltergraph : add check before free the format"
7 août 2020, par Andreas RheinhardtRevert "lavfi/avfiltergraph : add check before free the format"
This reverts commit f156f4ab2317f22bfef33c7eaead0d5d5f162903.
The checks added by said commit are nonsense because they did not help
in case ff_merge_samplerates() or ff_merge_formats() returned NULL
while freeing one of its arguments : Said freeing does not change
the local variables of can_merge_formats().Reviewed-by : Nicolas George <george@nsup.org>
Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@gmail.com> -
fftools/ffmpeg : Fix leak of AVFilterInOut in case of error
23 août 2020, par Andreas Rheinhardtfftools/ffmpeg : Fix leak of AVFilterInOut in case of error
The AVFilterInOuts normally get freed in init_output_filter() when
the corresponding streams get created ; yet if an error happens before
one reaches said point, they leak. Therefore this commit makes
ffmpeg_cleanup free them, too.Fixes ticket #8267.
Reviewed-by : Nicolas George <george@nsup.org>
Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@gmail.com>