Recherche avancée

Médias (91)

Autres articles (48)

  • Mise à jour de la version 0.1 vers 0.2

    24 juin 2013, par

    Explications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
    Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

Sur d’autres sites (10781)

  • Python subprocess.Popen + ffmpeg breaks terminal input

    16 décembre 2020, par Barney Suit

    I was writing a module to create random screenshots from a video and used subprocess.Popen to run multiple commands in parallel but this leads to terminal refusing from showing any input once the python program is finished running. But it still accepts most inputs given from the keyboard it just doesn't display it.

    


    Only if I type the reset command terminal starts working fine
This happened on ssh with putty and other ssh clients even ssh with powershell on windows and directly running on terminal with VNC

    


    But without ssh directly running the same command on windows ssh works fine and and inputs are visible

    


    here's a gif example for whats happening
enter image description here

    


    and code to replicate it

    


    #!/usr/bin/env python3.8
from subprocess import Popen

def create_screenshots():

    commands = ['ffmpeg -hide_banner -loglevel panic -ss 329  -i "/home/user/file.mkv" -y -vframes 1   "/home/user/file.329.frame.png"',
                'ffmpeg -hide_banner -loglevel panic -ss 312  -i "/home/user/file.mkv" -y -vframes 1   "/home/user/file.312.frame.png"',
                'ffmpeg -hide_banner -loglevel panic -ss 533  -i "/home/user/file.mkv" -y -vframes 1   "/home/user/file.533.frame.png"',
                'ffmpeg -hide_banner -loglevel panic -ss 444  -i "/home/user/file.mkv" -y -vframes 1   "/home/user/file.444.frame.png"',
                'ffmpeg -hide_banner -loglevel panic -ss 411  -i "/home/user/file.mkv" -y -vframes 1   "/home/user/file.411.frame.png"',
                'ffmpeg -hide_banner -loglevel panic -ss 413  -i "/home/user/file.mkv" -y -vframes 1   "/home/user/file.413.frame.png"']
    screenshot_files = []
    processes = [Popen(command, shell=True) for command in commands]
    for process in processes:
        process.wait()
    
    return screenshot_files


create_screenshots()


    


  • Programmatically using terminal in linux escapes my command

    21 février 2023, par David Chavez

    Using nodeJS exec function which runs my command from a new process overwrites my backslashes which makes my command invalid. How can I prevent this or use a workaround ?

    


    I need the final command to look like this :
    
...drawtext=text='timestamp \: %{pts \: localtime...

    


    With that code, \: is escaped into :.
    
Using \\: is escaped into \\: while I'm expecting \:

    


    How do I get ...drawtext=text='timestamp \: %{pts \: localtime... to be ran ?

    


    // This command works if pasted directly into terminal
const ffmnpegCode = `ffmpeg -i /path/input.mp4 -y -r 25   -ss 0 -to 124 -c:v libx264 -c:a aac -vf "scale=1920:1080:force_original_aspect_ratio=decrease,pad=1920:1080:(ow-iw)/2:(oh-ih)/2,setsar=1,drawtext=text='timestamp \: %{pts \: localtime \: 1665679092.241 \: %m-%d-%Y %H\\\\\:%M\\\\\:%S}': x=(w-text_w-10): y=(h-text_h-5): fontsize=45: fontcolor=white@0.9: box=1: boxcolor=black@0.6: fontfile='/path/OpenSans-Regular.ttf'" /path/output.mp4`
const encode = async ffmpegCode => {
    try {
        await execPromise(ffmpegCode);
        return 200
    } catch (err) {
        console.log(err)
    }
}


    


    JS adds extra \ which breaks my command

    


  • What does the variable ${i%.*} mean in terminal ?

    17 mars 2020, par wongz

    This shell command converts all .avi to .mp4 as per this answer by @llogan

    Can someone explain how $i%.* works ?
    In particular, what does % do ?

    for i in *.avi; do ffmpeg -i "$i" "${i%.*}.mp4"; done