Recherche avancée

Médias (3)

Mot : - Tags -/collection

Autres articles (4)

  • Personnaliser les catégories

    21 juin 2013, par

    Formulaire de création d’une catégorie
    Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
    Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire.
    Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
    Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

  • Configuration spécifique pour PHP5

    4 février 2011, par

    PHP5 est obligatoire, vous pouvez l’installer en suivant ce tutoriel spécifique.
    Il est recommandé dans un premier temps de désactiver le safe_mode, cependant, s’il est correctement configuré et que les binaires nécessaires sont accessibles, MediaSPIP devrait fonctionner correctement avec le safe_mode activé.
    Modules spécifiques
    Il est nécessaire d’installer certains modules PHP spécifiques, via le gestionnaire de paquet de votre distribution ou manuellement : php5-mysql pour la connectivité avec la (...)

Sur d’autres sites (2138)

  • lavu/riscv : helper macro for VTYPE encoding

    5 octobre 2022, par Rémi Denis-Courmont
    lavu/riscv : helper macro for VTYPE encoding
    

    On most cases, the vector type (VTYPE) for the RISC-V Vector extension
    is supplied as an immediate value, with either of the VSETVLI or
    VSETIVLI instructions. There is however a third instruction VSETVL
    which takes the vector type from a general purpose register. That is so
    the type can be selected at run-time.

    This introduces a macro to load a (valid) vector type into a register.
    The syntax follows that of VSETVLI and VSETIVLI, with element size,
    group multiplier, then tail and mask policies.

    • [DH] libavutil/riscv/asm.S
  • How to pipe live video frames from ffmpeg to PIL ?

    30 janvier 2017, par Ryan Martin

    I need to use ffmpeg/avconv to pipe jpg frames to a python PIL (Pillow) Image object, using gst as an intermediary*. I’ve been searching everywhere for this answer without much luck. I think I’m close - but I’m stuck. Using Python 2.7

    My ideal pipeline, launched from python, looks like this :

    1. ffmpeg/avconv (as h264 video)
    2. Piped ->
    3. gst-streamer (frames split into jpg)
    4. Piped ->
    5. Pil Image Object

    I have the first few steps under control as a single command that writes .jpgs to disk as furiously fast as the hardware will allow.

    That command looks something like this :

    command = [
           "ffmpeg",
           "-f video4linux2",
           "-r 30",
           "-video_size 1280x720",
           "-pixel_format 'uyvy422'",
           "-i /dev/video0",
           "-vf fps=30",
           "-f H264",
           "-vcodec libx264",
           "-preset ultrafast",
           "pipe:1 -",
           "|", # Pipe to GST
           "gst-launch-1.0 fdsrc !",
           "video/x-h264,framerate=30/1,stream-format=byte-stream !",
           "decodebin ! videorate ! video/x-raw,framerate=30/1 !",
           "videoconvert !",
           "jpegenc quality=55 !",
           "multifilesink location=" + Utils.live_sync_path + "live_%04d.jpg"
         ]

    This will successfully write frames to disk if ran with popen or os.system.

    But instead of writing frames to disk, I want to capture the output in my subprocess pipe and read the frames, as they are written, in a file-like buffer that can then be read by PIL.

    Something like this :

       import subprocess as sp
       import shlex
       import StringIO

       clean_cmd = shlex.split(" ".join(command))
       pipe = sp.Popen(clean_cmd, stdout = sp.PIPE, bufsize=10**8)

       while pipe:

           raw = pipe.stdout.read()
           buff = StringIO.StringIO()
           buff.write(raw)
           buff.seek(0)

           # Open or do something clever...
           im = Image.open(buff)
           im.show()

           pipe.flush()

    This code doesn’t work - I’m not even sure I can use "while pipe" in this way. I’m fairly new to using buffers and piping in this way.

    I’m not sure how I would know that an image has been written to the pipe or when to read the ’next’ image.

    Any help would be greatly appreciated in understanding how to read the images from a pipe rather than to disk.

    • This is ultimately a Raspberry Pi 3 pipeline and in order to increase my frame rates I can’t (A) read/write to/from disk or (B) use a frame by frame capture method - as opposed to running H246 video directly from the camera chip.
  • FFMPEG - Add (white, color-less, analog) grain to the video without desaturating video itself

    2 décembre 2018, par dd_code

    I am working on old videos where I am basically converting them to HVEC and sharpening, so i.e. my command can look like this

    .\ffmpeg.exe -i F:\file.mkv -vf unsharp=3:3:1.5 -c:v hevc_nvenc -qp 27 -a:c copy file_new.mkv

    inherent problem with this is, of course that with reducing bitrate and sharpening every now and then I can notice some nasty artifacts around the edges and on at plain-color objects.

    I noticed with some older, many times remastered movies/series that they have quite a lot of grain in the video, so I was thinking - what if I add grain and help it to mask the compression and sharpening artifacts ?

    After bit of searching I got to
    https://ffmpeg.org/ffmpeg-filters.html#noise
    and now I am using this command

    .\ffmpeg.exe -i F:\file.mkv -vf unsharp=3:3:1.5,noise=alls=14:allf=t+u -c:v hevc_nvenc -qp 30 -a:c copy file_new.mkv

    however this has one big problem, it is merely a digital RGB noise, is there a way to make it desaturated, analog-ish ? I tried adding h=s=0, however this is applying 0 saturation to the video track as a whole. Is there an effect which would achieve this or is there a way that I can reduce the saturation only of the very effect which then gets to "overlay" the video track, so the track would not be touched ?