Recherche avancée

Médias (91)

Autres articles (80)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-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

Sur d’autres sites (12048)

  • FFmpeg command to apply multiple filters and limit the final file size

    16 mars 2016, par Konrad —

    I’m using command below to convert video to a format of the defined scale and in order to hardcode the subtitles

    Original syntax

    ffmpeg -i "Original File.mov"  -vf subtitles=Subtitles.srt -vf scale=1920:1080 \
          -crf 12 "Final File".mov

    Problem

    I would like to expand this command further and :

    • ensure that the produce file is under 2GB
    • I would like to include additional parameters with advanced subtitle options, like setting the canvas size and fixing the potential delay

    Side notes

    I reckon that in case of predefining the file size the -crf 12 paramater will be redundant ?

  • Apply a trim on the output of filter_complex ?

    8 décembre 2023, par PirateApp

    I have a filter complex expression that takes 4 input videos and combines them in 4 corners of the screen synced at a particular start time from each video

    


    ffmpeg \
    -i first_vid.mkv \
    -i second_vid.mp4 \
    -i third_vid.mkv \
    -i fourth_vid.mkv  \
    -filter_complex \
        "nullsrc=size=1280x720 [base]; \
        [0:v] \
            trim=start=40,\
            setpts=PTS-STARTPTS,\
            scale=640x360,\
            drawtext=fontfile=/Users/vr/Downloads/gameplay_vids/generated/control-freak-font/CONTF___.ttf\
            :text='one'\
            :fontsize=32\
            :fontcolor=0xFFFFFF\
            :alpha='if(lt(t,30),0,if(lt(t,35),(t-30)/5,if(lt(t,65),1,if(lt(t,70),(5-(t-65))/5,0))))'\
            :x=w-text_w-12\
            :y=h-text_h-12 [upperleft];\
        [1:v] \
            trim=start=35.05, \
            setpts=PTS-STARTPTS, \
            scale=640x360, \
            drawtext=fontfile=/Users/vr/Downloads/gameplay_vids/generated/control-freak-font/CONTF___.ttf \
            :text='two' \
            :fontsize=32 \
            :fontcolor=0xFFFFFF \
            :alpha='if(lt(t,30),0,if(lt(t,35),(t-30)/5,if(lt(t,65),1,if(lt(t,70),(5-(t-65))/5,0))))' \
            :x=w-text_w-12 \
            :y=h-text_h-12 [upperright]; \
        [2:v] \
            trim=start=36.467, \
            setpts=PTS-STARTPTS, \
            scale=640x360, \
            drawtext=fontfile=/Users/vr/Downloads/gameplay_vids/generated/control-freak-font/CONTF___.ttf \
           :text='three' \
           :fontsize=32 \
           :fontcolor=0xFFFFFF \
           :alpha='if(lt(t,30),0,if(lt(t,35),(t-30)/5,if(lt(t,65),1,if(lt(t,70),(5-(t-65))/5,0))))' \
           :x=w-text_w-12 \
           :y=h-text_h-12 [lowerleft]; \
        [3:v] \
            trim=start=35.097, \
            setpts=PTS-STARTPTS, \
            scale=640x360, \
            drawtext=fontfile=/Users/vr/Downloads/gameplay_vids/generated/control-freak-font/CONTF___.ttf \
           :text='four' \
           :fontsize=32 \
           :fontcolor=0xFFFFFF \
           :alpha='if(lt(t,30),0,if(lt(t,35),(t-30)/5,if(lt(t,65),1,if(lt(t,70),(5-(t-65))/5,0))))' \
           :x=w-text_w-12 \
           :y=h-text_h-12 [lowerright];  \
        [2:a] \
           atrim=start=36.467, \
           asetpts=PTS-STARTPTS[outa]; \
           [base][upperleft] overlay=shortest=1 [tmp1]; \
           [tmp1][upperright] overlay=shortest=1:x=640 \
           [tmp2];[tmp2][lowerleft] overlay=shortest=1:y=360 \
           [tmp3];[tmp3][lowerright] overlay=shortest=1:x=640:y=360[v] \
    " -map "[v]" -map "[outa]" -c:v libx264 -shortest -ss 00:00 -to 9999 "output.mp4"


    


      

    • I want to trim the part between 37:23 and 37:33 of the output video
    • 


    • Is there a way I can do this without writing a separate ffmpeg command like a pipe or a chain or multiple filter_complex expressions ?
    • 


    


  • "How can we use Ffmpeg to apply blur, overlay a logo and waveform, and add a border around a video, step by step ? [closed]

    1er février 2024, par itsfaisalkhalid

    We're looking to enhance a video using Ffmpeg by implementing several effects sequentially. First, we aim to apply a blur effect to the entire video. Then, we want to overlay a logo and a waveform onto the blurred video. Finally, we need to add a border around the entire composition. This step-by-step process requires precise commands and careful consideration of parameters to achieve the desired result effectively.

    


    I utilized Ffmpeg commands to sequentially apply blur, overlay the logo and waveform, and add a border to the video. I expected each effect to be applied in the specified order, resulting in a visually enhanced video with all desired elements. However, I encountered challenges in properly configuring the parameters for each effect, leading to unexpected results such as misaligned overlays or improper blur intensity.

    


    @echo off
setlocal enabledelayedexpansion

rem Set paths and directories
set "ffmpeg_path=C:\ffmpeg\bin\ffmpeg.exe"
set "input_dir=_input"
set "output_dir=_output"

rem Ensure input and output directories exist
if not exist "%input_dir%" (
    echo Error: Input directory "%input_dir%" not found.
    exit /b 1
)

if not exist "%output_dir%" (
    mkdir "%output_dir%"
)

rem Loop through input directory
for %%t in ("%input_dir%\*.*") DO (

    rem Process each file with ffmpeg
"%ffmpeg_path%" -y -i "%%t" -i logo.png -filter_complex "\
    [0:v]eq=brightness=0.2:saturation=2.0:contrast=1.2, crop=iw/1.2:ih/1.2, \
    boxblur=1:2 [blurred_bg]; \
    [blurred_bg][1:v]overlay=(main_w-overlay_w)/2:(main_h-overlay_h-10)[bg_with_logo]; \
    [0:a]showwaves=s=1080x100:mode=line:colors=white [waveform]; \
    [bg_with_logo][waveform]overlay=10:H-h-10, \
    format=yuv420p[v]; \
    [v]pad=iw+20:ih+20:x=10:y=10:color=white[final_output]" \
    -map "[final_output]" -map 0:a -c:v h264 -c:a aac -b:a 128k -ar 44100 "%output_dir%\temp.mp4"

    rem Check if output file exists
    if exist "%output_dir%\temp.mp4" (
        rem Calculate new MD5 hash
        certutil -hashfile "%output_dir%\temp.mp4" MD5 > "%output_dir%\temp_md5.txt"

        rem Remove ID3 tag metadata
        "%ffmpeg_path%" -i "%output_dir%\temp.mp4" -map_metadata -1 -c:v copy -c:a copy "%output_dir%\%%~nt.mp4"

        rem Clean up temporary files
        del "%output_dir%\temp.mp4"
        del "%output_dir%\temp_md5.txt"
    ) else (
        echo Error: Failed to create output file for "%%~nt"
    )
)

pause