
Advanced search
Medias (91)
-
Collections - Formulaire de création rapide
19 February 2013, by
Updated: February 2013
Language: français
Type: Picture
-
Les Miserables
4 June 2012, by
Updated: February 2013
Language: English
Type: Text
-
Ne pas afficher certaines informations : page d’accueil
23 November 2011, by
Updated: November 2011
Language: français
Type: Picture
-
The Great Big Beautiful Tomorrow
28 October 2011, by
Updated: October 2011
Language: English
Type: Text
-
Richard Stallman et la révolution du logiciel libre - Une biographie autorisée (version epub)
28 October 2011, by
Updated: October 2011
Language: English
Type: Text
-
Rennes Emotion Map 2010-11
19 October 2011, by
Updated: July 2013
Language: français
Type: Text
Other articles (28)
-
List of compatible distributions
26 April 2011, byThe table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...) -
Publier sur MédiaSpip
13 June 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
Les statuts des instances de mutualisation
13 March 2010, byPour des raisons de compatibilité générale du plugin de gestion de mutualisations avec les fonctions originales de SPIP, les statuts des instances sont les mêmes que pour tout autre objets (articles...), seuls leurs noms dans l’interface change quelque peu.
Les différents statuts possibles sont : prepa (demandé) qui correspond à une instance demandée par un utilisateur. Si le site a déjà été créé par le passé, il est passé en mode désactivé. publie (validé) qui correspond à une instance validée par un (...)
On other websites (4309)
-
node ffmpeg programmatically built list(?) of commands
16 May 2022, by MartinI am working on a ffmpeg wasm project and I have it working with this code:


await ffmpeg.run(
 '-loop', '1',
 '-framerate', '2',
 "-i", inputFileNames[0], 
 "-i", inputFileNames[1],
 "-i", inputFileNames[2],
 "-c:a", "libmp3lame", 
 "-b:a", "320k", 
 "-filter_complex", "concat=n=2:v=0:a=1",
 "-vcodec", "libx264", 
 "-bufsize", "3M", 
 "-filter:v", "scale=w=1920:h=1930,pad=ceil(iw/2)*2:ceil(ih/2)*2", 
 "-crf", "18", 
 "-pix_fmt", "yuv420p", 
 "-shortest", "", 
 "-tune", "stillimage", 
 "-t", "13", 
 outputFileName
 );



https://github.com/MartinBarker/ffmpeg-wasm-node


As you can see, the
await ffmpeg.run()
command takes a list of args / vars to run.
I have it statically set to take three file inputs right now (-i
) but I need to have these inputs set dynamically for however many strings are inside the inputFileNames[] list.

I've tried giving
await ffmpeg.run(myListArgs)
a var containing a list of the same args but that does not work but this causes an error as it only runs the last var outputFIlename so this below does not work:

let ffmpegArgs=('-loop', '1',
 '-framerate', '2',
 "-i", inputFileNames[0], 
 "-i", inputFileNames[1],
 "-i", inputFileNames[2],
 "-c:a", "libmp3lame", 
 "-b:a", "320k", 
 "-filter_complex", "concat=n=2:v=0:a=1",
 "-vcodec", "libx264", 
 "-bufsize", "3M", 
 "-filter:v", "scale=w=1920:h=1930,pad=ceil(iw/2)*2:ceil(ih/2)*2", 
 "-crf", "18", 
 "-pix_fmt", "yuv420p", 
 "-shortest", "", 
 "-tune", "stillimage", 
 "-t", "13", 
 outputFileName)

 await ffmpeg.run(
 ffmpegArgs
 );



I've tried to include multiple inputs in one line like so but it results in an error:



 await ffmpeg.run(
 '-loop', '1',
 '-framerate', '2',
 `-i ${inputFileNames[0]} -i ${inputFileNames[1]} -i ${inputFileNames[2]}`,
 "-c:a", "libmp3lame", 
 "-b:a", "320k", 
 "-filter_complex", "concat=n=2:v=0:a=1",
 "-vcodec", "libx264", 
 "-bufsize", "3M", 
 "-filter:v", "scale=w=1920:h=1930,pad=ceil(iw/2)*2:ceil(ih/2)*2", 
 "-crf", "18", 
 "-pix_fmt", "yuv420p", 
 "-shortest", "", 
 "-tune", "stillimage", 
 "-t", "13", 
 outputFileName
 );

[fferr] Unrecognized option 'i input-file-0 -i input-file-1 -i input-file-2'.
[fferr] Error splitting the argument list: Option not found
[ffout] FFMPEG_END



I've tried having only the inputs as a list, and using the ... to expand it inside the function call but that causes an error as well as the commas are included in the command (which they shouldnt be)


let ffmpegInputs=[
 "-i", inputFileNames[0], 
 "-i", inputFileNames[1],
 "-i", inputFileNames[2]
 ]
 await ffmpeg.run(
 '-loop', '1',
 '-framerate', '2',
 [...ffmpegInputs],
 "-c:a", "libmp3lame", 
 "-b:a", "320k", 
 "-filter_complex", "concat=n=2:v=0:a=1",
 "-vcodec", "libx264", 
 "-bufsize", "3M", 
 "-filter:v", "scale=w=1920:h=1930,pad=ceil(iw/2)*2:ceil(ih/2)*2", 
 "-crf", "18", 
 "-pix_fmt", "yuv420p", 
 "-shortest", "", 
 "-tune", "stillimage", 
 "-t", "13", 
 outputFileName
 );

[info] run ffmpeg command: -loop 1 -framerate 2 -i,input-file-0,-i,input-file-1,-i,input-file-2 -c:a libmp3lame -b:a 320k -filter_complex concat=n=2:v=0:a=1 -vcodec libx264 -bufsize 3M -filter:v scale=w=1920:h=1930,pad=ceil(iw/2)*2:ceil(ih/2)*2 -crf 18 -pix_fmt yuv420p -shortest -tune stillimage -t 13 cool-output-video.mp4
TypeError: a.charCodeAt is not a function



How can I create my ffmpeg args dynamically to work for any number of inputs?


-
Some last copyright year updates and change to open bug list
26 November 2014, by Martijn van BeurdenSome last copyright year updates and change to open bug list
This updates one rather important mention of the copyright year
(the encoding/decoding progress display) and a few in the
documentation. Furthermore, it updates the open bug listSigned-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
-
Updated "in the wild" list
2 September 2014, by scottschillerUpdated "in the wild" list