
Recherche avancée
Autres articles (11)
-
Contribute to a better visual interface
13 avril 2011MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community. -
Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs
12 avril 2011, parLa manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras. -
Qu’est ce qu’un éditorial
21 juin 2013, parEcrivez votre de point de vue dans un article. Celui-ci sera rangé dans une rubrique prévue à cet effet.
Un éditorial est un article de type texte uniquement. Il a pour objectif de ranger les points de vue dans une rubrique dédiée. Un seul éditorial est placé à la une en page d’accueil. Pour consulter les précédents, consultez la rubrique dédiée.
Vous pouvez personnaliser le formulaire de création d’un éditorial.
Formulaire de création d’un éditorial Dans le cas d’un document de type éditorial, les (...)
Sur d’autres sites (4352)
-
Working with -filter_complex in ffmpeg with a batch concat array
21 avril 2014, par user3555008What I am trying to do here is write an ffmpeg script that takes all songs from a folder and combines them into one audio file using the command line in Windows.
So far I have
ffmpeg -i "pathforinput1" -i "pathforinput2" -i "pathforinputn" -filter_complex "[0:0] [1:0] concat=n=(number of songs goes here):v=0:a=1 "[a]"" -map "[a]" -acodec libmp3lame -ab 320k "output file.mp3"
My problem is that I want to combine it with the existing script :
for %A in ("input folder\*.extension") do ffmpeg
to create a total script that uses
-i "%A"
for the input. The problem I am having here is that each input file requires an entry in the array-filter_complex "[0:0] [1:0]
as well as having the total number of input files present inconcat=n=(number of files)
. I’ m willing to use a batch script to make this possible, but I can’t see how I would go about finding the total number of files in a folder and then creating an array for each (for example if there were 7 songs the array would be[0:0] [1:0] [2:0] [3:0] [4:0] [5:0] [6:0]
).Any help or pointers for making this possible would be great. Someone in this question managed to make something similar for a Unix system but I am using batch files and I don’t know how to modify it for Windows.
Thanks in advance for any help
Ok, progress made with the help of the first commenter. However, I think ffmpeg isn’t liking what I’ve made. My code thus far is :
:: Give you a list of the .wav filenames in -i "filename1" -i "filename2" format
for %%a in ("C:\Users\James\Input\*.*") do call set var=%%var%% -i "%%a"
echo %var%
:: Give you the number of .mp3 files
for /f %%a in ('dir "C:\Users\James\Input\*.*" /b /a-d ^|find /c /v "" ') do set "numfiles=%%a"
echo there are "%numfiles%" files
set /a totalnum=numfiles
:: dir "C:\Users\James\Input\" /b >> C:\Users\James\Output\filelist.txt
:: print some text
set /a numfiles=numfiles-1
for /L %%b in (0,1,%numfiles%) do call set array=%%array%% [%%b:0]
:: for /L %%b in (0,1,%numfiles%) do call set array=%%array%% [0:0]
echo %array%
for /f "tokens=* delims= " %%C in ('echo %array% ') do set array=%%C
set array=%array:~0,-1%
echo %array%
:: for %%d in ("C:\Users\James\Input\*.*") do ffmpeg -i "%%d" -filter_complex "%array% concat=n=%totalnum%:v=0:a=1 "[a]"" -map "[a]" -acodec libmp3lame -ab 320k "C:\Users\James\Output\outputtestbatch1.mp3"
for %%d in ("C:\Users\James\Input\*.*") do ffmpeg -i "%%d" -filter_complex "%array% concat=n=%totalnum%:v=0:a=1 "[a]"" -map "[a]" -acodec libmp3lame -ab 320k "C:\Users\James\Output\outputtestbatch1.mp3"
pause`The issue I am having now is that I think ffmpeg is assuming each input file has audio stream [0:0] rather than incrementing them one after the other. Is there a way to fix this with the input method I’m using ?
**SECOND EDIT**L : Success ! I modified foxidrive’s script a bit because it was slightly misconfigured. Final product is here :
@echo off
for %%a in ("C:\Users\James\Input\*.*") do call set var=%%var%% -i "%%a"
:: echo %var%
:: Give you the number of files
for /f %%a in ('dir "C:\Users\James\Input\*.*" /b /a-d ^|find /c /v "" ') do set "numfiles=%%a"
echo there are "%numfiles%" files
for /L %%b in (0,%numfiles%) do call set array=%%array%% [%%b:0]
set array=%array:~1%
echo "%array%"
ffmpeg %var% -filter_complex "%array% concat=n=%numfiles%:v=0:a=1 "[a]"" -map "[a]" -acodec libmp3lame -ab 320k "C:\Users\James\Output\outputtestbatch1.mp3"
popd
pause -
How can I limit the CPU usage of moviepy ?
11 février 2020, par Egon KirchofPython 3. I am using moviepy to create a new video. The problem is ffmpeg uses 100% of all my cores so I can’t do anything else in the computer.
There is a parameter for write_videofile called threads but when I adjust it to, say, threads=10 (I have 12 cores in total) there is no difference.
I even tried invoking the script using cpulimit (cpulimit -l 70 python my_script.py, for instance) but then the script simply doesn’t work, it just freezes, no error message.
Is there a way I can force moviepy not to use all the cores in the CPU or is there any application (like cpulimit) that would actually work ? -
How can I automate video encoding using FFmpeg
30 janvier 2020, par park johI want to find the optimal encoding for a video using FFmpeg and looking for a script to automate that.
there is VMAF (libvmaf) that helps us to measure the quality of the results, I look for a script or a way to use it to decide what is the best flags to encode each video based on libvmaf score.
For example, I want to get a list of :
FFmpeg (flag list and values), VMAF score, total size, average bitrate, max bitrate, min bitrateThen I would be able to choose the encoding flags based on that list and my bitrate preference.
Do anyone know how to compose that kind of a script/ direct me to exist one (or existing flag of FFmpeg that I don’t know that do exactly that...)