Recherche avancée

Médias (2)

Mot : - Tags -/map

Autres articles (55)

  • Les formats acceptés

    28 janvier 2010, par

    Les 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, par

    Pour 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, par

    Pré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 Macster

    TLDR ;
    
In cmd.exe
    &#xA;makedir.bat only <= Not working
    &#xA;new.bat then makedir.bat <= Working

    &#xA;

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

    &#xA;

    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

    &#xA;

    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.

    &#xA;

    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 running makedir.bat, suddenly makedir.bat starts working as intended, even though set /a duration=2*3600*60&#x2B;*1 in the output is wrong. But thats only for cmd.exe. It wont work for PowerShell.&#xA;Whats going on ? Is the script faulty or is there some kind of caching in the cmd.exe ?

    &#xA;

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

    &#xA;

    makedir.bat

    &#xA;

    ::Get last entry from "mylist.txt"&#xA;for /f "delims=" %%a in (&#x27;type mylist.txt ^| findstr /b /c:"file"&#x27;) do set path=%%a&#xA;&#xA;::Trim path for file name&#xA;set video_path=%path:~32,-1%&#xA;&#xA;echo %video_path%&#xA;&#xA;::Get the video duration&#xA;for /f "tokens=1* delims=:" %%a in (&#x27;ffmpeg -i %video_path% 2^>^&amp;1 ^| findstr "Duration"&#x27;) do set duration=%%b&#xA;&#xA;set duration=%duration:~0,12%&#xA;set /a duration=%duration:~1,2%*3600&#x2B;%duration:~4,2%*60&#x2B;%duration:~7,2%*1&#xA;echo %duration%&#xA;

    &#xA;

    new.bat

    &#xA;

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

    &#xA;

    Ouput makedir.bat

    &#xA;

    >for /F "delims=" %a in (&#x27;type mylist.txt | findstr /b /c:"file"&#x27;) do set path=%a&#xA;&#xA;>set path=file &#x27;/webapp/stream/videos/pip/transparent_short.webm&#x27;&#xA;&#xA;>set path=file &#x27;/webapp/stream/videos/pip/transparent_short.webm&#x27;&#xA;&#xA;>set path=file &#x27;/webapp/stream/videos/pip/transparent_short.webm&#x27;&#xA;&#xA;>set path=file &#x27;/webapp/stream/videos/pip/pipshort1.webm&#x27;&#xA;&#xA;>set video_path=pipshort1.webm&#xA;&#xA;>echo pipshort1.webm&#xA;pipshort1.webm&#xA;&#xA;>for /F "tokens=1* delims=:" %a in (&#x27;ffmpeg -i pipshort1.webm 2>&amp;1 | findstr "Duration"&#x27;) do set duration=%b&#xA;&#xA;>set duration=~0,12&#xA;&#xA;>set /a duration=0,*3600&#x2B;2*60&#x2B;*1&#xA;Missing operator&#xA;&#xA;>echo 0&#xA;0&#xA;

    &#xA;

    Output new.bat + makedir.bat

    &#xA;

    >new.bat&#xA;&#xA;>for /F "tokens=1* delims=:" %a in (&#x27;ffmpeg -i pipshort1.webm 2>&amp;1 | findstr "Duration"&#x27;) do set duration=%b&#xA;&#xA;>set duration= 00:00:22.02, start: 0.000000, bitrate: 2337 kb/s&#xA;&#xA;>set duration= 00:00:22.02&#xA;&#xA;>set /a duration=00*3600&#x2B;00*60&#x2B;22*1&#xA;&#xA;>echo 22&#xA;22&#xA;&#xA;>makedir.bat&#xA;&#xA;>for /F "delims=" %a in (&#x27;type mylist.txt | findstr /b /c:"file"&#x27;) do set path=%a&#xA;&#xA;>set path=file &#x27;/webapp/stream/videos/pip/transparent_short.webm&#x27;&#xA;&#xA;>set path=file &#x27;/webapp/stream/videos/pip/transparent_short.webm&#x27;&#xA;&#xA;>set path=file &#x27;/webapp/stream/videos/pip/transparent_short.webm&#x27;&#xA;&#xA;>set path=file &#x27;/webapp/stream/videos/pip/pipshort1.webm&#x27;&#xA;&#xA;>set video_path=pipshort1.webm&#xA;&#xA;>echo pipshort1.webm&#xA;pipshort1.webm&#xA;&#xA;>for /F "tokens=1* delims=:" %a in (&#x27;ffmpeg -i pipshort1.webm 2>&amp;1 | findstr "Duration"&#x27;) do set duration=%b&#xA;&#xA;>set duration=22&#xA;&#xA;>set /a duration=2*3600&#x2B;*60&#x2B;*1&#xA;Missing operator&#xA;&#xA;>echo 22&#xA;22&#xA;

    &#xA;

  • Weird commandline behaviour when running a batch script [closed]

    31 décembre 2022, par Macster

    TLDR ;
    &#xA;In cmd.exe
    &#xA;makedir.bat only <= Not working
    &#xA;new.bat then makedir.bat <= Working

    &#xA;

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

    &#xA;

    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

    &#xA;

    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.

    &#xA;

    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 running makedir.bat, suddenly makedir.bat starts working as intended, even though set /a duration=2*3600*60&#x2B;*1 in the output is wrong. But thats only for cmd.exe. It wont work for PowerShell.&#xA;Whats going on ? Is the script faulty or is there some kind of caching in the cmd.exe ?

    &#xA;

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

    &#xA;

    makedir.bat

    &#xA;

    ::Get last entry from "mylist.txt"&#xA;for /f "delims=" %%a in (&#x27;type mylist.txt ^| findstr /b /c:"file"&#x27;) do set path=%%a&#xA;&#xA;::Trim path for file name&#xA;set video_path=%path:~32,-1%&#xA;&#xA;echo %video_path%&#xA;&#xA;::Get the video duration&#xA;for /f "tokens=1* delims=:" %%a in (&#x27;ffmpeg -i %video_path% 2^>^&amp;1 ^| findstr "Duration"&#x27;) do set duration=%%b&#xA;&#xA;set duration=%duration:~0,12%&#xA;set /a duration=%duration:~1,2%*3600&#x2B;%duration:~4,2%*60&#x2B;%duration:~7,2%*1&#xA;echo %duration%&#xA;

    &#xA;

    new.bat

    &#xA;

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

    &#xA;

    Ouput makedir.bat

    &#xA;

    >for /F "delims=" %a in (&#x27;type mylist.txt | findstr /b /c:"file"&#x27;) do set path=%a&#xA;&#xA;>set path=file &#x27;/webapp/stream/videos/pip/transparent_short.webm&#x27;&#xA;&#xA;>set path=file &#x27;/webapp/stream/videos/pip/transparent_short.webm&#x27;&#xA;&#xA;>set path=file &#x27;/webapp/stream/videos/pip/transparent_short.webm&#x27;&#xA;&#xA;>set path=file &#x27;/webapp/stream/videos/pip/pipshort1.webm&#x27;&#xA;&#xA;>set video_path=pipshort1.webm&#xA;&#xA;>echo pipshort1.webm&#xA;pipshort1.webm&#xA;&#xA;>for /F "tokens=1* delims=:" %a in (&#x27;ffmpeg -i pipshort1.webm 2>&amp;1 | findstr "Duration"&#x27;) do set duration=%b&#xA;&#xA;>set duration=~0,12&#xA;&#xA;>set /a duration=0,*3600&#x2B;2*60&#x2B;*1&#xA;Missing operator&#xA;&#xA;>echo 0&#xA;0&#xA;

    &#xA;

    Output new.bat + makedir.bat

    &#xA;

    >new.bat&#xA;&#xA;>for /F "tokens=1* delims=:" %a in (&#x27;ffmpeg -i pipshort1.webm 2>&amp;1 | findstr "Duration"&#x27;) do set duration=%b&#xA;&#xA;>set duration= 00:00:22.02, start: 0.000000, bitrate: 2337 kb/s&#xA;&#xA;>set duration= 00:00:22.02&#xA;&#xA;>set /a duration=00*3600&#x2B;00*60&#x2B;22*1&#xA;&#xA;>echo 22&#xA;22&#xA;&#xA;>makedir.bat&#xA;&#xA;>for /F "delims=" %a in (&#x27;type mylist.txt | findstr /b /c:"file"&#x27;) do set path=%a&#xA;&#xA;>set path=file &#x27;/webapp/stream/videos/pip/transparent_short.webm&#x27;&#xA;&#xA;>set path=file &#x27;/webapp/stream/videos/pip/transparent_short.webm&#x27;&#xA;&#xA;>set path=file &#x27;/webapp/stream/videos/pip/transparent_short.webm&#x27;&#xA;&#xA;>set path=file &#x27;/webapp/stream/videos/pip/pipshort1.webm&#x27;&#xA;&#xA;>set video_path=pipshort1.webm&#xA;&#xA;>echo pipshort1.webm&#xA;pipshort1.webm&#xA;&#xA;>for /F "tokens=1* delims=:" %a in (&#x27;ffmpeg -i pipshort1.webm 2>&amp;1 | findstr "Duration"&#x27;) do set duration=%b&#xA;&#xA;>set duration=22&#xA;&#xA;>set /a duration=2*3600&#x2B;*60&#x2B;*1&#xA;Missing operator&#xA;&#xA;>echo 22&#xA;22&#xA;

    &#xA;

  • fftools/ffmpeg_opt : Fix precedence issue in abs_start_seek calculation

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

    This patch corrects a C operator precedence issue in fftools/ffmpeg_opt.c
    where the abs_start_seek calculation did not yield the expected result
    due to incorrect placement of parentheses.

    • [DH] fftools/ffmpeg_opt.c