Recherche avancée

Médias (91)

Autres articles (55)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • Initialisation de MediaSPIP (préconfiguration)

    20 février 2010, par

    Lors de l’installation de MediaSPIP, celui-ci est préconfiguré pour les usages les plus fréquents.
    Cette préconfiguration est réalisée par un plugin activé par défaut et non désactivable appelé MediaSPIP Init.
    Ce plugin sert à préconfigurer de manière correcte chaque instance de MediaSPIP. Il doit donc être placé dans le dossier plugins-dist/ du site ou de la ferme pour être installé par défaut avant de pouvoir utiliser le site.
    Dans un premier temps il active ou désactive des options de SPIP qui ne le (...)

  • La sauvegarde automatique de canaux SPIP

    1er avril 2010, par

    Dans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
    Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)

Sur d’autres sites (8626)

  • lavfi/metadata : fix metadata deletion if comparison returns false

    6 octobre 2016, par Marton Balint
    lavfi/metadata : fix metadata deletion if comparison returns false
    

    Reviewed-by : Paul B Mahol <onemda@gmail.com>
    Signed-off-by : Marton Balint <cus@passwd.hu>

    • [DH] libavfilter/f_metadata.c
  • Localization : Fixed ES number method validation message

    20 mai 2014, par nanotaboada
    Localization : Fixed ES number method validation message
    

    The validation message was targeted only to integers ("entero") while the
    number method validates decimals http://jqueryvalidation.org/number-method/

    Closes #1016

  • Python, grab frame number from FFMPEG

    22 janvier 2021, par Pyrometheous

    I'm using a script to compile an image sequence into a video.

    &#xA;

    def ffmpeg_image_sequence(image_sequence, video, fps, encoder):&#xA;        global task&#xA;        task = False&#xA;        path = os.path.dirname(os.path.realpath(image_sequence))&#xA;        image_format = {&#xA;            &#x27;png&#x27;: &#x27;\%06d.png&#x27;,&#xA;            &#x27;iff&#x27;: &#x27;\%06d.tiff&#x27;,&#xA;            &#x27;tif&#x27;: &#x27;\%06d.tif&#x27;,&#xA;            &#x27;jpg&#x27;: &#x27;\%06d.jpg&#x27;&#xA;        }&#xA;        sequence = path &#x2B; image_format[image_sequence[-3:]]&#xA;        output_options = {&#xA;            &#x27;crf&#x27;: 20,&#xA;            &#x27;preset&#x27;: &#x27;slow&#x27;,&#xA;            &#x27;movflags&#x27;: &#x27;faststart&#x27;,&#xA;            &#x27;pix_fmt&#x27;: &#x27;yuv420p&#x27;,&#xA;            &#x27;c:v&#x27;: encoder,&#xA;            &#x27;b:v&#x27;: &#x27;20M&#x27;&#xA;        }&#xA;        try:&#xA;            (&#xA;                ffmpeg&#xA;                    .input(sequence, framerate=fps)&#xA;                    .output(video, **output_options)&#xA;            ).run()&#xA;        except ffmpeg.Error as e:&#xA;            warning(str(e))&#xA;        task = True&#xA;

    &#xA;

    I'm using wxPython for the GUI and ffmpeg for compiling the frames :

    &#xA;

    import wx&#xA;import ffmpeg&#xA;

    &#xA;

    I'm running the above function in its own class so that it can be run in a different thread, allowing the statusbar to be updated with how much time has passed.

    &#xA;

    def wait(start, text):&#xA;    time.sleep(.05)&#xA;    time_running = round(time.time() - start)&#xA;    update_status_bar(main_window, text &#x2B; &#x27; (Time Elapsed: &#x27; &#x2B; seconds_to_str(time_running) &#x2B; &#x27;)&#x27;)&#xA;

    &#xA;

    I'd like to replace this with ETA and percentage completed. The window that pops up when running the ffmpeg_image_sequence function displays the following information :

    &#xA;

    frame=1234 fps= 16 q=13.0 size= 56789kB time=00:38:48.36 bitrate=12345.6kbits/sec speed=0.681x&#xA;

    &#xA;

    From what's printed to that window, I'd like to get the current frame= value to determine what percentage of the process is completed, then display something more like :

    &#xA;

    def wait(text, frame, number_of_frames):&#xA;    time.sleep(.05)&#xA;    current_frame = frame&#xA;    number_of_frames = number_of_files_in_dir - 1&#xA;    percentage = round(current_frame / number_of_frames, 1)&#xA;    update_status_bar(main_window, text &#x2B; &#x27; &#x27; &#x2B; percentage &#x2B; &#x27;% &#x27; &#x2B; Completed)&#xA;

    &#xA;

    With some math to calculate an ETA for completion as well.

    &#xA;

    So, is there a way to grab that output text from the ffmpeg and turn just that frame= number into a variable ?

    &#xA;