Recherche avancée

Médias (91)

Autres articles (32)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

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

  • Converting mkv files to mp4 with ffmpeg-python

    16 mai, par myth0s

    I have a lot of .mkv files that I'm trying to convert to .mp4, so I decided to try and program a solution in python. After a few hours, trying to figure out how to copy the subfolders too, I gave up on it and decided to stick with converting individual subfolders, and then copying them over to another directory.

    


    I've made a simple script, that should convert .mkv files that are in the same folder as the script. However, I keep getting this error :

    


    


    FileNotFoundError : [WinError 2] The system cannot find the file specified

    


    


    Here's my code :

    


    import os
import ffmpeg

start_dir = os.getcwd()

def convert_to_mp4(mkv_file):
    no_extension = str(os.path.splitext(mkv_file))
    with_mp4 = no_extension + ".mp4"
    ffmpeg.input(mkv_file).output(with_mp4).run()
    print("Finished converting {}".format(no_extension))

for path, folder, files in os.walk(start_dir):
    for file in files:
        if file.endswith('.mkv'):
            print("Found file: %s" % file)
            convert_to_mp4(file)
        else:
            pass



    


  • avcodec/movtextdec : Simplify finding default font

    17 octobre 2020, par Andreas Rheinhardt
    avcodec/movtextdec : Simplify finding default font
    

    There is no need to walk through the list of fonts twice.

    Reviewed-by : Philip Langdale <philipl@overt.org>
    Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@gmail.com>

    • [DH] libavcodec/movtextdec.c
  • Convert multible files with threading ffmpeg in Python

    21 mars 2020, par Florian

    I’m trying to convert mp3 files to m4a. The files are in different folders like MainFolder(folder1, folder2,...)

    It works already but is very slow because it is converting file by file.

    import os
    import sys

    path = "/Users/flo/Desktop/test"

    for root, dir, files in os.walk(path):
       dir.sort()
       files.sort()

       for file in files:
           if file.find('.mp3') != -1:
               os.system('ffmpeg -i ' +'"' +root +'/' +file +'" ' +'-c:v copy -c:a libfdk_aac -b:a 300k '  +'"' +root +'/' +file[:-4] +'.m4b' +'"')

    Now I would like to implement multitasking.

    import os
    import sys
    import threading
    import queue

    path = "/Users/flo/Desktop/test"
    def convert(file):
       if file.find('.mp3') != -1:
           os.system('ffmpeg -i ' +'"' +root +'/' +file +'" ' +'-c:v copy -c:a libfdk_aac -b:a 300k '  +'"' +root +'/' +file[:-4] +'.m4b' +'"')

    for root, dir, files in os.walk(path):
       dir.sort()
       files.sort()

       q = queue.Queue
       threads = [threading.Thread(target=convert(file)) for file in files]
       for t in threads:
           t.start()

       for file in files:
           q.put(file)

       for file in files:
           q.put('stop')

       q.join()

       for t in threads:
           t.join()

    But I got the error message :

    File "/var/folders/r6/z5f_jcf139b8fh2n8m4lznlm0000gn/T/atom_script_tempfiles/30127c90-6b13-11ea-af8a-432a34b059ac", line 31
       threads = [threading.Thread(target=convert(file)) for file in files]
       ^
    IndentationError: unexpected indent
    [Finished in 0.028s]