Recherche avancée

Médias (1)

Mot : - Tags -/iphone

Autres articles (80)

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

  • Contribute to translation

    13 avril 2011

    You can help us to improve the language used in the software interface to make MediaSPIP more accessible and user-friendly. You can also translate the interface into any language that allows it to spread to new linguistic communities.
    To do this, we use the translation interface of SPIP where the all the language modules of MediaSPIP are available. Just subscribe to the mailing list and request further informantion on translation.
    MediaSPIP is currently available in French and English (...)

Sur d’autres sites (9084)

  • Python subprocess : capture output of ffmpeg and run regular expression against it

    31 décembre 2014, par Jesse Adam

    I have the following code

    import subprocess
    import re
    from itertools import *

    command = ['ffprobe', '-i', '/media/some_file.mp4']
    p = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
    text = p.stderr.read()
    retcode = p.wait()
    text = text.decode('utf-8')
    p = re.compile("Duration(.*)")

    num = 0 #for debugging
    for line in iter(text.splitlines()):
       print(str(num) + line) #for debugging
       m = p.match(str(line))
       if m != None:
           print(m.group(1))

    When I look at the output there is a line that says "Duration" on it, however it is not captured, print(m.group(1)) is never reached. If I change the text variable to a hardcoded string of "Duration blahblah" I get " blahblah", which is what I expect. It seems like the regex doesn’t recognize the text coming back from stderr. How can I get the text into a format that the regex will recognize and match on ?


    I have come up with the following solution, should it help anyone else attempting to capture duration from ffmpeg using python

    import subprocess
    import re

    command = ['ffprobe', '-i', '/media/some_file.mp4']
    p = subprocess.Popen(command, stderr=subprocess.PIPE)
    text = p.stderr.read()
    retcode = p.wait()
    text = text.decode('utf-8')
    p = re.compile(".*Duration:\s([0-9:\.]*),", re.MULTILINE|re.DOTALL)
    m = p.match(text)
    print(m.group(1))
  • ffmpeg minterpolate and rubberband - how to stretch audio to fit ?

    5 juin 2023, par bossturbo

    What is the best way to control the length of the audio and pitch shift using rubberband ?

    


    I tried setting 'asetpts=PTS*16' to match the video PTS, but it appears to be ignored. The only thing that seems to determine the length of the audio is rubberband pitch. Even 'tempo=0.0625' does not appear to do anything.

    


    I would like to be able to set the audio length to match the slower video section and set the pitch to whatever I want, like minimum 0.15 and have it stretch the audio length as needed.

    


    ffmpeg -ss 123.978571 -i "original-120fps.MP4" -filter_complex "
[0:v]trim=0:0.375,setpts=PTS-STARTPTS,minterpolate='fps=480',setpts=PTS*16[slowv]; 
[0:a]atrim=0:0.375,asetpts=PTS-STARTPTS,rubberband=pitch=0.08:tempo=0.0625[slowa];"
 -y -r 60 -map [slowv] -map [slowa] -preset veryfast "output.mp4"


    


    Finally, is there a good guide to using lib-rubberband ? FFmpeg docs for rubberband doesn't explain anything.

    


  • Extract individual macroblock types and their corresponding motion vectors [closed]

    14 mai 2023, par Prajit Kumar

    I need to make a pair for each macroblock from a frame of a video containing its type and motion vector.

    


    I extracted motion vectors by using the python module of mv-extractor.

    


    For macroblock type I used ffmpeg command : ffmpeg -threads 1 -debug 'mb_type' -i file.h264 -f null -

    


    The info received from ffmpeg command doesn't match with the location of motion vectors extracted (Macroblocks which are divided into smaller blocks of size 8X16 or 16X8 do not match with the info of macroblock size received in motion vector info). Also, the ffmpeg command for extracting macroblock type doesn't work properly on some videos.

    


    Can you please tell a more streamlined way of doing this task.