
Recherche avancée
Médias (91)
-
Corona Radiata
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Lights in the Sky
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Head Down
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Echoplex
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Discipline
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Letting You
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (96)
-
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...) -
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 (...)
-
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 (12272)
-
Difference between single and double quotes in subprocess [Python 3.4]
11 décembre 2016, par VasilisI’m using Python 3.4 in Windows Server 12 and I have some Python code that executes the ffmpeg command bellow :
ffmpeg -i input.mp4 -vf select='not(mod(n\,30)),setpts=N/((30)*TB)' -c:v rawvideo -pix_fmt uyvy422 -y output.avi
I use the following code to execute the external command :
try:
output = subprocess.check_output(command, stderr=subprocess.STDOUT, shell=True)
except subprocess.CalledProcessError as exc:
print ("Command %s failed with error code" % command, exc.returncode, exc.output, file=sys.stderr)When I pass the command enclosed in single quotes it successfully runs the command :
command = 'ffmpeg -i input.mp4 -vf select="not(mod(n\,30)),setpts=N/((30)*TB)" -c:v rawvideo -pix_fmt uyvy422 -y output.avi'
When I pass the command as a string enclosed in double quotes it fails :
command = "ffmpeg -i input.mp4 -vf select='not(mod(n\,30)),setpts=N/((30)*TB)' -c:v rawvideo -pix_fmt uyvy422 -y output.avi"
The error message is the following :
[Eval @ 0000000eaf2fe040] Invalid chars ',setpts=N/((30)*TB)' at the end of expression 'not(mod(n,30)),setpts=N/((30)*TB)'
[Parsed_select_0 @ 0000000eb0d27ca0] Error while parsing expression 'not(mod
(n,30)),setpts=N/((30)*TB)'
[AVFilterGraph @ 0000000eb0d0a5a0] Error initializing filter 'select' with args 'not(mod(n\\,30)),setpts=N/((30)*TB)'
Error opening filters!"So it appears that when using double quotes the slash
/
that is part of thesetpts=N/((30)*TB)
option is not interpreted correctly, while with double quotes there’s no problem. Note that both commands (either with double or single quotes in the select option) work fine when I run them directly from the command prompt.
However, I’ve seen many people saying that from a technical perspective single and double quotes make no difference, e.g.- http://programmers.stackexchange.com/questions/155176/single-quotes-vs-double-quotes
- http://programmers.stackexchange.com/questions/155176/single-quotes-vs-double-quotes
Does slash parsing depend on the quotes around the string or this is just a behavior specific to the executable I’m running ?
-
Making a movie out of pictures in correct order
6 novembre 2022, par astrogabShort version


How can one combine files
img1000.png
,img5000.png
,img10000.png
,img11000.png
in the right order into a movie ?

Longer version


I am using ffmpeg to make a movie out of snapshots of a simulation. There should be for instance 5 images per second. The names are :


image0200.png
image0300.png
image0400.png
image0500.png
image1000.png
image1500.png
image2000.png
...
image8500.png
image9000.png
image9500.png
image10000.png
image15000.png



i.e., they are sequential but there are irregular gaps in the numbers. The numbers are formatted according to
'%04d'
but go above 9999. I have tried

ffmpeg -y -loglevel debug -nostats \
-r:v 5 -thread_queue_size 1024 -f image2 \
-pattern_type glob -i "*[0-9][0-9][0-9][0-9].png" \
-r:v 30 -preset veryslow -pix_fmt yuv420p -crf 28 \
-an AMDG.mp4



and many, many other variations but either only two frames end up being visible in the movie (even though the images are found when using -debug) or only the files up to
image9500.png
are used (andglob
does not seem to allow[0-9]{4,}
as for regex), or, with

ffmpeg -y -loglevel debug -nostats \
 -r:v 5 \
 -thread_queue_size 1024 -f image2 -pattern_type glob \
 -i "image[0-9][0-9][0-9][0-9].png" \
 -r:v 5 \
 -thread_queue_size 1024 -f image2 -pattern_type glob \
 -i "image[1-9][0-9][0-9][0-9][0-9].png" \
 -r:v 30 -preset veryslow -pix_fmt yuv420p -crf 28 \
 -map 0 -map 1 \
 -an AMDG.mp4



there are apparently two streams in the output movie and only one of them is being played. (I realised in the process
-map 0 -map 1
was needed in order for both input streams to be used.)

In one of the variations of options I found (now I have lost what it was exactly !) all images were included but the order was not the desired one :
image1000.png
was shown beforeimage10000.png
. Apparently a newer version of ffmpeg (I haveffmpeg version 3.4.8-0ubuntu0.2
) has the ability to sort likesort -V
, so thatimage10000
come afterimage1000
, but reinstalling ffmpeg is in general not a practical option. Also renaming the files is not practical and creating e.g. soft links with sequential names in the format '%05d' starting at 0 and in steps of 1 (so that-i '%05d'
could be used) is of course not elegant.

With the
-concat
filter as in https://unix.stackexchange.com/questions/77016/ffmpeg-pattern-type-glob-not-loading-files-in-correct-order, i.e.,

ffmpeg -y -loglevel debug -nostats -r:v 5 \
 -thread_queue_size 1024 -f image2 -f concat \
 -safe 0 -i <(find . -maxdepth 1 -regex 'image*.png' \
 -exec echo "file $(pwd)/"{} \; | sort -V) \
 -r:v 30 -codec:v libx264 -preset veryslow -pix_fmt yuv420p -crf 28 \
 -an \
 AMDG.mp4



the processing took a long time and made the whole system sluggish, while producing a movie of 60 kB showing only two different images.


I have the impression that there are several issues at once... Thanks if you can help !


-
CJEU rules US cloud servers don’t comply with GDPR and what this means for web analytics
17 juillet 2020, par Jake Thornton