Recherche avancée

Médias (1)

Mot : - Tags -/MediaSPIP

Autres articles (108)

  • Modifier la date de publication

    21 juin 2013, par

    Comment changer la date de publication d’un média ?
    Il faut au préalable rajouter un champ "Date de publication" dans le masque de formulaire adéquat :
    Administrer > Configuration des masques de formulaires > Sélectionner "Un média"
    Dans la rubrique "Champs à ajouter, cocher "Date de publication "
    Cliquer en bas de la page sur Enregistrer

  • 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" ;

  • Contribute to documentation

    13 avril 2011

    Documentation is vital to the development of improved technical capabilities.
    MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
    To contribute, register to the project users’ mailing (...)

Sur d’autres sites (11492)

  • mp3dec : decode more data from Info header

    13 avril 2014, par Alessandro Ghedini
    mp3dec : decode more data from Info header
    

    Signed-off-by : Anton Khirnov <anton@khirnov.net>

    • [DH] libavformat/avio_internal.h
    • [DH] libavformat/aviobuf.c
    • [DH] libavformat/mp3dec.c
  • Java Process start a subprocess and the main process cannot be terminated [closed]

    10 avril 2024, par Dodge_X

    I use java Process to run a script, the main process of the script start a subprocess, and the subprocess hanging, so I could not monitor if the script is closed.

    &#xA;

               Process process = processBuilder.command(commands).start();&#xA;           try (BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()))) {&#xA;                String line;&#xA;                while ((line = reader.readLine()) != null) {&#xA;                    log.info("win exec get msg:{}", line);&#xA;                }&#xA;            }&#xA;&#xA;            // cannot be finished here &#xA;            int exitCode = process.waitFor();&#xA;            log.info("script exited with code: " &#x2B; exitCode);&#xA;

    &#xA;

    This command executes a python script, which uses ffmpeg to generate a video.

    &#xA;

    import subprocess&#xA;import time&#xA;import signal&#xA;&#xA;&#xA;command = "ffmpeg -framerate 5 -i F:\\screenshots\\screenshot_%04d.png -c:v libx264 -pix_fmt yuv420p -y F:\\website_recording.mp4"&#xA;p = subprocess.Popen(command, shell=True, close_fds=True)&#xA;&#xA;pid = p.pid&#xA;time.sleep(10)&#xA;p.send_signal(signal.SIGTERM)&#xA;&#xA;print("process finished")&#xA;

    &#xA;

    The problem is that the ffmpeg subprocess is attached to the java started process, so it could not be terminated while the script was exiting. I have to kill the ffmpeg subprocess first that the exit code can be obtained.

    &#xA;

    enter image description here

    &#xA;

  • Evolution #2173 : Date de création / publication

    17 juillet 2017, par nico d_

    J’avais pensé traiter ça sur une table pour un dév en cours avec deux champs en DEFAULT CURRENT_TIMESTAMP :

    `date_creation` DATETIME DEFAULT CURRENT_TIMESTAMP,<br />`maj` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,

    (c) chez moi ça marche, du coup ça me paraissait une solution propre et généralisable, mais le serveur de prod est en Mysql 5.1 et ça ne marche qu’à partir de Mysql 5.6.5 :
    https://stackoverflow.com/questions/4897002/mysql-current-timestamp-on-create-and-on-update
    Du coup, pas utilisable en natif pour SPIP...

    J’ai fait autrement et rapidement (directement dans le formulaire_traiter), mais j’aurais pu faire plus propre et passer par le pipeline pre_insertion en renseignant automatiquement date_creation dans $flux[’data’].

    Mais je me dis que ça pourrait faire l’objet d’un plugin, qui ajouterait donc des champs date_creation à toutes les tables déjà existantes qui n’en ont pas (auteurs, mots etc + objets persos), et qui utiliserait ce pipeline pour renseigner les date de création automatiquement si le champ existe dans la description de la table $flux[’args’][’table’] de l’objet inséré.

    Ça ressemblerait aux behaviors des ORM, comme Propel / Timestampable :
    http://propelorm.org/Propel/documentation/07-behaviors.html
    http://propelorm.org/Propel/behaviors/timestampable

    A tester...