Recherche avancée

Médias (1)

Mot : - Tags -/biographie

Autres articles (111)

  • Script d’installation automatique de MediaSPIP

    25 avril 2011, par

    Afin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
    Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
    La documentation de l’utilisation du script d’installation (...)

  • Les notifications de la ferme

    1er décembre 2010, par

    Afin d’assurer une gestion correcte de la ferme, il est nécessaire de notifier plusieurs choses lors d’actions spécifiques à la fois à l’utilisateur mais également à l’ensemble des administrateurs de la ferme.
    Les notifications de changement de statut
    Lors d’un changement de statut d’une instance, l’ensemble des administrateurs de la ferme doivent être notifiés de cette modification ainsi que l’utilisateur administrateur de l’instance.
    À la demande d’un canal
    Passage au statut "publie"
    Passage au (...)

  • Initialisation de MediaSPIP (préconfiguration)

    20 février 2010, par

    Lors de l’installation de MediaSPIP, celui-ci est préconfiguré pour les usages les plus fréquents.
    Cette préconfiguration est réalisée par un plugin activé par défaut et non désactivable appelé MediaSPIP Init.
    Ce plugin sert à préconfigurer de manière correcte chaque instance de MediaSPIP. Il doit donc être placé dans le dossier plugins-dist/ du site ou de la ferme pour être installé par défaut avant de pouvoir utiliser le site.
    Dans un premier temps il active ou désactive des options de SPIP qui ne le (...)

Sur d’autres sites (8435)

  • ffmpeg, add static image to beginning and end with transitions

    14 mars 2021, par CreateChange

    ffmpeg noob here, trying to help my mother with some videos for real estate walkthroughs. I'd like to set up a simple pipeline that I can run videos through and have outputted as such :

    


      

    • 5 second (silent) title card ->
    • 


    • xfade transition ->
    • 


    • property walk through ->
    • 


    • xfade transition ->
    • 


    • 5 second (silent) title card
    • 


    


    Considerations :

    


      

    • The intro / outro card will be the same content.
    • 


    • The input walkthrough videos will be of variable length so, if possible, a dynamic solution accounting for this would be ideal. If this requires me to script something using ffprobe, I can do that - just need to gain an understanding of the syntax and order of operations.
    • 


    • The video clip will come in with some audio already overlaid. I would like for the title cards to be silent, and have the video/audio clip fade in/out together.
    • 


    


    I have gotten a sample working without the transitions :

    


    ffmpeg -loop 1 -t 5 -i title_card.jpg \
    -i walkthrough.MOV \
    -f lavfi -t 0.1 -i anullsrc \
    -filter_complex "[0][2][1:v][1:a][0][2]concat=n=3:v=1:a=1[v][a]" \
    -map "[v]" -map "[a]" \
    -vcodec libx265 \
    -crf 18 \
    -vsync 2 \
    output_without_transitions.mp4


    


    I have been unable to get it to work with transitions. See below for the latest iteration :

    


    ffmpeg -loop 1 -t 5 -r 60 -i title_card.jpg \
    -r 60 -i walkthrough.MOV \
    -f lavfi -t 0.1 -i anullsrc \
    -filter_complex \
    "[0][1:v]xfade=transition=fade:duration=0.5:offset=4.5[v01]; \
    [v01][0]xfade=transition=fade:duration=0.5:offset=12.8[v]" \
    -map "[v]" \
    -vcodec libx265 \
    -crf 18 \
    -vsync 2 \
    output_with_transitions.mp4


    


    This half-works, resulting in the initial title card, fading into the video, but the second title card never occurs. Note, I also removed any references to audio, in an effort to get the transitions alone to work.

    


    I have been beating my head against the wall on this, so help would be appreciated :)

    


  • ffmpeg jpg batch script with timestamp

    3 juillet 2021, par Chris

    I currently have this batch script using ffmpeg to scale images and place in a new location with the same folder structure. How do i include the timestamp from the original jpg file in the filename of the new scaled jpg file ?

    


    This gives files named m-H-S_IMG_0305

    


    @echo off &setlocal
set /a nfile=0
echo Copying directory structure from %1 to %2 ...
xcopy /T "%~1" "%~2"
REM walk directory structure and convert each file in quiet mode
set "sourcefolder=%~1"
set "targetfolder=%~2"
for /R "%sourcefolder%" %%a in (*.JPG) do (
    echo converting "%%~nxa" ...
    set "sourcefile=%%~fa"
    set "sourcepath=%%~dpa"
    set "targetfile=%%~na.JPG"
    setlocal enabledelayedexpansion
    set "targetfolder=%targetfolder%!sourcepath:%sourcefolder%=!"
    ffmpeg -v quiet -i "!sourcefile!" -vf scale=256x256 -q:v 1 -strftime 1 "!targetfolder!%Y-%m-%d_%H-%M-%S_!targetfile!"
    endlocal
    set /A nfile+=1
)
echo Done! Converted %nfile% file(s)


    


    Working version for file modify date :

    


    @echo off &setlocal
set /a nfile=0
echo Copying directory structure from %1 to %2 ...
xcopy /T "%~1" "%~2"
REM walk directory structure and convert each file in quiet mode
set "sourcefolder=%~1"
set "targetfolder=%~2"
for /R "%sourcefolder%" %%a in (*.JPG) do (
    echo converting "%%~nxa" ...
    echo which has a timestamp of "%%~ta" ...
    set "sourcefile=%%~fa"
    set "sourcepath=%%~dpa"
    set "targetfile=%%~na.JPG"
    set "timestamp=%%~ta"
    setlocal enabledelayedexpansion
    set "timestamp=!timestamp: =_!"
    set "timestamp=!timestamp::=-!"
    set "timestamp=!timestamp:/=-!"
    set "targetfolder=%targetfolder%!sourcepath:%sourcefolder%=!"
    ffmpeg -v quiet -i "!sourcefile!" -vf scale=256x256 -q:v 1 "!targetfolder!!timestamp!_!targetfile!"
    endlocal
    set /A nfile+=1
)
echo Done! Converted %nfile% file(s)


    


    File Creation date option attempt using exiftool (This works but it stops frequently so there is an error somewhere) :

    


    @echo off &setlocal
set /a nfile=0
echo Copying directory structure from %1 to %2 ...
xcopy /T "%~1" "%~2"
REM walk directory structure and convert each file in quiet mode
set "sourcefolder=%~1"
set "targetfolder=%~2"
for /R "%sourcefolder%" %%a in (*.JPG) do (
    echo converting "%%~nxa" ...
    echo which has a timestamp of "%%~ta" ...
    set "sourcefile=%%~fa"
    set "sourcepath=%%~dpa"
    set "targetfile=%%~na.JPG"
    set "timestamp=('exiftool -d %%Y%%m%%d_%%H%%M%%S -CreateDate %%~a')"
    for /f "tokens=1,2 delims=x" %%a in ('exiftool -T -d %%Y%%m%%d_%%H%%M%%S -CreateDate "%%a"') do (
        set "timestamp=%%a"
    )
    setlocal enabledelayedexpansion
    set "targetfolder=%targetfolder%!sourcepath:%sourcefolder%=!"
    ffmpeg -v quiet -i "!sourcefile!" -vf scale=256x256 -q:v 1 "!targetfolder!!timestamp!_!targetfile!"
    endlocal
    set /A nfile+=1
)
echo Done! Converted %nfile% file(s)


    


  • Converting mkv files to mp4 with ffmpeg-python

    16 mai, par myth0s

    I have a lot of .mkv files that I'm trying to convert to .mp4, so I decided to try and program a solution in python. After a few hours, trying to figure out how to copy the subfolders too, I gave up on it and decided to stick with converting individual subfolders, and then copying them over to another directory.

    


    I've made a simple script, that should convert .mkv files that are in the same folder as the script. However, I keep getting this error :

    


    


    FileNotFoundError : [WinError 2] The system cannot find the file specified

    


    


    Here's my code :

    


    import os
import ffmpeg

start_dir = os.getcwd()

def convert_to_mp4(mkv_file):
    no_extension = str(os.path.splitext(mkv_file))
    with_mp4 = no_extension + ".mp4"
    ffmpeg.input(mkv_file).output(with_mp4).run()
    print("Finished converting {}".format(no_extension))

for path, folder, files in os.walk(start_dir):
    for file in files:
        if file.endswith('.mkv'):
            print("Found file: %s" % file)
            convert_to_mp4(file)
        else:
            pass