Recherche avancée

Médias (3)

Mot : - Tags -/plugin

Autres articles (58)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-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

  • Pas question de marché, de cloud etc...

    10 avril 2011

    Le vocabulaire utilisé sur ce site essaie d’éviter toute référence à la mode qui fleurit allègrement
    sur le web 2.0 et dans les entreprises qui en vivent.
    Vous êtes donc invité à bannir l’utilisation des termes "Brand", "Cloud", "Marché" etc...
    Notre motivation est avant tout de créer un outil simple, accessible à pour tout le monde, favorisant
    le partage de créations sur Internet et permettant aux auteurs de garder une autonomie optimale.
    Aucun "contrat Gold ou Premium" n’est donc prévu, aucun (...)

Sur d’autres sites (12086)

  • C# 16-bit grayscale Bitmap array to video

    7 mars 2024, par Everyone

    I have some scientific data that comes in 16-bit grayscale and is unsigned. I need the wide range of grayscale values and C# already supports the format for Bitmap structure using PixelFormat.Format16bppGrayScale, I am conducting some operations on the data and saving it into a List and I would like to write it into a video file for viewing.

    


    I have looked for many FFMPEG libraries out there and I saw Accord.Video.FFMPEG which does support 32-bit ARGB, when I converted the Bitmaps into ARGB it worked and I could write the video file like this :

    


      int height = images[0].Height;
  int width = images[0].Width;
  var frameRate = 8;

  // create instance of video writer
  var vFWriter = new VideoFileWriter();
  // create new video file
  vFWriter.Open(outputVid + ".mp4", width, height, frameRate, VideoCodec.MPEG4);
  
  
  for(int i=0; i/ MAIN LINE OF FOCUS
  }
  vFWriter.Close();
  vFWriter.Dispose();


    


    As can be seen in the code there is no Stride nor PixelFormat provided to the VideoFileWriter and as per the documentation there are no such properties in the class.

    


    I saw a similar issue people had with C++ and OpenCV2 where the only codec that supports 16-bit grayscale was FFV1. I knew it was a long shot but I tried it :

    


      vFWriter.Open(outputVid + ".mkv", width, height, frameRate, VideoCodec.FFV1);


    


    However, as expected, it yielded no results.

    


    The issue is an exception that is thrown stating the image being written into the VideoFileWriter about the argument being invalid :

    


    


    Unhandled Exception : System.ArgumentException : Parameter is not valid.
    
at System.Drawing.Bitmap.LockBits(Rectangle rect, ImageLockMode flags, PixelFormat format, BitmapData bitmapData)
    
at System.Drawing.Bitmap.LockBits(Rectangle rect, ImageLockMode flags, PixelFormat format)
    
at Accord.Video.FFMPEG.VideoFileWriter.WriteVideoFrame(Bitmap frame, UInt32 frameIndex)

    


    


    This is a common error when the PixelFormat is mismatched (the video writer wants 32-bit ARGB but it is receiving 16-bit grayscale).

    


    I confirmed this was the case by updating the write code to this :

    


      for(int i=0; icode>

    


    And now the exception thrown says :

    


    


    Unhandled Exception : System.ArgumentException : The provided bitmap must be 24 or 32 bpp color image or 8 bpp grayscale image.

    


    


    I cannot afford to convert to 32-bit ARGB because that only allows 256 of grayscale and I need the whole 16-bit range.

    


    I looked at other libraries that handle FFMPEG with C# and found Xabe.FFMPEG but it does not support constructing a video from images.

    


    Are there libraries other than Accord.Video.FFMPEG which are capable of constructing a video from 16-bit grayscale frames ?

    


  • Revision 29188 : 2 options de plus pour personnaliser la page d’activation de la mutu : * ...

    15 juin 2009, par real3t@… — Log

    2 options de plus pour personnaliser la page d’activation de la mutu :
    * ’branding’ : texte libre en HTML
    * ’branding_logo’ => logo (sous forme de HTML)

  • Revision 31960 : Sur la page de création de chaque menu, un lien direct pour voir ce qu’il ...

    7 octobre 2009, par rastapopoulos@… — Log

    Sur la page de création de chaque menu, un lien direct pour voir ce qu’il donne une fois généré.