Recherche avancée

Médias (1)

Mot : - Tags -/book

Autres articles (46)

  • Supporting all media types

    13 avril 2011, par

    Unlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)

  • Dépôt de média et thèmes par FTP

    31 mai 2013, par

    L’outil MédiaSPIP traite aussi les média transférés par la voie FTP. Si vous préférez déposer par cette voie, récupérez les identifiants d’accès vers votre site MédiaSPIP et utilisez votre client FTP favori.
    Vous trouverez dès le départ les dossiers suivants dans votre espace FTP : config/ : dossier de configuration du site IMG/ : dossier des média déjà traités et en ligne sur le site local/ : répertoire cache du site web themes/ : les thèmes ou les feuilles de style personnalisées tmp/ : dossier de travail (...)

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

Sur d’autres sites (2061)

  • How can i use exiftool ffmpeg and python to create a script that collects videos/images and puts them in a sequence ?

    15 mars 2019, par David G

    Hey all I am rather new to scripting in python and am looking for some help with a script that i am working on. the script i have in python uses exiftool to read metadata in video and image files however i need it to go further where it uses my input of some keywords that it searches the meta data for then copies the videos to another directory and then links them together in ffmpeg ready for me to make detailed edits in Premier Pro eg : my input will be

    keywords = ("Opening", "part01", "part02", "ending")etc...

    description = ("date", "client")etc...

    then the script will find the videos with that in its meta and copy x2 them and then run one of the copies through ffmpeg to put them in a sequence respective to the order of the keywords.

    import os
    import subprocess

    for path, subdirs, files in os.walk("/Users/me/Desktop/videosAndImages"):
       input_file = "."
       exe = "exiftool"
       process = subprocess.Popen([exe, input_file], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, universal_newlines=True)
       for output in process.stdout:
           print(output.strip())

    this is the script if i have it with just the input as input_file"." and not the for loop i can run exiftool with the cmd /terminal and this for loop just scans directories and not the images inside please help.

  • ffmpy concatenate multiple files with a file list

    10 novembre 2018, par r4ptor

    I’m currently trying to merge multiple video files with a python script using ffmpeg and ffmpy.
    The names of the files are being written into a file list, as suggested by the ffmpeg concatenate wiki.

    In my example I’m only using two files, but in practice, there will be several hundert files, that’s why I’m choosing the file list approach.

    My current code looks like this :

    import os
    import ffmpy


    base_dir = "/path/to/the/files"

    # where to seek the files
    file_list = open("video_list.txt", "x")

    # scan for the video files
    for root, dirs, files in os.walk(base_dir):
       for video_file in files:
           if video_file.endswith(".avi"):
               file_list.write("file './%s'\n" % video_file)

    # merge the video files
    ff = ffmpy.FFmpeg(
       global_options={"-f",
                       "concat ",
                       "-safe",
                       "0"},
       inputs={file_list: None},
       outputs={"-c",
                "copy",
                "output.avi"},
    )
    ff.run()

    So the code I want to run with ffmpy is

    ffmpeg -f concat -safe 0 -i video_list.txt -c copy output.avi

    But unfortunately my script isn’t working and the resulting error is

    Traceback (most recent call last):
     File "concat.py", line 20, in <module>
       "output.avi", }
     File "/usr/lib/python3.7/site-packages/ffmpy.py", line 54, in __init__
       self._cmd += _merge_args_opts(outputs)
     File "/usr/lib/python3.7/site-packages/ffmpy.py", line 187, in _merge_args_opts
       for arg, opt in args_opts_dict.items():
    AttributeError: 'set' object has no attribute 'items'
    </module>

    Any hints why the command isn’t working the way it should ? Am I missing something regarding the command formatting for ffmpy ?

    Thank you.

  • Error issuing complex shell command in python via subprocess

    4 juillet 2018, par user16171

    I’ve converted about 100 video tapes and now have 100 folders full of .dv files (each folder’s name is a date). In each folder, I want to combine all of the .dv files into one x265 mp4. I have figured out the ffmpeg command to do this, and I’ve written a simple Python script to traverse the folder hierarchy and print out the ffmpeg command to do each folder’s conversion. I’d like to set it up to just run each folder in series - it will take about a week to do the entire conversion, leaving me with about 5GB of video to use/post, etc. vs the 1.5TB of raw .dv files.

    The shell command looks like this :

    ffmpeg -f concat -i &lt;(for f in FULL_PATH_TO_FILES/*.dv; do echo "file '$f'"; done) \
     -c:v libx265 -crf 28 -c:a aac -b:a 128k \
     -strict -2 FULL_PATH_TO_FILES/FOLDERNAME.mp4

    I can run that as a shell command, and it works fine. I could use the python script to generate the 100 commands and just copy and paste them into my shell one at a time. But I’d rather just have them run in series.

    I’ve tried various incarnations of os.system and subprocess.call or subprocess.Popen, and they all error.

    I build up the command and issue subprocess.call(command), which gives this error :

    "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 522, in call
    return Popen(*popenargs, **kwargs).wait()
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 710, in init
    errread, errwrite)
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1335, in _execute_child
    raise child_exception
    OSError : [Errno 2] No such file or directory

    I’ve also tried building up the command, as described in many of the other threads I’ve read, but it does not work, and I assume it’s because of the for-loop I have in the shell command.

    So, what’s the best way to do this ? Obviously, a shell-jockey could just tell me how to do this via the shell, but I’m more comfortable using Python to traverse the directories and build up the ffmpeg command.

    For what it’s worth, here is the whole script :

    import os
    import subprocess
    t1 = "ffmpeg -f concat -i &lt;(for f in "
    t2 = "/*.dv; do echo \"file '$f'\"; done) -c:v libx265 -crf 28 -c:a aac -b:a 128k -strict -2 "
    t3 = ".mp4"
    rootDir = ROOTDIR
    for dirName, subdirList, fileList in os.walk(rootDir):
       S = dirName.split('/')    
       if S[-1] == "Media":
           moviename = S[-2].split(".")[0] # e.g. "19991128_Thanksgiving"
           command = t1 + dirName + t2 + dirName + "/" + moviename + t3
           if sum([".mp4" in fname for fname in fileList]) == 0: # don't bother if there is already a mp4 file in the folder
               cmd_list = [t1,dirName,t2,dirName,"/",moviename,t3]
               print command
               print
               print
               subprocess.call(command)