
Recherche avancée
Médias (2)
-
Exemple de boutons d’action pour une collection collaborative
27 février 2013, par
Mis à jour : Mars 2013
Langue : français
Type : Image
-
Exemple de boutons d’action pour une collection personnelle
27 février 2013, par
Mis à jour : Février 2013
Langue : English
Type : Image
Autres articles (54)
-
Use, discuss, criticize
13 avril 2011, parTalk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
A discussion list is available for all exchanges between users. -
MediaSPIP Player : problèmes potentiels
22 février 2011, parLe lecteur ne fonctionne pas sur Internet Explorer
Sur Internet Explorer (8 et 7 au moins), le plugin utilise le lecteur Flash flowplayer pour lire vidéos et son. Si le lecteur ne semble pas fonctionner, cela peut venir de la configuration du mod_deflate d’Apache.
Si dans la configuration de ce module Apache vous avez une ligne qui ressemble à la suivante, essayez de la supprimer ou de la commenter pour voir si le lecteur fonctionne correctement : /** * GeSHi (C) 2004 - 2007 Nigel McNie, (...) -
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 (7531)
-
Using ffmpeg libraries to decode wav audio as PCM samples and display waveform
26 septembre 2016, par Lorenzo MonniI’m using the ffmpeg libraries to process audio files.
I need to decode .wav audio files to make some operations having their samples in an understandable format, i.e. decimal numbers comprised between [-1,1] as a normal audio waveform.
I have written the code for decoding and it’s apparently working well, but when I see the decoded samples it seems something in the sample numbers translation went bad. I paste here only the part of code where I translate the samples from the audio frame in PCM 16 bits :
while(av_read_frame(pFormatCtx, &apkt)>=0) {
if(apkt.stream_index==audioStream->index)
{
// Try to decode the packet into a frame
int frameFinished = 0;
avcodec_decode_audio4(aCodecCtx, aFrame, &frameFinished, &apkt);
int data_size = av_samples_get_buffer_size(&plane_size, aCodecCtx->channels,
aFrame->nb_samples,
aCodecCtx->sample_fmt, 1);
// Some frames rely on multiple packets, so we have to make sure the frame is finished before
// we can use it
if (frameFinished)
{
for(int a=0;a < plane_size/sizeof(int16_t);a++)
{
fprintf(fd,"%d\n",(int16_t*)aFrame->data[a]);
}
}
}
av_free_packet(&apkt);
// Free the packet that was allocated by av_read_frame
}Additional information and issues :
-
the sample_fmt in my allocated AVCodecContext is "AV_SAMPLE_FMT_S16" so the samples numbers should be 16bit signed binaries, I guess if translated in decimal format numbers comprised between -32768 and 32767 (I don’t remember how the problem of disparity between positives and negatives is solved). However when I decode them in int16_t I see much higher numbers that seem to fall in the 32bit signed format (but the file is in 16bit anyway). E.g., the max of my decoded audio (after int16_t translation) is 2044951012 ;
-
My .wav file has two channels, but I can’t access both two, if I use extended_data of the audio frame struct pointing to the second channel (index 1) the execution returns a segmentation fault. The same happens with the data pointer. I’m able to recover only one channel, from data[0].
Here is how my audio file decoded with the aforementioned code and saved in a txt looks like :
Here is how the trend of the signal should look like :
If I play my decoded signal the sound shows some similarities with the original audio file, but with a lot of destructing artifacts in it.
Final remarks : ffmpeg documentation and past questions of Stackoverflow are not working well to solve this problem.
-
-
Using ffmpeg libraries to decode wav audio as PCM samples
25 septembre 2016, par Lorenzo MonniI’m using the ffmpeg libraries to process audio files.
I need to decode .wav audio files to make some operations having their samples in an understandable format, i.e. decimal numbers comprised between [-1,1] as a normal audio waveform.
I have written the code for decoding and it’s apparently working well, but when I see the decoded samples it seems something in the sample numbers translation went bad. I paste here only the part of code where I translate the samples from the audio frame in PCM 16 bits :
while(av_read_frame(pFormatCtx, &apkt)>=0) {
if(apkt.stream_index==audioStream->index)
{
// Try to decode the packet into a frame
int frameFinished = 0;
avcodec_decode_audio4(aCodecCtx, aFrame, &frameFinished, &apkt);
int data_size = av_samples_get_buffer_size(&plane_size, aCodecCtx->channels,
aFrame->nb_samples,
aCodecCtx->sample_fmt, 1);
// Some frames rely on multiple packets, so we have to make sure the frame is finished before
// we can use it
if (frameFinished)
{
for(int a=0;a < plane_size/sizeof(int16_t);a++)
{
fprintf(fd,"%d\n",(int16_t*)aFrame->data[a]);
}
}
}
av_free_packet(&apkt);
// Free the packet that was allocated by av_read_frame
}Additional information and issues :
-
the sample_fmt in my allocated AVCodecContext is "AV_SAMPLE_FMT_S16" so the samples numbers should be 16bit signed binaries, I guess if translated in decimal format numbers comprised between -32768 and 32767 (I don’t remember how the problem of disparity between positives and negatives is solved). However when I decode them in int16_t I see much higher numbers that seem to fall in the 32bit signed format (but the file is in 16bit anyway). E.g., the max of my decoded audio (after int16_t translation) is 2044951012 ;
-
My .wav file has two channels, but I can’t access both two, if I use extended_data of the audio frame struct pointing to the second channel (index 1) the execution returns a segmentation fault. The same happens with the data pointer. I’m able to recover only one channel, from data[0].
Here is how my audio file decoded with the aforementioned code and saved in a txt looks like :
Here is how the trend of the signal should look like :
If I play my decoded signal the sound shows some similarities with the original audio file, but with a lot of destructing artifacts in it.
Final remarks : ffmpeg documentation and past questions of Stackoverflow are not working well to solve this problem.
-
-
FFmpeg : Create a Video Slideshow from PNG Images for MS PowerPoint
20 septembre 2016, par KlaidonisI am using FFmpeg on Windows 7 to create a video from PNG image sequence for Microsoft PowerPoint.
The best results I have achieved so far, is by using the following command :
ffmpeg -framerate 10 -start_number 3 -i .\folder\name_%d.png -q:v 0 -c:v libx264 -pix_fmt yuv420p output-video.avi
It seems perfect, 50 images of total size 30 MB are converted into 200 KB video with no loss in the quality. Placing it in PowerPoint also seems right, but there is a slight color shift (yellow appears darker and possibly more orangish). By using some other conversion options, I obtained a video in PowerPoint where the first image of the video (like album cover art) is exactly as the original but the rest of the video plays with the mentioned color shift.
When I play this file in VLC, it’s good. Although, if in the settings "Use hardware YUV->RGB conversions" is enabled, colors appear a bit washed out, and white color is a bit gray.
I also tried to convert the images to a GIF file and at first it seems good but outer edges and numbers from the left and top side are blurred, and the background has turned from white to a bit gray color, although, white segments not on the background are white. The output size is 18 MB. I ended up with a way better GIF 600 KB by converting from the first video file ; just it is slightly more dotted, and the background again is grayish.
ffmpeg -i output-video.avi output-video.gif
Could someone help ?