Recherche avancée

Médias (0)

Mot : - Tags -/protocoles

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (90)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

  • Support de tous types de médias

    10 avril 2011

    Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)

Sur d’autres sites (5810)

  • Word-by-word display of subtitles in FFMPEG ?

    10 mars 2020, par ThaDon

    I am trying to burn subtitles into a video such that they appear in a word-by-word fashion instead of all at once.

    What I mean by this is, a word will appear, then another word will appear next to it, and so on. Eventually the line will clear, then repeat.

    Example :

    enter image description here

    I thought I could create an Advanced Substation Alpha file where subtitles share the same end-time but differing start times, however FFMPEG doesn’t seem to cope very well when rendering the file :

    [Script Info]
    ; Script generated by FFmpeg/Lavc57.107.100
    ScriptType: v4.00+
    PlayResX: 384
    PlayResY: 288

    [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,Arial,16,&Hffffff,&Hffffff,&H0,&H0,0,0,0,0,100,100,0,0,1,1,0,2,10,10,10,0

    [Events]
    Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
    Dialogue: 0,0:00:00.00,0:00:03.46,Default,,0,0,0,,I'm
    Dialogue: 0,0:00:01.00,0:00:03.46,Default,,0,0,0,,a
    Dialogue: 0,0:00:01.50,0:00:03.46,Default,,0,0,0,,subtitle

    The idea being that I'm would appear, then 1 second later a would show up next to it followed by subtitle a half second later

  • How to make customizable subtitles with FFmpeg ?

    6 août 2022, par Alex Rypun

    I need to generate videos with text (aka subtitles) and styles provided by users.
The styles are a few fonts, text border, text background, text shadow, colors, position on the video, etc.

    


    As I understand there are 2 filters I can use : drawtext and subtitles.

    


    subtitles is easier to use but it's not fully customizable. For example, I can't add shadow and background for the same text.

    


    drawtext is more customizable but quite problematic.

    


    I've implemented almost everything I need with drawtext but have one problem : multiline text with a background.

    


    boxborderw parameter adds specified pixels count from all 4 sides from the extreme text point. I need to make backgrounds touch each other (pixel perfect). That means I have to position text lines with the same space between extreme text points (not between baselines). With crazy workarounds I solved it.
Everything almost works but sometimes some strange border appears between lines :

    


    enter image description here

    


    Spending ages investigating I figured out that it depends on the actual line height and the position on the video.
Each letter has its own distances between baseline and the highest point and between baseline and the lowest point.
The whole line height is the difference between the highest point of the highest symbol and the lowest point of the lowest symbol :

    


    enter image description here

    


    Now the most interesting.

    


    For lines that have even pixels height.

    


    If the line is positioned on the odd pixel (y-axis) and has an odd boxborderw (or positioned on the even pixel (y-axis) and has an even boxborderw ), then it's rendered as expected (without any additional borders).
In other cases, the thin dark line is noticeable on the contact line (it's rendered either on top or at bottom of each text block :

    


    enter image description here

    

    


    For lines that have odd pixels height.

    


    In all cases the thin dark line is noticeable. Depending on y coordinate (odd or even) and boxborderw value (odd or even) that magic line appears on top or bottom :

    


    enter image description here

    


    I can make text lines overlap a bit. This solves the problem but adds another problem.
I use fade-in/out by smoothly changing alfa (transparency). When the text becomes semi-transparent the overlapped area has a different color :

    


    enter image description here

    


    Here is the command I use :

    


    ffmpeg "-y" "-f" "lavfi" "-i" "color=#ffffff" "-filter_complex" \
"[0:v]loop=-1:1:0,trim=duration=2.00,format=yuv420p,scale=960:540,setdar=16/9[video];\
[video]drawtext=text='qqq':\
fontfile=ComicSansMS.ttf:\
fontcolor=#ffffff:\
fontsize=58:\
bordercolor=#000000:\
borderw=2:\
box=1:\
boxcolor=#ff0000:\
boxborderw=15:\
x=(w-text_w)/2:\
y=105:\
alpha='if(lt(t,0),0,if(lt(t,0.5),(t-0)/0.5,if(lt(t,1.49),1,if(lt(t,1.99),(0.5-(t-1.49))/0.5,0))))',\
drawtext=text='qqq':\
fontfile=ComicSansMS.ttf:\
fontcolor=#ffffff:\
fontsize=58:\
bordercolor=#000000:\
borderw=2:\
box=1:\
boxcolor=#ff0000:\
boxborderw=15:\
x=(w-text_w)/2:\
y=182:\
alpha='if(lt(t,0),0,if(lt(t,0.5),(t-0)/0.5,if(lt(t,1.49),1,if(lt(t,1.99),(0.5-(t-1.49))/0.5,0))))'[video]" \
"-vsync" "2" "-map" "[video]" "-r" "25" "output_multiline.mp4"


    


    I tried to draw rectangles with drawbox following the same logic (changing the position and height). But there were no problems.

    


    Does anybody know what is the nature of that dark line ?
And how it can depend on the even/odd of the height and position ?
What should I investigate to figure out such a behavior ?

    


    UPD :

    


    Just accidentally figured out that changing the pixel format (from format=yuv420p to format=uyvy422 or many others) solved the problem. At least on my test commands.
Now will learn about what is pixel format)

    


  • Codec AVOption b (set bitrate (in bits/s)) specified for output file #0 (360p.m3u 8) has not been used for any stream.

    28 avril, par Marc Archenault

    I am receiving this warning from ffmpeg. The job runs and all the videos seem to output correctly. I have 2 hls, 1 mp4 with overlay + A single thumbnail.

    



    The warning :

    



    Stream #1:0 : Video : png, rgba(pc), 500x38, 25 tbr, 25 tbn, 25 tbc
Codec AVOption b (set bitrate (in bits/s)) specified for output file #0 (360p.m3u
8) has not been used for any stream. The most likely reason is either wrong type
 (e.g. a video option with no video streams) or that it is a private option of s
ome encoder which was not actually used for any stream.

    



    The windows batch command :

    



    ffmpeg -loglevel info -threads 2 -hide_banner -y -i SampleVideo_1280x720_10mb.mp4 -i ecocastvideo-overlay-shadow-white-500.png^
 -filter_complex "[1]colorchannelmixer=aa=0.7,scale=iw*0.7 :-1[wm] ;[0:v][wm]overlay=(main_w-overlay_w)-10 :(main_h-overlay_h)-30,split=3[a][b][c] ;[a]scale=w=640:h=360:force_original_aspect_ratio=decrease[a] ;[b]scale=w=1280:h=720:force_original_aspect_ratio=decrease[b] ;[c]scale=w=1280:h=720:force_original_aspect_ratio=decrease[c]"^
 -map "[a]" -map 0:v -c:v h264 -profile:v main -crf 20 -preset veryfast -sc_threshold 0 -g 72 -keyint_min 72 -hls_time 4 -hls_playlist_type vod -b:a 96k -hls_flags single_file 360p.m3u8^
 -map "[b]" -map 0:v -c:v h264 -profile:v main -crf 20 -preset veryfast -sc_threshold 0 -g 72 -keyint_min 72 -hls_time 4 -hls_playlist_type vod -b:a 96k -hls_flags single_file 720p.m3u8^
 -map "[c]" -map 0:v -c:v h264 -profile:v main -preset veryfast 720.mp4^
 -map 0:v -y -ss 0.5 -vframes 1 -an -s 120x90 -ss 30 thumbname-00001.png