
Recherche avancée
Médias (91)
-
Les Miserables
9 décembre 2019, par
Mis à jour : Décembre 2019
Langue : français
Type : Textuel
-
VideoHandle
8 novembre 2019, par
Mis à jour : Novembre 2019
Langue : français
Type : Video
-
Somos millones 1
21 juillet 2014, par
Mis à jour : Juin 2015
Langue : français
Type : Video
-
Un test - mauritanie
3 avril 2014, par
Mis à jour : Avril 2014
Langue : français
Type : Textuel
-
Pourquoi Obama lit il mes mails ?
4 février 2014, par
Mis à jour : Février 2014
Langue : français
-
IMG 0222
6 octobre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Image
Autres articles (32)
-
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip 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, parMediaSPIP 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, parUnlike 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 myth0sI 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 -
Convert multible files with threading ffmpeg in Python
21 mars 2020, par FlorianI’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]