
Recherche avancée
Autres articles (26)
-
Soumettre bugs et patchs
10 avril 2011Un logiciel n’est malheureusement jamais parfait...
Si vous pensez avoir mis la main sur un bug, reportez le dans notre système de tickets en prenant bien soin de nous remonter certaines informations pertinentes : le type de navigateur et sa version exacte avec lequel vous avez l’anomalie ; une explication la plus précise possible du problème rencontré ; si possibles les étapes pour reproduire le problème ; un lien vers le site / la page en question ;
Si vous pensez avoir résolu vous même le bug (...) -
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 (...) -
Gestion des droits de création et d’édition des objets
8 février 2011, parPar défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;
Sur d’autres sites (6322)
-
avcodec/mips : Improve hevc uni-w copy mc msa functions
21 septembre 2017, par Kaustubh Rasteavcodec/mips : Improve hevc uni-w copy mc msa functions
Load the specific destination bytes instead of MSA load and pack.
Pack the data to half word before clipping.
Use immediate unsigned saturation for clip to max saving one vector register.Signed-off-by : Kaustubh Raste <kaustubh.raste@imgtec.com>
Reviewed-by : Manojkumar Bhosale <Manojkumar.Bhosale@imgtec.com>
Signed-off-by : Michael Niedermayer <michael@niedermayer.cc> -
sending variables to subprocess call with spaces - python 2.7
24 novembre 2015, par Tandy FreemanI want to add ffmpeg options to a variable and later use it in a subprocess call. If the variable contains one word, all is well, but if it contains more than one, I get errors. I am working on a larger script and I will need to have extra options such as this for certain codecs. How can I get this working ?
The following works perfectly for me :
import subprocess
import sys
video_codec = 'libx264'
output = sys.argv[1] + '.mkv'
subprocess.call(['ffmpeg',
'-i',sys.argv[1],
'-c:v',video_codec,
'-c:a','copy',
output])Once I introduce new options/spaces to
video_options
as such :video_codec = "'libx264', '-pix_fmt', 'yuv420p'"
I get an ffmpeg error :
Unknown encoder ''libx264', '-pix_fmt', 'yuv420p''
If I remove the double quotes and just use
video_codec = ’libx264’, ’-pix_fmt’, ’yuv420p’I get a python error :
Traceback (most recent call last):
File "testo.py", line 10, in <module>
output])<br />
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 524, in call
return Popen(*popenargs, **kwargs).wait()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 711, in __init__
errread, errwrite)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1308, in _execute_child
raise child_exception
TypeError: execv() arg 2 must contain only strings
</module> -
Simples loop to iterate over files and send them to ffmpeg
25 octobre 2019, par user2752471I want to do a shell script that will iterate over several video files in a directory, send everyone of them to ffmpeg, that will then reencode each one, producing a reencoded file that will have the same name as the original, except with .avi extension instead .mkv or .mp4.
I found a fairly simple script in another topic here on SO, tried to change it slightly to take into account the file extension and the destination directory.
However my script only produces countless "anything : No such file or directory"
Here is it :
$ for f in $(find -type f -name *.mkv); do ffmpeg -n -i "$f" -c:v copy ".$f" ; done
And these is the ffmpeg command that I usually use :
ffmpeg -y -i -vf scale=720:-2 -c:v mpeg4 -vtag xvid -b:v 969k -pass 1 -an -f avi /dev/null && ffmpeg -i -c:a libmp3lame -b:a 48k -ac 1 -vf scale=720:-2 -c:v mpeg4 -vtag xvid -b:v 969k -pass 2 .avi
So I need to identify what is incorrect in the first script, that is considering each small word of the file’s name as a file, and then change it as to add all these ffmpeg parameters.
Somethings that I do not understand in the script :
1)Are the -type and f in find command necessary. From what I read of the documentation, all it does is to tell find that it shall look for normal files, something that seems irrelevant for my case. When I use find, I do : find starting dir -name filename. So do I have to keep it ?
2)What -n means for ffmpeg ? I am currently without a man entry for ffmpeg. Is it necessary for my needs ?
3)Do I need to have "" around $f ? What it does ?
4)As far as I understand $ denotes a variable. But what the "f" after it does ? Do I need it ?
5)The " ;" after the closing ")" and the ".$f" are necessary ? The first is used to indicate the end of the for loop,and the second the end of the ffmpeg command ?
6)The "do" and the "does" are also necessary for the same motives behind the " ;"
Here is my attempt of the ffmpeg part of the script. Please tell me what to change on it, as in the find part of it.
do ffmpeg -n -y -i "$f.mkv" -vf scale=720:-2 -c:v mpeg4 -vtag xvid -b:v 969k -pass 1 -an -f avi /dev/null && ffmpeg -n -i "$f" -c:a libmp3lame -b:a 48k -ac 1 -vf scale=720:-2 -c:v mpeg4 -vtag xvid -b:v 969k -pass 2 ".$f.avi" ; done
If I would like the script to also look for ".mp4" besides ".mkv" how I would need to change it ?
Thanks for any input.