
Recherche avancée
Médias (1)
-
The pirate bay depuis la Belgique
1er avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
Autres articles (25)
-
Supporting all media types
13 avril 2011, parUnlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)
-
ANNEXE : Les plugins utilisés spécifiquement pour la ferme
5 mars 2010, parLe site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)
-
Encoding and processing into web-friendly formats
13 avril 2011, parMediaSPIP automatically converts uploaded files to internet-compatible formats.
Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
All uploaded files are stored online in their original format, so you can (...)
Sur d’autres sites (3983)
-
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 ?
-
FFmpeg AVFrame Audio Data Modification
5 septembre 2016, par ArlindI’m trying to figure out how FFmpeg saves data in an
AVFrame
after the audio has been decoded.Basically, if I print the data in the
AVFrame->data[]
array I get a number of unsigned 8 bit integers that is the audio in raw format.From what I can understand from the FFmpeg doxygen, the format of the data is expressed in the
enum AVSampleFormat
and there are 2 main categories : interleaved and planar. In the interleaved type, the data is all kept in the first row of theAVFrame->data
array with sizeAVFrame->linesize[0]
while in the planar type each channel of the audio file is kept in a separate row of theAVFrame->data
array and the arrays have as sizeAVFrame->linesize[0]
.Is there a guide/tutorial that explains what do the numbers in the array mean for each of the formats ?