Recherche avancée

Médias (1)

Mot : - Tags -/framasoft

Autres articles (76)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque 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, par

    Accé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, par

    Lors 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 user3584691

    As 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
    avutil : add P010 pixel format
    

    P010 is the 10-bit variant of NV12 (planar luma, packed chroma), using two
    bytes per component to store 10-bit data plus 6-bit zeroes in the LSBs.

    • [DH] libavutil/pixdesc.c
    • [DH] libavutil/pixfmt.h
    • [DH] libavutil/version.h
  • Saving raw YUV420P frame FFmpeg/Libav

    14 mars 2016, par Sir DrinksCoffeeALot

    Previously i successfully opened, decoded and saved frames from .mp4 file. Raw frames were in YUV420P format which i converted to RGB24 using sws_scale() function and saved them into a .ppm file. What i’m trying to do now is to keep raw decoded frames in YUV420P, or convert frames that i get to YUV420P just to make sure they are in YUV420P. 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 save YUV420P data.

    I used to save RGB24 in .ppmlike 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 mine saveFrame() 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);
    }