Advanced search

Medias (91)

Other articles (86)

  • Encodage et transformation en formats lisibles sur Internet

    10 April 2011

    MediaSPIP transforme et ré-encode les documents mis en ligne afin de les rendre lisibles sur Internet et automatiquement utilisables sans intervention du créateur de contenu.
    Les vidéos sont automatiquement encodées dans les formats supportés par HTML5 : MP4, Ogv et WebM. La version "MP4" est également utilisée pour le lecteur flash de secours nécessaire aux anciens navigateurs.
    Les documents audios sont également ré-encodés dans les deux formats utilisables par HTML5 :MP3 et Ogg. La version "MP3" (...)

  • Monitoring de fermes de MediaSPIP (et de SPIP tant qu’à faire)

    31 May 2013, by

    Lorsque l’on gère plusieurs (voir plusieurs dizaines) de MediaSPIP sur la même installation, il peut être très pratique d’obtenir d’un coup d’oeil certaines informations.
    Cet article a pour but de documenter les scripts de monitoring Munin développés avec l’aide d’Infini.
    Ces scripts sont installés automatiquement par le script d’installation automatique si une installation de munin est détectée.
    Description des scripts
    Trois scripts Munin ont été développés :
    1. mediaspip_medias
    Un script de (...)

  • Participer à sa traduction

    10 April 2011

    Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
    Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
    Actuellement MediaSPIP n’est disponible qu’en français et (...)

On other websites (13883)

  • How can we play 2 videos side by side as per the resolution we provide to the output video and adjust the two input videos position

    1 December 2023, by Bhavya Nayak

    -> For playing two video side by side as per the output video resolution I provide :-

    


      

    1. I want output video of resolution 1280x720 so for this.
    2. 


    


    a. First I have trimmed the two video using below command :-

    


    ffmpeg -i input_viedo.mp4 -ss 00:00:10 -t 00:00:20 -vf      "scale=1920:1080,pad=1920:1080:0:0:yellow" -c:v libx264 -c:a aac -strict -2 output_video_trimmed.mp4



    


    b. Now to I want to play both the trimmed video into one output video file as per the position I provide , so for this I have tried below command which is not giving the correct output :

    


    ffmpeg -i output_video_trimmed_1.mp4 -i output_trimmed_2.mp4 -filter_complex "[0:v]scale=634:360[pad1];[1:v]scale=640:360[pad2];[pad1]pad=1280:360:0:100[tl];[pad2]pad=1280:360:634.752:130.392[br];[tl][br]vstack,scale=1280:720[output]" -map "[output]" -c:v libx264 -preset ultrafast -crf 18 -c:a aac -b:a 1280x720 output_final_video.mp4


    


      

    • In above command I have provide the specific width,height,top,left of the input video I want ,
    • 


    


    But it is not giving me correct output.

    


    —> Output I am getting by running this command is attached below :-

    


    Output video Image I am getting by running above command

    


    Actual output I want

    


    —> The issue in above command is while adding top it is not working properly , like top is not affecting the video so I want the solution for that.

    


  • From Python, piping images to FFMPEG process with audio input, "-shortest" flag causes output file to contain only 1 frame of video and entire audio

    7 November 2023, by b_yang

    From Python, I run FFMPEG and write images to its stdin via pipe, the FFMPEG process has an audio file as input too. Everything works fine like this:

    


    cmd = ['ffmpeg', '-hide_banner', '-y', '-loglevel', 'error', '-f', 'rawvideo', 
'-pix_fmt', 'bgr24', '-video_size', '720x1280', '-r', '30.0', '-an', '-i', '-',
'-i', 'audio.aac', '-acodec', 'copy', 
'-crf', '14', '-pix_fmt', 'yuv420p', 'output.mp4']
proc = subprocess.Popen(cmd, **popen_params)


    


    Because the audio duration might be longer than the video duration, I added a '-shortest' flag (before '-crf'):

    


    cmd = ['ffmpeg', '-hide_banner', '-y', '-loglevel', 'error', '-f', 'rawvideo', 
'-pix_fmt', 'bgr24', '-video_size', '720x1280', '-r', '30.0', '-an', '-i', '-',
'-i', 'audio.aac', '-acodec', 'copy', 
'-shortest', '-crf', '14', '-pix_fmt', 'yuv420p', 'output.mp4']
proc = subprocess.Popen(cmd, **popen_params)


    


    However, with the '-shortest' flag, the resulting output.mp4 contains the entire audio, but only 1 frame of video data. What is going on here ?

    


  • add watermark to video and image with input and output array bytes

    7 October 2023, by Josivan

    I'm trying to add watermark to images and videos using ffmpeg. My files are stored on AWS S3, so they are byte arrays ([]byte).

    


    I need my input and output to be in a byte array and not saved to disk.

    


    I tried something like the code and it didn't work:

    


        buffFile := bytes.NewBuffer(file)
    out := &bytes.Buffer{}
    overlay := ffmpeg.Input("pipe:", ffmpeg.KwArgs{}).Filter("scale", ffmpeg.Args{"64:-1"}).WithInput(buffWatermark)
    err = ffmpeg.Filter(
        []*ffmpeg.Stream{
            ffmpeg.Input("pipe:", ffmpeg.KwArgs{}).WithInput(buffFile),
            overlay,
        }, "overlay", ffmpeg.Args{"10:10"}, ffmpeg.KwArgs{"enable": "gte(t,1)"}).
        Output("pipe:", ffmpeg.KwArgs{}).WithOutput(out).OverWriteOutput().ErrorToStdOut().Run()