
Recherche avancée
Médias (1)
-
MediaSPIP Simple : futur thème graphique par défaut ?
26 septembre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Video
Autres articles (95)
-
ANNEXE : Les plugins utilisés spécifiquement pour la ferme
5 mars 2010, parLe site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)
-
Gestion générale des documents
13 mai 2011, parMédiaSPIP ne modifie jamais le document original mis en ligne.
Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...) -
Installation en mode standalone
4 février 2011, parL’installation de la distribution MediaSPIP se fait en plusieurs étapes : la récupération des fichiers nécessaires. À ce moment là deux méthodes sont possibles : en installant l’archive ZIP contenant l’ensemble de la distribution ; via SVN en récupérant les sources de chaque modules séparément ; la préconfiguration ; l’installation définitive ;
[mediaspip_zip]Installation de l’archive ZIP de MediaSPIP
Ce mode d’installation est la méthode la plus simple afin d’installer l’ensemble de la distribution (...)
Sur d’autres sites (7647)
-
Error issuing complex shell command in python via subprocess
4 juillet 2018, par user16171I’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 <(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.mp4I 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 directoryI’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 <(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) -
Convert PNGs to webm video with transparency
2 juillet 2018, par sebastianI would like to use
avconv
to convert a series of PNG images to a WebM video, preserving transparency.I understand that the pixel format used in the output video must support transparency. So I tried :
$ avconv -framerate 25 -f image2 -i frames/%03d.png -pix_fmt yuva420p output.webm
Unfortunately,
avconv
complains :Incompatible pixel format 'yuva420p' for codec 'libvpx-vp9', auto-selecting format 'yuv420p'
I am using
ffmpeg version 2.8.4-1+b1 Copyright (c) 2000-2015 the FFmpeg developers
. -
Convert PNGs to webm video with transparency
20 septembre 2016, par sebastianI would like to use
avconv
to convert a series of PNG images to a WebM video, preserving transparency.I understand that the pixel format used in the output video must support transparency. So I tried :
$ avconv -framerate 25 -f image2 -i frames/%03d.png -pix_fmt yuva420p output.webm
Unfortunately,
avconv
complains :Incompatible pixel format 'yuva420p' for codec 'libvpx-vp9', auto-selecting format 'yuv420p'
I am using
ffmpeg version 2.8.4-1+b1 Copyright (c) 2000-2015 the FFmpeg developers
.