Recherche avancée

Médias (1)

Mot : - Tags -/école

Autres articles (54)

  • Mise à jour de la version 0.1 vers 0.2

    24 juin 2013, par

    Explications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
    Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

Sur d’autres sites (7423)

  • Révision 21321 : Report de r21320.

    21 avril 2014, par Eric Lupinacci

    Eviter que la mise en exergue du module de langue dans le title et le texte coincide avec un mot du texte.

  • Anomalie #3095 : Le filtre |image_renforcement ne préserve pas la transparence des images

    18 juillet 2014, par tcharlss ಠ_ಠ

    Il s’agit d’un LAMP local installé sur Ubuntu 14.04.
    La librairie GD (libgd3 2.1.0-3) ainsi que le module GD pour PHP5 (php5-gd 5.5.9) sont bien installés.
    Testé avec des images PNG en couleur et en noir et blanc : même résultat.
    Dans « Génération de miniatures des images », j’ai essayé toutes les méthodes : GD1, GD2, Convert et Netpbm.

    S’il s’agit bien d’une librairie manquante sur le serveur, il me semble que le filtre ne devrait rien faire au lieu d’aplatir l’image.

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