
Recherche avancée
Médias (2)
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
-
Carte de Schillerkiez
13 mai 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
Autres articles (55)
-
Les formats acceptés
28 janvier 2010, parLes commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
ffmpeg -codecs ffmpeg -formats
Les format videos acceptés en entrée
Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
Les formats vidéos de sortie possibles
Dans un premier temps on (...) -
Ajouter notes et légendes aux images
7 février 2011, parPour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
Modification lors de l’ajout d’un média
Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...) -
Prérequis à l’installation
31 janvier 2010, parPréambule
Cet article n’a pas pour but de détailler les installations de ces logiciels mais plutôt de donner des informations sur leur configuration spécifique.
Avant toute chose SPIPMotion tout comme MediaSPIP est fait pour tourner sur des distributions Linux de type Debian ou dérivées (Ubuntu...). Les documentations de ce site se réfèrent donc à ces distributions. Il est également possible de l’utiliser sur d’autres distributions Linux mais aucune garantie de bon fonctionnement n’est possible.
Il (...)
Sur d’autres sites (10041)
-
Weird commandline behaviour when running a batch script. Script will only work if another script is being run first [closed]
31 décembre 2022, par MacsterTLDR ;

In cmd.exe

makedir.bat
only <= Not working

new.bat
thenmakedir.bat
<= Working

I'm new to batch and noticed a weird behaviour when running a scrip.


It basically takes the last entry(Video file path) from a textfile and uses the path inside a ffmpeg command to get the file duration. But it's not working.
makedir.bat


What I know is that the part which gets the path is working on it's own, and so does the part that gets the duration.


Now, if I run a second script,
new.bat
, which is actually just the part that gets the files duration and outputs the right duration(22 Seconds), before runningmakedir.bat
, suddenlymakedir.bat
starts working as intended, even thoughset /a duration=2*3600*60+*1
in the output is wrong. But thats only forcmd.exe
. It wont work forPowerShell
.
Whats going on ? Is the script faulty or is there some kind of caching in the cmd.exe ?

EDIT : Oh, and if I run
makedir.bat
first and thennew.bat
, new.bat wont work anymore.

makedir.bat


::Get last entry from "mylist.txt"
for /f "delims=" %%a in ('type mylist.txt ^| findstr /b /c:"file"') do set path=%%a

::Trim path for file name
set video_path=%path:~32,-1%

echo %video_path%

::Get the video duration
for /f "tokens=1* delims=:" %%a in ('ffmpeg -i %video_path% 2^>^&1 ^| findstr "Duration"') do set duration=%%b

set duration=%duration:~0,12%
set /a duration=%duration:~1,2%*3600+%duration:~4,2%*60+%duration:~7,2%*1
echo %duration%



new.bat


for /F "tokens=1* delims=:" %%a in ('ffmpeg -i pipshort1.webm 2^>^&1 ^| findstr "Duration"') do set duration=%%b
set duration=%duration:~0,12%
set /a duration=%duration:~1,2%*3600+%duration:~4,2%*60+%duration:~7,2%*1



Ouput makedir.bat


>for /F "delims=" %a in ('type mylist.txt | findstr /b /c:"file"') do set path=%a

>set path=file '/webapp/stream/videos/pip/transparent_short.webm'

>set path=file '/webapp/stream/videos/pip/transparent_short.webm'

>set path=file '/webapp/stream/videos/pip/transparent_short.webm'

>set path=file '/webapp/stream/videos/pip/pipshort1.webm'

>set video_path=pipshort1.webm

>echo pipshort1.webm
pipshort1.webm

>for /F "tokens=1* delims=:" %a in ('ffmpeg -i pipshort1.webm 2>&1 | findstr "Duration"') do set duration=%b

>set duration=~0,12

>set /a duration=0,*3600+2*60+*1
Missing operator

>echo 0
0



Output new.bat + makedir.bat


>new.bat

>for /F "tokens=1* delims=:" %a in ('ffmpeg -i pipshort1.webm 2>&1 | findstr "Duration"') do set duration=%b

>set duration= 00:00:22.02, start: 0.000000, bitrate: 2337 kb/s

>set duration= 00:00:22.02

>set /a duration=00*3600+00*60+22*1

>echo 22
22

>makedir.bat

>for /F "delims=" %a in ('type mylist.txt | findstr /b /c:"file"') do set path=%a

>set path=file '/webapp/stream/videos/pip/transparent_short.webm'

>set path=file '/webapp/stream/videos/pip/transparent_short.webm'

>set path=file '/webapp/stream/videos/pip/transparent_short.webm'

>set path=file '/webapp/stream/videos/pip/pipshort1.webm'

>set video_path=pipshort1.webm

>echo pipshort1.webm
pipshort1.webm

>for /F "tokens=1* delims=:" %a in ('ffmpeg -i pipshort1.webm 2>&1 | findstr "Duration"') do set duration=%b

>set duration=22

>set /a duration=2*3600+*60+*1
Missing operator

>echo 22
22



-
Weird commandline behaviour when running a batch script [closed]
31 décembre 2022, par MacsterTLDR ;

In cmd.exe

makedir.bat
only <= Not working

new.bat
thenmakedir.bat
<= Working

I'm new to batch and noticed a weird behaviour when running a scrip.


It basically takes the last entry(Video file path) from a textfile and uses the path inside a ffmpeg command to get the file duration. But it's not working.
makedir.bat


What I know is that the part which gets the path is working on it's own, and so does the part that gets the duration.


Now, if I run a second script,
new.bat
, which is actually just the part that gets the files duration and outputs the right duration(22 Seconds), before runningmakedir.bat
, suddenlymakedir.bat
starts working as intended, even thoughset /a duration=2*3600*60+*1
in the output is wrong. But thats only forcmd.exe
. It wont work forPowerShell
.
Whats going on ? Is the script faulty or is there some kind of caching in the cmd.exe ?

EDIT : Oh, and if I run
makedir.bat
first and thennew.bat
, new.bat wont work anymore.

makedir.bat


::Get last entry from "mylist.txt"
for /f "delims=" %%a in ('type mylist.txt ^| findstr /b /c:"file"') do set path=%%a

::Trim path for file name
set video_path=%path:~32,-1%

echo %video_path%

::Get the video duration
for /f "tokens=1* delims=:" %%a in ('ffmpeg -i %video_path% 2^>^&1 ^| findstr "Duration"') do set duration=%%b

set duration=%duration:~0,12%
set /a duration=%duration:~1,2%*3600+%duration:~4,2%*60+%duration:~7,2%*1
echo %duration%



new.bat


for /F "tokens=1* delims=:" %%a in ('ffmpeg -i pipshort1.webm 2^>^&1 ^| findstr "Duration"') do set duration=%%b
set duration=%duration:~0,12%
set /a duration=%duration:~1,2%*3600+%duration:~4,2%*60+%duration:~7,2%*1



Ouput makedir.bat


>for /F "delims=" %a in ('type mylist.txt | findstr /b /c:"file"') do set path=%a

>set path=file '/webapp/stream/videos/pip/transparent_short.webm'

>set path=file '/webapp/stream/videos/pip/transparent_short.webm'

>set path=file '/webapp/stream/videos/pip/transparent_short.webm'

>set path=file '/webapp/stream/videos/pip/pipshort1.webm'

>set video_path=pipshort1.webm

>echo pipshort1.webm
pipshort1.webm

>for /F "tokens=1* delims=:" %a in ('ffmpeg -i pipshort1.webm 2>&1 | findstr "Duration"') do set duration=%b

>set duration=~0,12

>set /a duration=0,*3600+2*60+*1
Missing operator

>echo 0
0



Output new.bat + makedir.bat


>new.bat

>for /F "tokens=1* delims=:" %a in ('ffmpeg -i pipshort1.webm 2>&1 | findstr "Duration"') do set duration=%b

>set duration= 00:00:22.02, start: 0.000000, bitrate: 2337 kb/s

>set duration= 00:00:22.02

>set /a duration=00*3600+00*60+22*1

>echo 22
22

>makedir.bat

>for /F "delims=" %a in ('type mylist.txt | findstr /b /c:"file"') do set path=%a

>set path=file '/webapp/stream/videos/pip/transparent_short.webm'

>set path=file '/webapp/stream/videos/pip/transparent_short.webm'

>set path=file '/webapp/stream/videos/pip/transparent_short.webm'

>set path=file '/webapp/stream/videos/pip/pipshort1.webm'

>set video_path=pipshort1.webm

>echo pipshort1.webm
pipshort1.webm

>for /F "tokens=1* delims=:" %a in ('ffmpeg -i pipshort1.webm 2>&1 | findstr "Duration"') do set duration=%b

>set duration=22

>set /a duration=2*3600+*60+*1
Missing operator

>echo 22
22



-
fftools/ffmpeg_opt : Fix precedence issue in abs_start_seek calculation
25 décembre 2024, par Pradeep Kumar Goudagunta