Recherche avancée

Médias (3)

Mot : - Tags -/collection

Autres articles (40)

  • 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

  • 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 (...)

Sur d’autres sites (5861)

  • ffmpeg - put video atop of second and center it while keeping aspect ratio

    25 août 2022, par artolini

    I'm trying to put 16:9 video atop of same blurred 1:1 video just like on the photos.
I'm looking a wise guy with ffmpeg knowledge to help me with think of about the command which will :

    


      

    1. rescale 16:9 (sharp video) accordingly to blurred one height (keeping the width automatically to ratio)
    2. 


    3. center the 16:9 (sharp video) to x position = (blurredVideoWidth / 2) - (sharpVideoWidth / 2)
    4. 


    


    My current comment looks like this :

    


    ffmpeg -y -i ${squareBlurredVideoUri} -i ${square169VideoUri} -filter_complex "[1:v]scale=620:-1[v2];[0:v][v2]overlay=0:0" -codec:a copy ${squareFinalVideoUri}

    


    As you can see scale is hardcoded to 620 which is wrong because we should rescale it accordingly to blurred video height.

    


    Overlay is set to 0:0 which places sharp video to x = 0 and y = 0 and should center it

    


    Thank you in advance.

    


    Current result :
current
Desired result :
desired

    


  • Can you insert text from a file in real time with ffmpeg streaming ?

    6 décembre 2020, par Fight Fire With Fire

    I have this code i use to stream a file and place the name of the show of the video at a certain time of the video ( name_of_show ) at the top of the screen, and the bottom of the screen it take the name of the show from video_title.txt and places it on the bottom of the screen.

    


    What I want to do is find a way at a interval say 1 or 2 minutes, pull whatever text is currently in video_title.txt and place it in the video for a few seconds.

    


    I would update video_title.txt from another python program. Here's my current code below.

    


               command = [
        "ffmpeg" , "-re" , "-i" , video[0] ,
        "-vf" ,  "[in]drawtext=fontsize=40:fontcolor=white:box=1:boxcolor=black@0.8:boxborderw=5:fontfile=/home/fonts/timeless.ttf: text='" + name_of_show + "':x='W-(W+tw)*mod(t\,10)/10':y='H/20':enable='between(t,50,70)',drawtext=fontsize=20:fontfile=/home/fonts/timeless.ttf:textfile=/video_title.txt:fontcolor=white:box=1:boxcolor=black@0.8:boxborderw=5:x=W-w+5:y=h-th-50:enable='1'[out]"
        "-vcodec" , "libx264", "-pix_fmt", "yuv420p",
        "-preset" , "medium" , "-r" , "30" , "-g" , "48" , "-b:v" , "2500k" ,
        "-acodec" , "libmp3lame" , "-ar" , "44100", "-threads" , "6" ,
        "-q:a" , "3" , "-b:a" , "712000" ,"-bufsize", "512k" , "-f" ,
        "flv" , STREAM_URL,


    


    Ultimately the effect I am trying to achieve is a long stream of lets say 1 hour on twitch/youtube where someone could send a text message and it would appear in the stream.

    


  • How to use ffmpeg to add a text to avi video ?

    13 janvier 2014, par qliq

    I am trying to put a simple text on the bottom of video using ffmpeg on Ubuntu 12.04 . I tried this which is suggested in several places :

    ffmpeg -i input.avi -vf drawtext="fontfile=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif.ttf:text='Text to write':fontsize=20:fontcolor=black:x=100:y=100" output.avi

    But I get this error each time :

    ffmpeg version 0.8.3-4:0.8.3-0ubuntu0.12.04.1, Copyright (c) 2000-2012 the Libav developers
     built on Jun 12 2012 16:37:58 with gcc 4.6.3
    *** THIS PROGRAM IS DEPRECATED ***
    This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.
    Input #0, avi, from 'input.avi':
     Duration: 04:09:09.66, start: 0.000000, bitrate: 480 kb/s
       Stream #0.0: Video: mpeg4 (Advanced Simple Profile), yuv420p, 320x240 [PAR 1:1 DAR 4:3], 45 tbr, 45 tbn, 45 tbc
       Stream #0.1: Audio: mp3, 48000 Hz, stereo, s16, 64 kb/s
    [buffer @ 0x860d5a0] w:320 h:240 pixfmt:yuv420p
    Incompatible sample format 's16' for codec 'ac3', auto-selecting format 'flt'
    [ac3 @ 0x8607a00] invalid bit rate
    Output #0, avi, to 'output.avi':
       Stream #0.0: Video: mpeg4, yuv420p, 320x240 [PAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 90k tbn, 45 tbc
       Stream #0.1: Audio: ac3, 48000 Hz, stereo, flt, 200 kb/s
    Stream mapping:
     Stream #0.0 -> #0.0
     Stream #0.1 -> #0.1
    Error while opening encoder for output stream #0.1 - maybe incorrect parameters such as bit_rate, rate, width or height

    Appreciate your help.