Recherche avancée

Médias (91)

Autres articles (51)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Problèmes fréquents

    10 mars 2010, par

    PHP et safe_mode activé
    Une des principales sources de problèmes relève de la configuration de PHP et notamment de l’activation du safe_mode
    La solution consiterait à soit désactiver le safe_mode soit placer le script dans un répertoire accessible par apache pour le site

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

Sur d’autres sites (6788)

  • Linux - Generate a video from pictures and text [on hold]

    29 avril 2017, par lluisu

    I’m developing a server with AWS Elastic Beanstalk. I have a project that is programmed in Django (Python) and I have to generate a video from an array of user images. If possible, I have to append text on the images too.

    I took a look at ffmpeg and using lambda functions from AWS, but I can’t see if I can paint text on the images. It seems like there’s a library that lets lambda execute ffmpeg : https://github.com/binoculars/aws-lambda-ffmpeg/

  • How to justify text in drawtext in ffmpeg ?

    26 décembre 2019, par Milan Tejani

    I am adding text watermarks to the video using ffmpeg command and I’ve added three lines already using drawtext in ffmpeg command. So, it works perfectly and adds three lines at the bottom left corner of the video.

    In the first line there are 25 characters, the second line contains 7 characters, and the third line contains 3 characters. These three lines are located from the left to right.

    So, I want to justify 2nd and 3rd line’s texts to the center as per the first line width.

    What I get :

    Hello World Ffmpeg

    hello

    hel

    what I want :

    Hello World Ffmpeg

         hello

          hel

    here command i used :

    ffmpeg -i input.mp4 -vf "[in]drawtext=fontsize=20:fontcolor=White:fontfile='roboto.ttf':text='Hello World Ffmpeg':x=(w)/2:y=(h)/2, drawtext=fontsize=20:fontcolor=White:fontfile='roboto.ttf':text='hello':x=(w)/2:y=((h)/2)+25, drawtext=fontsize=20:fontcolor=White:fontfile='roboto.ttf':text='hel':x=(w)/2:y=((h)/2)+50[out]" -y test_out.mp4
  • Text in ass subtitles is displayed smaller then should

    3 septembre 2024, par Armen Sanoyan

    I add subtitles to video by ffmpeg using two different ways. The first way is by using drawtext command and this way everything works perfectly. Here is the command

    


    ffmpeg -i ./input.mp4 -vf "drawtext=text='reise':fontfile=../fonts/Audiowide-Regular.ttf:fontsize=55:fontcolor=white:x=0:y=683" -codec:a copy ./output.mp4


    


    The second way is by using ass subtitles file. This way I got smaller letters and wrong y position for text. Below is the ass subtitle file content

    


    
[Script Info]
Title: Advanced Highlighted Subtitle Example
ScriptType: v4.00+
WrapStyle: 0
PlayResX: 1048
PlayResY: 750

[V4+ Styles]
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding
Style: Default,Audiowide Regular,55,&HFFFFFF,&H00FFFFFF,&H00000000,&H00000000,1,0,0,0,100,100,0,0,0,0,0,2,10,10,10,1

[Events]
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text

Dialogue: 0,00:00:0.00,00:00:2.38,Default,,0,0,0,,{\pos(0,683)\an4}reise


    


    And command for second approach

    


    ffmpeg -i ./input.mp4 -vf "ass=../subtitles.ass:fontsdir=../fonts/Audiowide-Regular.ttf"  ../output.mp4


    


    So they both get the same video, same font and same text. The problem is that in case of using ass file the text is much smaller and dislocatedresult by using ffmpeg drawtextresult by using ass subtitles

    


    The numbers on axis indicate sizes by pixels.
As you can see in second image it's much smaller and has wrong y coordinate. It seems like it has wrong scaling numbers. What is wrong with my ass file configs ?

    


    I have tried solution from [universalmediaserver]to remove PlayResX/Y, but it doesn't work. (https://www.universalmediaserver.com/forum/viewtopic.php?t=5907). I also tried to measure the text width in many other ways(like in html rendered in browser, canvas...), so I'm pretty sure that drawtext does give correctly rendered width. The problem is related to ass subtitles file. Also if I use popular fonts like Arial the deviation is much less.