
Advanced search
Medias (2)
-
SPIP - plugins - embed code - Exemple
2 September 2013, by
Updated: September 2013
Language: français
Type: Picture
-
Publier une image simplement
13 April 2011, by ,
Updated: February 2012
Language: français
Type: Video
Other articles (68)
-
List of compatible distributions
26 April 2011, byThe table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...) -
Les tâches Cron régulières de la ferme
1 December 2010, byLa gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
Le super Cron (gestion_mutu_super_cron)
Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...) -
Publier sur MédiaSpip
13 June 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
On other websites (8868)
-
ffmpeg_sched: return better error code
21 December 2024, by Gyan Doshi -
ffmpeg code does not link (undefined reference to avcodec_register_all
28 January 2013, by SriramI am trying to compile a simple introductory program using
ffmpeg
that tries to check if themp3
codec is available. While the code compiles OK, I am facing difficulty in solving linker errors. Here is the code:#include
#include
#include <libavcodec></libavcodec>avcodec.h>
float *generateSinusoid(unsigned int sampleRate, unsigned int nSecondsAudio) {
unsigned int nsamples = (nSecondsAudio * sampleRate);
float *arr;
arr = (float*) malloc(sizeof(float) * nsamples);
int i = 0;
for(i = 0; i < nsamples; i++) {
arr[i] = 20 * sin(2.f * (M_PI) * (330/sampleRate) * i); /*frequency of 330H
z*/
}
return arr;
}
int main(int argc, char *argv[]) {
avcodec_register_all();
AVCodec *codec;
unsigned int sampleRate = 22050; /*assumed.*/
unsigned int nSecondsAudio = 4;
float *arr;
arr = (float *) malloc(sizeof(float) * nSecondsAudio * sampleRate);
/*Step 1. Generate sinusoid.*/
arr = generateSinusoid(sampleRate, nSecondsAudio);
/* Step 2. See if encoder exists.*/
/*codec = avcodec_find_encoder(AV_CODEC_ID_MP3);*/
if(!codec) { /*codec = NULL.*/
printf("MP3 codec not found!!!!");
} else {
printf("MP3 codec found!!!");
}
return 0;
}The code is compiled and linked like so:
encoding_mp3: encoding_mp3.o
gcc encoding_mp3.o -o encoding_mp3 -L/cygdrive/c/Users/Desktop/webserver/cygnus/lib/w32api -L/cygdrive/c/Users/Desktop/webserver/cygnus/ffmpeg/ffmpeg_dev/lib -lm -luser32 -lpthread -lavcodec
encoding_mp3.o: encoding_mp3.c
gcc -I/cygdrive/c/Users/Desktop/webserver/cygnus/ffmpeg/ffmpeg_dev/include -I/cygdrive/c/Users/Desktop/webserver/cygnus/usr/include -g -c encoding_mp3.c -o encoding_mp3.o
clean:
rm encoding_mp3.o encoding_mp3Linking gives the following error:
gcc -I/cygdrive/c/Users/Desktop/webserver/cygnus/ffmpeg/ffmpeg_dev/include -I/cygdrive/c/Users/Desktop/webserver/cygnus/usr/include -g -c encoding_mp3.c -o encoding_mp3.o
gcc encoding_mp3.o -o encoding_mp3 -L/cygdrive/c/Users/Desktop/webserver/cygnus/lib/w32api -L/cygdrive/c/Users/Desktop/webserver/cygnus/ffmpeg/ffmpeg_dev/lib -lm -luser32 -lpthread -lavcodec
encoding_mp3.o: In function `main':
/cygdrive/c/Users/Desktop/webserver/cygnus/ffmpeg/work/encoding_mp3.c:31: undefined reference to `_avcodec_register_all'
collect2: ld returned 1 exit status
make: *** [encoding_mp3] Error 1I have gone through most of the threads on SO regarding this problem and here is what I have tried so far:
Put libraries at the end of all non-option arguments
Commented out code that references functions. This seems to work. The
undefined reference
errors go away after all function calls are removed, though the presence of a structAVCodec
does not cause any problems.Any help on this is most welcome.
-
wav: Add check for ’fmt’ tag in SMV code
16 July 2012, by Derek Buitenhuiswav: Add check for ’fmt’ tag in SMV code