
Recherche avancée
Médias (1)
-
Sintel MP4 Surround 5.1 Full
13 mai 2011, par
Mis à jour : Février 2012
Langue : English
Type : Video
Autres articles (77)
-
Le profil des utilisateurs
12 avril 2011, parChaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...) -
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 (...) -
Sélection de projets utilisant MediaSPIP
29 avril 2011, parLes exemples cités ci-dessous sont des éléments représentatifs d’usages spécifiques de MediaSPIP pour certains projets.
Vous pensez avoir un site "remarquable" réalisé avec MediaSPIP ? Faites le nous savoir ici.
Ferme MediaSPIP @ Infini
L’Association Infini développe des activités d’accueil, de point d’accès internet, de formation, de conduite de projets innovants dans le domaine des Technologies de l’Information et de la Communication, et l’hébergement de sites. Elle joue en la matière un rôle unique (...)
Sur d’autres sites (5547)
-
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>