Recherche avancée

Médias (91)

Autres articles (36)

  • Ajouter notes et légendes aux images

    7 février 2011, par

    Pour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
    Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
    Modification lors de l’ajout d’un média
    Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)

  • Librairies et logiciels spécifiques aux médias

    10 décembre 2010, par

    Pour un fonctionnement correct et optimal, plusieurs choses sont à prendre en considération.
    Il est important, après avoir installé apache2, mysql et php5, d’installer d’autres logiciels nécessaires dont les installations sont décrites dans les liens afférants. Un ensemble de librairies multimedias (x264, libtheora, libvpx) utilisées pour l’encodage et le décodage des vidéos et sons afin de supporter le plus grand nombre de fichiers possibles. Cf. : ce tutoriel ; FFMpeg avec le maximum de décodeurs et (...)

  • Librairies et binaires spécifiques au traitement vidéo et sonore

    31 janvier 2010, par

    Les logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
    Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
    Binaires complémentaires et facultatifs flvtool2 : (...)

Sur d’autres sites (7593)

  • Catch refreshing Terminal output in Python

    26 janvier 2019, par Aaroknight

    I have written a python script which converts movies with ffmpeg from anything to h265 (hevc). Works fine so far now and I get catch a terminal output (How can I get terminal output in python ? - Stackoverflow). I already tried this solution as well : Catching Terminal Output in Python - Stackoverflow But none of them is really what I need.

    Current code is following :

    def convert(path):
    if os.path.getsize(path) < 500000000:
       pass
    name = path.split("/")[-1]
    os.mkdir(path.replace(name, "hevc/"))
    outvid = path.replace(name, "hevc/" + name)
    cmd = ["ffmpeg", "-hwaccel", "cuvid", "-i", path, "-c:v", "hevc_nvenc", "-preset",
          "slow", "-rc", "vbr_hq", "-max_muxing_queue_size", "1000", "-map", "0", "-map_metadata",
          "0", "-map_chapters", "0", "-c:a", "copy", "-c:s", "copy", outvid]

    process = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0]
    print(process)

    While ffmpeg is converting something, the bottom terminal line usually actualizes itself every second showing fps, time, etc. See screenshot bottom line.

    Normal ffmpeg output

    In Python I just get a static output :

    Python IDE output

    So do you guys have any idea how to catch that refreshing output ?

  • Terminal text becomes invisible after terminating subprocess

    21 novembre 2016, par wim

    After terminating an ffmpeg subprocess, the terminal gets messed up - typed characters are invisible ! The input still works in that commands can be executed, but keyboard input is not echoed to the terminal.

    Issuing shell command reset puts everything back to normal (or !reset from within ipython), so a workaround the issue is calling os.system('reset') inside the script.

    Other things I’ve tried : import curses; curses.initscr() before spawning the subprocess and curses.endwin() after termination, which worked somewhat but broke other stuff. Another possibly related issue is that after spawning the child process, the interactive terminal becomes laggy and sometimes fails to capture typed characters.

    The code to spawn the process looks like :

    with open('/tmp/stdout.log', 'w') as o:
       with open('/tmp/stderr.log', 'w') as e:
           proc = subprocess.Popen([args], stdout=o, stderr=e)

    And later to stop it :

    proc.terminate()
    proc.communicate()

    What could be going wrong here ?

  • Terminal text becomes invisible after terminating subprocess

    22 mai 2022, par wim

    After terminating an ffmpeg subprocess, the terminal gets messed up - typed characters are invisible ! The input still works in that commands can be executed, but keyboard input is not echoed to the terminal.

    



    Issuing shell command reset puts everything back to normal (or !reset from within ipython), so a workaround the issue is calling os.system('reset') inside the script.

    



    Other things I've tried : import curses; curses.initscr() before spawning the subprocess and curses.endwin() after termination, which worked somewhat but broke other stuff. Another possibly related issue is that after spawning the child process, the interactive terminal becomes laggy and sometimes fails to capture typed characters.

    



    The code to spawn the process looks like :

    



    with open('/tmp/stdout.log', 'w') as o:
    with open('/tmp/stderr.log', 'w') as e:
        proc = subprocess.Popen([args], stdout=o, stderr=e)


    



    And later to stop it :

    



    proc.terminate()
proc.communicate()


    



    What could be going wrong here ?