Recherche avancée

Médias (1)

Mot : - Tags -/belgique

Autres articles (38)

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

  • De l’upload à la vidéo finale [version standalone]

    31 janvier 2010, par

    Le chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
    Upload et récupération d’informations de la vidéo source
    Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
    Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)

Sur d’autres sites (4374)

  • create bar type wave forms using ffmpeg

    8 juillet 2016, par Ashish Joshi

    i am trying to create wave forms from mp3 using ffmpeg.
    i have successfully created waveforms like below

    enter image description here

    now i am having troubles with generating like below sample image...

    enter image description here

    the code i am using to generate vertical line is provided below...

    while (!feof($handle) && $data_point < $data_size) {
               if ($data_point++ % DETAIL == 0) {
                   $bytes = array();

                   // get number of bytes depending on bitrate
                   for ($i = 0; $i < $byte; $i++) {
                       $bytes[$i] = fgetc($handle);
                   }

                   switch ($byte) {
                   // get value for 8-bit wav
                   case 1:
                       $data = findValues($bytes[0], $bytes[1]);
                       break;
                   // get value for 16-bit wav
                   case 2:
                       if (ord($bytes[1]) & 128) {
                           $temp = 0;
                       } else {
                           $temp = 128;
                       }

                       $temp = chr((ord($bytes[1]) & 100) + $temp);
                       $data = floor(findValues($bytes[0], $temp) / 256);
                       break;
                   }

                   // skip bytes for memory optimization
                   fseek($handle, $ratio, SEEK_CUR);

                   // draw this data point
                   // relative value based on height of image being generated
                   // data values can range between 0 and 255
                   $v = (int) ($data / 255 * $height);

                   // don't print flat values on the canvas if not necessary
                   if (!($v / $height == 0.5 && !$draw_flat))
                   // draw the line on the image using the $v value and centering it vertically on the canvas
                   {
                       imageline($img,
                           // x1
                           (int) ($data_point / DETAIL),
                           // y1: height of the image minus $v as a percentage of the height for the wave amplitude
                           $height * $wav - $v,
                           // x2
                           (int) ($data_point / DETAIL),
                           // y2: same as y1, but from the bottom of the image
                           $height * $wav - ($height - $v), imagecolorallocate($img, $r, $g, $b));
                   }

                   imageline($img1,
                       // x1
                       (int) ($data_point / DETAIL),
                       // y1: height of the image minus $v as a percentage of the height for the wave amplitude
                       $height * $wav - $v,
                       // x2
                       (int) ($data_point / DETAIL),
                       // y2: same as y1, but from the bottom of the image
                       $height * $wav - ($height - $v), imagecolorallocate($img1, $r1, $g1, $b1));

               }

    any help is appreciated...

  • Anomalie #4562 : Suite #4468 : Unification des CSS pour les boutons et les icônes

    9 octobre 2020

    Ouais, une légère-subtile-discrète bordure en bas, ça reste raisonnable. J’ai essayé dans l’inspecteur, c’est pas mal, pourquoi pas.

    Il va quand même me falloir plus de lectures pour me faire une idée sur l’argument qui dit que sans ça les gens auraient du mal à identifier les boutons. Même dans les exemples de theming de material - c’est un peu eux qui ont remis au goût du jour les ombres portées et l’idée de relief et de strates verticales - ils donnent des exemples de boutons flat : https://material.io/design/material-theming/overview.html#material-theming
    Donc ça me semble pas être un horizon indépassable :p

    Concernant la couleur de base, à un moment j’hésitais à partir sur la couleur de l’utilisateur, la version claire.
    D’ailleurs vous noterez que c’est celle utilisée pour les boutons des formulaires, comme .boutons a déjà un fond de couleur claire j’ai fait une exception pour eux. Mais c’est bien des boutons de base, pas la variante .principal.
    Mais bon, j’étais pas convaincu, je préfèrerais quand même arriver à faire fonctionner le gris clair dans toutes les situations.
    Dans Bootstrap, Semantic-ui et cie, les boutons de base sont également gris clairs.

    Pour SVP je vais poursuivre dans les tickets liés du coup, sinon on va s’éparpiller.
    Juste @marcimat, le truc que je propose c’est ni plus ni moins que la maquette de rasta. C’est même moins d’ailleurs. Et j’ai rien de spécial à ajouter en plus.

  • Slightly wrong color in MP4 videos written by PyAV

    26 septembre 2024, par Yossi Kreinin

    I am writing MP4 video files with the following PyAV-based code (getting input frames represented as numpy arrays - the sort produced by imageio.imread - as input) :

    


    class MP4:
    def __init__(self, fname, width, height, fps):
        self.output = av.open(fname, 'w', format='mp4')
        self.stream = self.output.add_stream('h264', str(fps))
        self.stream.width = width
        self.stream.height = height
        # these 2 lines can be removed and the problem still reproduces:
        self.stream.pix_fmt = 'yuv420p'
        self.stream.options = {'crf': '17'}
    def write_frame(self, pixels):
        frame = av.VideoFrame.from_ndarray(pixels, format='rgb24')
        packet = self.stream.encode(frame)
        self.output.mux(packet)
    def close(self):
        packet = self.stream.encode(None)
        self.output.mux(packet)
        self.output.close()


    


    The colors in the output MP4 video are slightly different (apparently darker) than the colors in the input images :

    


    Screen grab of an image viewer showing an input frame :

    


    source image

    


    Screen grab of VLC playing the output MP4 video :

    


    MP4 output

    


    How can this problem be fixed ? I variously fiddled with the frame.colorspace attribute, stream options and VideoFrame.reformat but it changed nothing ; of course I could have been fiddling incorrectly.

    


    As you can see, the input has simple flat color regions, so I doubt it's any sort of compression artifact, eg YUV420 dropping some of the chroma info or other such.