
Recherche avancée
Médias (1)
-
Richard Stallman et le logiciel libre
19 octobre 2011, par
Mis à jour : Mai 2013
Langue : français
Type : Texte
Autres articles (76)
-
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 (...) -
Initialisation de MediaSPIP (préconfiguration)
20 février 2010, parLors de l’installation de MediaSPIP, celui-ci est préconfiguré pour les usages les plus fréquents.
Cette préconfiguration est réalisée par un plugin activé par défaut et non désactivable appelé MediaSPIP Init.
Ce plugin sert à préconfigurer de manière correcte chaque instance de MediaSPIP. Il doit donc être placé dans le dossier plugins-dist/ du site ou de la ferme pour être installé par défaut avant de pouvoir utiliser le site.
Dans un premier temps il active ou désactive des options de SPIP qui ne le (...)
Sur d’autres sites (8346)
-
FFMPEG Understanding AVFrame::linesize (Audio)
4 décembre 2015, par user3584691As per the doucmentation of AVFrame, for audio, lineSize is size in bytes of each plane and only linesize[0] may be set. But however, am unsure whether lineszie[0] is holding per plane buffer size or is it the complete buffer size and we have to divide it by no of channels to get per plane buffer size.
For Example, when I call
int data_size = av_samples_get_buffer_size(NULL, iDesiredNoOfChannels, iAudioSamples, (AVSampleFormat)iDesiredFormat, 0) ;
For iDesiredNoOfChannels = 2, iAudioSamples = 1024 & iDesiredFormat = AV_SAMPLE_FMT_FLTP data_size=8192. Pretty straightforward, as each sample is 4 bytes and since there are 2 channels total memory will be (1024 * 4 * 2) bytes. As such lineSize[0] should be 4096 for planar audio. data[0] & data[1] should be each of size 4096. However, pFrame->lineSize[0] is giving 8192. So to get the size per plane, I have to do pFrame->lineSize[0] / pFrame->channels. Isn’t this behaviour different from what the documentation suggests or is my understanding of the documentaion wrong. -
avutil : add P010 pixel format
8 décembre 2015, par Hendrik Leppkes -
Saving raw YUV420P frame FFmpeg/Libav
14 mars 2016, par Sir DrinksCoffeeALotPreviously i successfully opened, decoded and saved frames from
.mp4
file. Raw frames were inYUV420P
format which i converted toRGB24
usingsws_scale()
function and saved them into a.ppm
file. What i’m trying to do now is to keep raw decoded frames inYUV420P
, or convert frames that i get toYUV420P
just to make sure they are inYUV420P
. But the problem is that i don’t know which type of file should i use, i’m guessing.yuv
? And another problem is that i also don’t know how to saveYUV420P
data.I used to save
RGB24
in.ppm
like this :for (y = 0; y < height; y++)
{
fwrite(frame->data[0] + y*frame->linesize[0], 1, width * 3, pf);
}which worked fine since i was using only 1 plane. But
YUV420P
uses 3 planes (Y,Cb,Cr). What i tried to do is to save Y component first, and Cb/Cr after that.for (y = 0; y < height; y++)
{
fwrite(frame->data[0] + y*frame->linesize[0], 1, width, pf);
}
for (y = 0; y < height / 2; y++)
{
fwrite(frame->data[1] + y*frame->linesize[1], 1, width, pf);
fwrite(frame->data[2] + y*frame->linesize[2], 1, width, pf);
}But as you can guess that is not working at all. Actually it does, but it saves only Y component. Could anyone guide me to right direction please ?
EDIT
I’ve changed minesaveFrame()
function like you said, but instead of interleaved chroma writing i used planar. But, i’m still getting only Y component picture (black-white).fprintf(pf, "P5\n%d %d\n255\n", width, height);
for (y = 0; y < height; y++)
{
fwrite(frame->data[0] + y*frame->linesize[0], 1, width, pf);
}
for (y = 0; y < height / 2; y++)
{
fwrite(frame->data[1] + y*frame->linesize[1], 1, width / 2, pf);
}
for (y = 0; y < height / 2; y++)
{
fwrite(frame->data[2] + y*frame->linesize[2], 1, width / 2, pf);
}