Recherche avancée

Médias (0)

Mot : - Tags -/médias

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (9)

  • Demande de création d’un canal

    12 mars 2010, par

    En fonction de la configuration de la plateforme, l’utilisateur peu avoir à sa disposition deux méthodes différentes de demande de création de canal. La première est au moment de son inscription, la seconde, après son inscription en remplissant un formulaire de demande.
    Les deux manières demandent les mêmes choses fonctionnent à peu près de la même manière, le futur utilisateur doit remplir une série de champ de formulaire permettant tout d’abord aux administrateurs d’avoir des informations quant à (...)

  • Organiser par catégorie

    17 mai 2013, par

    Dans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
    Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
    Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...)

  • Les thèmes de MediaSpip

    4 juin 2013

    3 thèmes sont proposés à l’origine par MédiaSPIP. L’utilisateur MédiaSPIP peut rajouter des thèmes selon ses besoins.
    Thèmes MediaSPIP
    3 thèmes ont été développés au départ pour MediaSPIP : * SPIPeo : thème par défaut de MédiaSPIP. Il met en avant la présentation du site et les documents média les plus récents ( le type de tri peut être modifié - titre, popularité, date) . * Arscenic : il s’agit du thème utilisé sur le site officiel du projet, constitué notamment d’un bandeau rouge en début de page. La structure (...)

Sur d’autres sites (3182)

  • How can I get Python to find ffprobe ?

    4 novembre 2018, par tburrows13

    I have ffmpeg and ffprobe installed on my mac (macOS Sierra), and I have added their path to PATH. I can run them from terminal.

    I am trying to use ffprobe to get the width and height of a video file using the following code :

    import subprocess
    import shlex
    import json


    # function to find the resolution of the input video file
    def findVideoResolution(pathToInputVideo):
       cmd = "ffprobe -v quiet -print_format json -show_streams"
       args = shlex.split(cmd)
       args.append(pathToInputVideo)
       # run the ffprobe process, decode stdout into utf-8 & convert to JSON
       ffprobeOutput = subprocess.check_output(args).decode('utf-8')
       ffprobeOutput = json.loads(ffprobeOutput)

       # find height and width
       height = ffprobeOutput['streams'][0]['height']
       width = ffprobeOutput['streams'][0]['width']

       return height, width

    h, w = findVideoResolution("/Users/tomburrows/Documents/qfpics/user1/order1/movie.mov")
    print(h, w)

    I am sorry I cannot provide a MCVE, as I didn’t write this code, and I don’t really know how it works.

    It gives the following error :

    Traceback (most recent call last):
     File "/Users/tomburrows/Dropbox/Moviepy Tests/get_dimensions.py", line 21, in <module>
       h, w = findVideoResolution("/Users/tomburrows/Documents/qfpics/user1/order1/movie.mov")
     File "/Users/tomburrows/Dropbox/Moviepy Tests/get_dimensions.py", line 12, in findVideoResolution
       ffprobeOutput = subprocess.check_output(args).decode('utf-8')
     File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/subprocess.py", line 626, in check_output
       **kwargs).stdout
     File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/subprocess.py", line 693, in run
       with Popen(*popenargs, **kwargs) as process:
     File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/subprocess.py", line 947, in __init__
       restore_signals, start_new_session)
     File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/subprocess.py", line 1551, in _execute_child
       raise child_exception_type(errno_num, err_msg)
    FileNotFoundError: [Errno 2] No such file or directory: 'ffprobe'
    </module>

    If python is not reading from the PATH file, how can I specify where ffprobe is ?

    Edit :
    It appears the python path is not aligned with my shell path.
    Using os.environ["PATH"]+=":/the_path/of/ffprobe/dir" at the beginning of each program allows me to use ffprobe, but why might my python path not be the same as my shell path ?

  • Apply Loop for Subprocessing Call FFMPEG in Python

    25 novembre 2019, par rayyar

    suppose I have a audio mp3 file with length 00:04:00 (240 seconds). I want to extract parts of said file each within range 2 seconds, so it would be :

    File_01 00:00:00-00:00:02, File_02 00:00:02-00:00:04, File_03 00:00:04-00:00:06 ... File_120 00:03:58-00:04:00.

    I am using python, call module subprocess to run ffmpeg function. What I did, I simply put it in a loop like this :

    count = 0
    count2 = 2
    count3 = 1
    while count2 &lt;= audio_length:
       ffmpeg = 'ffmpeg -i input.mp3 -c copy -ss %d -to %d output%d.wav' % (count, count2, count3)
       subprocess.call(ffmpeg, shell=True)
       count = count + 2
       count2 = count2 + 2
       count3 = count3 + 1

    However, the subprocess part took a long time and it seems stucked. I’ve searched some insights, but i haven’t found any that mentions about looping. Any help appreciated.

  • Python 3 subprocess.popen() doesn't work on linux. Works on windows [closed]

    30 avril 2021, par user2628458
    process = subprocess.Popen(&#xA;    cmd, shell=True,&#xA;    stdout=subprocess.PIPE, stderr=subprocess.STDOUT,&#xA;     universal_newlines=True)&#xA;for line in process.stdout:&#xA;    # ...&#xA;

    &#xA;

    I have this line that executes an FFmpeg job and throws out every line in the output to a variable. It works fine on Windows, but doesn't work at all on Linux. The for loop never gets executed. I can't find anything about this, or the difference between Windows and Linux subprocess.Popen(). Can you please point me the right way to fix this ?

    &#xA;