Recherche avancée

Médias (1)

Mot : - Tags -/biomaping

Autres articles (56)

  • Formulaire personnalisable

    21 juin 2013, par

    Cette page présente les champs disponibles dans le formulaire de publication d’un média et il indique les différents champs qu’on peut ajouter. Formulaire de création d’un Media
    Dans le cas d’un document de type média, les champs proposés par défaut sont : Texte Activer/Désactiver le forum ( on peut désactiver l’invite au commentaire pour chaque article ) Licence Ajout/suppression d’auteurs Tags
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire. (...)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

  • Qu’est ce qu’un masque de formulaire

    13 juin 2013, par

    Un masque de formulaire consiste en la personnalisation du formulaire de mise en ligne des médias, rubriques, actualités, éditoriaux et liens vers des sites.
    Chaque formulaire de publication d’objet peut donc être personnalisé.
    Pour accéder à la personnalisation des champs de formulaires, il est nécessaire d’aller dans l’administration de votre MediaSPIP puis de sélectionner "Configuration des masques de formulaires".
    Sélectionnez ensuite le formulaire à modifier en cliquant sur sont type d’objet. (...)

Sur d’autres sites (9179)

  • FFmpeg sws_scale crash at certain resolution

    23 mai 2016, par Tamás Szobonya

    I’m having a weird issue with sws_scale. The problem is, that at certain resolutions i got an Access violation reading location exception. Resolutions like 1920x1080, 1600x900 works, but 1280x720 doesn’t ? This happens in a c++ cli code which is called from c#. Every project is x64 build (no Any CPU) on a Win7 x64.

    c++ cli code :

    void FFmpegWrapper::Codec::E(int width, int height, IntPtr dataIn, [Out] IntPtr %dataOut)
    {
       int ret;
       AVFrame *f, *fIn, *fOut;
       f = av_frame_alloc();
       fIn = av_frame_alloc();
       fOut = av_frame_alloc();

       fIn->format = AV_PIX_FMT_RGB24;
       fIn->width = width;
       fIn->height = height;
       ret = av_image_alloc(fIn->data, fIn->linesize, width, height, AV_PIX_FMT_RGB24, 32);

       f->format = AV_PIX_FMT_YUV420P;
       f->width = width;
       f->height = height;
       ret = av_image_alloc(f->data, f->linesize, width, height, AV_PIX_FMT_YUV420P, 32);

       fOut->format = AV_PIX_FMT_RGB24;
       fOut->width = width;
       fOut->height = height;
       ret = av_image_alloc(fOut->data, fOut->linesize, width, height, AV_PIX_FMT_RGB24, 32);


       uint8_t *data = (uint8_t*)dataIn.ToPointer();
       fIn->data[0] = data;

       //with or without struct no difference
       /*struct */SwsContext *convertCtx = sws_getContext(width, height, AV_PIX_FMT_RGB24, width, height, AV_PIX_FMT_YUV420P, 0, NULL, NULL, NULL);

       // CRASH here
       sws_scale(convertCtx, fIn->data, fIn->linesize, 0, height, f->data, f->linesize);

       convertCtx = sws_getContext(width, height, AV_PIX_FMT_YUV420P, width, height, AV_PIX_FMT_RGB24, 0, NULL, NULL, NULL);

       sws_scale(convertCtx, f->data, f->linesize, 0, height, fOut->data, fOut->linesize);

       dataOut = (IntPtr)fIn->data[0];

    }

    And its called from c# like this :

    FFmpegWrapper.Codec test = new FFmpegWrapper.Codec();

    Bitmap image = new Bitmap(w, h, PixelFormat.Format24bppRgb);

    // Get a screenshot from the desktop
    Screen.Capture(w, h, image, PixelFormat.Format24bppRgb);

    Rectangle rec = new Rectangle(0, 0, image.Width, image.Height);
    BitmapData bitmapData = image.LockBits(rec, ImageLockMode.ReadWrite, image.PixelFormat);

    IntPtr ptr = bitmapData.Scan0;

    IntPtr testptr1;

    test.E(w, h, ptr, out testptr1);

    // We never reach this with 1280x720 resolution
    Bitmap bmp = new Bitmap(w, h, w * 3, PixelFormat.Format24bppRgb, testptr1);

    bmp.Save(@"H:\sajt1.bmp", ImageFormat.Bmp);

    What i don’t understand is, how can it work with certain resolutions and crash with others ?
    Using 20160512-git-cd244fa-win64 version of ffmpeg.

    Edit :
    It seems, that changing AV_PIX_FMT_RGB24 to AV_PIX_FMT_BGR24 fixes it, but I’m not sure why. I know that .Net stores the pixels in bgr, but why does wrong format crashes it ? And only at some resolutions ?

  • Taking a high resolution picture with FFMPEG and Webcam

    13 mai 2016, par user2088176

    I have a Microsoft LifeCam VX-3000 and I want to capture a single image from this video source.

    I have tried DirectShow :

    ffmpeg -f dshow -video_size 1280x960 -i video="Microsoft LifeCam VX-3000" -vframes 1 file.jpg

    [dshow @ 01D69340] Could not set video options

    and
    Microsoft WDM Image Capture :

    ffmpeg -f vfwcap -video_size 1280x960 -i video="Microsoft LifeCam VX-3000" -vframes 1 file.jpg

    [vfwcap @ 01D79340] Could not set Video Format.

    If I lower the video size to 640x480, it works, but every sites tells me that 640x480 is the maximum video resolution, but the still picture maximum resolution is 1280x960. Like here

    I would like to capture the image at the highest resolution possible. Is there a way to do it with FFMPEG ? What command-line options should I give it ?

    Thank you very much.

  • How to get the highest resolution, dividable by 2 that contains the video without black borders after rotation ?

    22 avril 2016, par Vitalis Hommel

    I rotate a video. Then my goal is to get the biggest resolution, dividable by 2 that contains the video without black borders.

    rotated and bigger

    to

    rotated, smaller and dividable by 2

    My approach.

    ffmpeg -ss 6 -i "t.MP4" -ss 0 -t 5 -vf "rotate='8*PI/180:ow=hypot(iw,ih):oh=ow', scale='1920:1920', crop='1920:1080:0:420'" -c:v libx264 -crf 28 -acodec copy "t2.MP4"

    But that does not meet the criteria. Which command do I need ?