Recherche avancée

Médias (91)

Autres articles (41)

  • 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.

  • Use, discuss, criticize

    13 avril 2011, par

    Talk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
    The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
    A discussion list is available for all exchanges between users.

  • 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 (...)

Sur d’autres sites (7319)

  • Traceback error with Python when using ffmpeg to convert a video

    16 mai 2013, par TheMickeyNick

    The simple way my script runs is the user provides a folder location and a filetype and glob.glob() finds the files with the filetype provided and adds them to a list. It then uses a for loop and goes through the list and converts each video. But it doesn't like when I try to run my ffmpeg command. Any help would be awesome. I'm also using Win 7 64 bit with 64 bit ffmpeg and Python 3.3
    Here's the error :

    OS Error
    Traceback (most recent call last):
     File "C:\Python33\lib\subprocess.py", line 1106, in _execute_child
       startupinfo)
    FileNotFoundError: [WinError 2] The system cannot find the file specified

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
     File "C:\Users\user\Workspace\PythonConverter\HTMLandPythonConverter\Converter.py", line 77, in <module>
       massConvert(fileNames)
     File "C:\Users\user\Workspace\PythonConverter\HTMLandPythonConverter\Converter.py", line 47, in massConvert
       convertVideotoNewFormat(&#39;.mp4&#39;, x)
     File "C:\Users\user\Workspace\PythonConverter\HTMLandPythonConverter\Converter.py", line 61, in convertVideotoNewFormat
       myFile = subprocess.Popen(ffmpegString)#, stdout=subprocess.PIPE, stderr=subprocess.PIPE
     File "C:\Python33\lib\subprocess.py", line 820, in __init__
       restore_signals, start_new_session)
     File "C:\Python33\lib\subprocess.py", line 1112, in _execute_child
       raise WindowsError(*e.args)
    FileNotFoundError: [WinError 2] The system cannot find the file specified
    </module>

    Here is my code :

    import subprocess
    from subprocess import call
    import glob

    fileNames = []
    fileLocation = {}
    filetype = {}
    def convertString(location):
       s = list(location)
       for i in range(len(s)):
           if s[i] in &#39;\\&#39;:
               s[i] = &#39;/&#39;

       if s[len(s)-1] != &#39;/&#39;:
           s.append(&#39;/&#39;)
       location = "".join(s)
       return location

    def convertStringBack(stringTo):
       s = list(stringTo)
       for i in range(len(s)):
           if s[i] in &#39;/&#39;:
               s[i] = &#39;\\&#39;
       stringTo = "".join(s)
       return stringTo

    def fileTypeTester():
       FieldType = &#39;*&#39; + input(&#39;What\&#39;s the file type we are converting from?&#39;)
       typeSplit = list(FieldType)
       if typeSplit[1] != &#39;.&#39;:
           typeSplit.insert(1,&#39;.&#39;)
       FieldType = "".join(typeSplit)
       if FieldType not in [&#39;*.flv&#39;,&#39;*.kdb&#39;]:
           print(&#39;Not a valid file type&#39;)
       else:
           return FieldType
       return None

    def massConvert(listOfFiles):
       print(&#39;Starting Conversion&#39;)
       for x in listOfFiles:
           #x = convertStringBack(x)
           print(&#39;Converting &#39; + x + &#39; to .mp4&#39;)
           convertVideotoNewFormat(&#39;.mp4&#39;, x)
       print(&#39;Finished File Conversion&#39;)


    def convertVideotoNewFormat(newFormat, fileLoc):
       newFilePath = fileLoc[0:len(fileLoc)-4]
       ffmpegString = ["ffmpeg64","-i", fileLoc,"-qscale","0","-ar","22050","-vcodec","libx264",newFilePath,newFormat]
       try:
           subprocess.check_call(newFilePath)
       except OSError:
           print(&#39;OS Error&#39;)
       except subprocess.CalledProcessError:
           print(&#39;Subprocess Error&#39;)
       myFile = subprocess.Popen(ffmpegString)
       print(myFile)

    #This will replace old HTML flv object tag with new video tag, but it is yet to be implemented
    def replaceHTML():
       pass

    fileLocation = input(&#39;What is the path of the files you\&#39;d like to convert?&#39;)
    fileLocation = convertString(fileLocation)
    fileType = fileTypeTester()
    fileNames = glob.glob(fileLocation + fileType)
    massConvert(fileNames)

    I've looked around and most of the tutorials are in 2.7 the code is 3.3 and I can't find a tutorial to use ffmpeg for 3.3. My ffmpeg is set to 'ffmpeg64' on my PATH.

    Thanks !

  • add thumbnail and metadata to mp3 file on converting using youtube-dl by python script

    18 septembre 2015, par arun pal

    I want to add metadata as well as thumbnail image to my mp3 file. How to do that , can anybody help me ?

    from __future__ import unicode_literals
    import youtube_dl

    n="cwHzy7ftLyI"

    ydl_opts = {
       'format': 'bestaudio/best',

       'verbose':True,

       'postprocessors': [{
           'key': 'FFmpegExtractAudio',
           'preferredcodec': 'mp3',
           'preferredquality': '192',
           }],
           'addmetadata':True,
           'embedthumbnail':True,
           'writethumbnail':True,
       }
    with youtube_dl.YoutubeDL(ydl_opts) as ydl:
       ydl.add_default_info_extractors()
       ydl.download(['http://www.youtube.com/watch?v='+n])
  • vf_pixdesctest : make config_props work properly when called multiple times.

    18 mars 2013, par Anton Khirnov
    vf_pixdesctest : make config_props work properly when called multiple times.
    
    • [DBH] libavfilter/vf_pixdesctest.c