Recherche avancée

Médias (1)

Mot : - Tags -/belgique

Autres articles (13)

  • Submit bugs and patches

    13 avril 2011

    Unfortunately a software is never perfect.
    If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
    If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
    You may also (...)

  • Qualité du média après traitement

    21 juin 2013, par

    Le bon réglage du logiciel qui traite les média est important pour un équilibre entre les partis ( bande passante de l’hébergeur, qualité du média pour le rédacteur et le visiteur, accessibilité pour le visiteur ). Comment régler la qualité de son média ?
    Plus la qualité du média est importante, plus la bande passante sera utilisée. Le visiteur avec une connexion internet à petit débit devra attendre plus longtemps. Inversement plus, la qualité du média est pauvre et donc le média devient dégradé voire (...)

  • Qu’est ce qu’un masque de formulaire

    13 juin 2013, par

    Un masque de formulaire consiste en la personnalisation du formulaire de mise en ligne des médias, rubriques, actualités, éditoriaux et liens vers des sites.
    Chaque formulaire de publication d’objet peut donc être personnalisé.
    Pour accéder à la personnalisation des champs de formulaires, il est nécessaire d’aller dans l’administration de votre MediaSPIP puis de sélectionner "Configuration des masques de formulaires".
    Sélectionnez ensuite le formulaire à modifier en cliquant sur sont type d’objet. (...)

Sur d’autres sites (4741)

  • Multiple custom fonts with AWS lambda not working

    26 août 2022, par Osama Bin Saleem

    I'm using AWS lambda with python and ffmpeg to add textual watermark over images. I added a custom font i.e Quicksand to my lambda function like this :

    


    1- Create a fonts directory in the root of the function and add the font file (.ttf) and a font.conf file with the following contents :

    


    &lt;?xml version="1.0"?>&#xA;&#xA;<fontconfig>&#xA;  <dir>/var/task/fonts/</dir>&#xA;  <cachedir>/tmp/fonts-cache/</cachedir>&#xA;  <config></config>&#xA;</fontconfig>&#xA;

    &#xA;

    2- Added an environment variable like this

    &#xA;

    FONTCONFIG_PATH = "/var/task/fonts"&#xA;

    &#xA;

    It was working fine until I chose to add more fonts. Now when I try to use some font other than the Quicksand e.g Arial, it still uses the Quicksand font. I'm not sure why ? In the CloudWatch Logs I can see it is still trying to access the Quicksand font rather than the Arial one even when the code is right. Any caching issue or something else ?

    &#xA;

    My folder structure :&#xA;enter image description here

    &#xA;

    Cloudwatch logs :

    &#xA;

    [Parsed_drawtext_0 @ 0x70b5bc0] Using "/var/task/fonts/Quicksand.ttf"&#xA;

    &#xA;

    Maybe its a caching issue ? I'm not sure.

    &#xA;

    My ffmpeg code :

    &#xA;

    ffmpeg -i video.mp4 -vf "drawtext=font=‘Quicksand.ttf&#x27;&#xA;:text=&#x27;StackOverflow&#x27;:fontcolor=white:fontsize=24:box=1:boxcolor=black@0.5:boxborderw=5:x=w-mod(max(t-0\,0)*(w&#x2B;tw)/6\,(w&#x2B;tw)):y=(h-text_h)/2" -codec:a copy Newwwtext.mp4&#xA;

    &#xA;

  • ffmpeg - concatenate mp4 files + audio from a folder structure

    17 septembre 2022, par Ionut Bejinariu

    I use this batch file to concatenate several .mp4 files and then join them with an audio song.

    &#xA;

    @echo off&#xA;&#xA;mkdir ".\Export" &#xA;set "sourcedir="  &#xA;set "outputdir=Export" &#xA;&#xA;for %%i in (*.mp4) do echo file &#x27;%%i&#x27;>> lista.txt&#xA;ffmpeg -f concat -safe 0 -i lista.txt -c copy mergedmp4.mp4&#xA;&#xA;for %%F in (*.wav *.mp3) DO ( &#xA;    ffmpeg -i mergedmp4.mp4 -i "%%F" -map 0:v -map 1:a -vcodec copy -c:a aac -b:a 320k "%outputdir%\%%~nF.mp4"&#xA;)&#xA;&#xA;del lista.txt&#xA;del mergedmp4.mp4&#xA;

    &#xA;

    So far so good, It's working

    &#xA;

    I would describe what will help me more and I need to happen :

    &#xA;

    I have this folder structure \Video-15-sec\Canal-1\Videos-1, Videos-2 .. Videos-15 or sometimes can be until Videos-20 or more, depends how I organize them.

    &#xA;

    All of Videos folders have .mp4 files in them and are renamed all the time1.mp4, 2.mp4, 3.mp4 ... 25.mp4 ... 35.mp4 ..etc each of the Videos folders respect the name of file starting with 1.mp4 to how many are in the folder.

    &#xA;

    The directory structure is like this :

    &#xA;

    &#xA;&#xA;──Video-15-sec&#xA;│       ├───Canal-1&#xA;│       │   ├───Videos-1 (.mp4 files in it)&#xA;│       │   ├───Videos-2 (.mp4 files in it)&#xA;│       │   ├───Videos-3 (.mp4 files in it)&#xA;│       │   ├───Videos-4 ...&#xA;│       │   ├───Videos-5&#xA;│       │   ├───Videos-6&#xA;│       │   ├───Videos-7&#xA;│       │   ├───Videos-8&#xA;│       │   ├───Videos-9&#xA;│       │   ├───Videos-10&#xA;│       │   ├───Videos-11&#xA;│       │   ├───Videos-12&#xA;│       │   ├───Videos-13&#xA;│       │   ├───Videos-14&#xA;│       │   └───Videos-15&#xA;│       ├───Canal-2&#xA;│       │   ├───Videos-1 (.mp4 files in it)&#xA;│       │   ├───Videos-2 (.mp4 files in it)&#xA;│       │   ├───Videos-3 (.mp4 files in it)&#xA;│       │   ├───Videos-4 ...&#xA;│       │   ├───Videos-5&#xA;│       │   ├───Videos-6&#xA;│       │   ├───Videos-7&#xA;│       │   ├───Videos-8&#xA;│       │   ├───Videos-9&#xA;│       │   ├───Videos-10&#xA;│       │   ├───Videos-11&#xA;│       │   ├───Videos-12&#xA;│       │   ├───Videos-13&#xA;│       │   ├───Videos-14&#xA;│       │   └───Videos-15&#xA;│       ├───Canal-3&#xA;│       │   ├───Videos-1 (.mp4 files in it)&#xA;│       │   ├───Videos-2 (.mp4 files in it)&#xA;│       │   ├───Videos-3 (.mp4 files in it)&#xA;│       │   ├───Videos-4 ...&#xA;│       │   ├───Videos-5&#xA;│       │   ├───Videos-6&#xA;│       │   ├───Videos-7&#xA;│       │   ├───Videos-8&#xA;│       │   ├───Videos-9&#xA;│       │   ├───Videos-10&#xA;│       │   ├───Videos-11&#xA;│       │   ├───Videos-12&#xA;│       │   ├───Videos-13&#xA;│       │   ├───Videos-14&#xA;│       │   └───Videos-15&#xA;│       ├───Canal-4&#xA;

    &#xA;

    I want to have a separate folder \allmusic where I will have all the music, and the batch file will always export with the name of the song.

    &#xA;

    all the mp4 files of each separate folder Videos-1, Videos-2 ... Videos-10..., will be concatenated separately and then joined with a single song, each separate folder, with one song each. All the songs and Videos folders in loop, until all my songs are done.

    &#xA;

    The video created will be exported in a separate folder \Export-all-Videos

    &#xA;

    Actions of Batch file :

    &#xA;

    ─Video-15-sec&#xA;│       ├───Canal-1&#xA;│       │   ├───Videos-1 (concatenate.mp4 files from) &#x2B; 1 song -> Folder  \Export-all-Videos\name of the song.mp4&#xA;│       │   ├───Videos-2 (concatenate.mp4 files from) &#x2B; 1 song -> Folder  \Export-all-Videos\name of the song.mp4&#xA;│       │   ├───Videos-3 (concatenate.mp4 files from) &#x2B; 1 song -> Folder  \Export-all-Videos\name of the song.mp4&#xA;│       │   ├───Videos-4 ...&#xA;│       │   ├───Videos-5&#xA;│       │   ├───Videos-6&#xA;│       │   ├───Videos-7&#xA;

    &#xA;

    I hope someone has a solution for this.

    &#xA;

    Thank you very much

    &#xA;

  • FFMPEG xfade and acrossfade not working properly when used in combination

    18 octobre 2022, par Khawar Raza

    I am trying to merge videos with transition effects. I am using ffmpeg-kit v5.1 android wrapper which is using ffmpeg v5.1.2 internally. When I use xfade and acrossfade in combination, the output video and audios are out of sync. Sometimes resultant video finishes first and sometimes audio finishes first.

    &#xA;

    Here is the sample command :

    &#xA;

     -i "input1.mp4"    // 1080x1920, 6132 milliseconds,&#xA; -i "input2.mp4"    // 1080x808,  4808 milliseconds&#xA; -i "input3.mp4"    // 1280x720,  5399 milliseconds&#xA; &#xA; -filter_complex " &#xA; &#xA; [0:v] scale=w=1280:h=1920:force_original_aspect_ratio=disable, boxblur=40[blurcanvas0]; &#xA; [0:v] scale=1080.0:1920.0:force_original_aspect_ratio=disable[scaled0]; &#xA; [blurcanvas0][scaled0] overlay=(main_w-overlay_w)*0.5:(main_h-overlay_h)*0.5, settb=AVTB, format=yuv420p,fps=30[part0]; &#xA; &#xA; [1:v] scale=w=1280:h=1920:force_original_aspect_ratio=disable, boxblur=40[blurcanvas1]; &#xA; [1:v] scale=1280.0:957.62964:force_original_aspect_ratio=disable[scaled1]; &#xA; [blurcanvas1][scaled1] overlay=(main_w-overlay_w)*0.5:(main_h-overlay_h)*0.5, settb=AVTB, format=yuv420p,fps=30[part1]; &#xA; &#xA; [2:v] scale=w=1280:h=1920:force_original_aspect_ratio=disable, boxblur=40[blurcanvas2]; &#xA; [2:v] scale=1280.0:720.0:force_original_aspect_ratio=disable[scaled2]; &#xA; [blurcanvas2][scaled2] overlay=(main_w-overlay_w)*0.5:(main_h-overlay_h)*0.5, settb=AVTB, format=yuv420p,fps=30[part2];  &#xA; &#xA; [part0][part1] xfade=transition=smoothleft:duration=2:offset=5.132[transition0]; &#xA; [transition0][part2] xfade=transition=smoothleft:duration=2:offset=8.940001[transition1];    &#xA; &#xA; [0:a][1:a]acrossfade=d=2[afade0];&#xA; [afade0][2:a]acrossfade=d=2[afade1] " &#xA; &#xA; -vsync passthrough -c:v libx264 -pix_fmt yuv420p &#xA; -map [transition1] -map [afade1] -preset ultrafast  "output.mp4"&#xA;

    &#xA;

    Basically, the script takes videos of different resolutions and formats, scales them to the maximum size respecting the aspect ratio, adds a blurred background to extra space, and then joins the individual parts using a transition effect. Then audios are joined using acrossfade filter with the same transition duration as used in videos.

    &#xA;

    As per xfade requirements, script is converting videos to the same resolution and format yuv420p, changing fps to 30, and setting the timebase using settb=AVTB. All the requirements are met but the resultant video and audio are not synced. Any hint what is the missing part here ?

    &#xA;

    Edit :

    &#xA;

    As per @kesh reply, here is the updated command which has no impact :

    &#xA;

    -i "input1.mp4" -i "input2.mp4" -i "input3.mp4" -filter_complex " &#xA;&#xA;[0:v]scale=w=1280:h=1920:force_original_aspect_ratio=disable, boxblur=40[canvas0]; &#xA;[0:v] scale=1080.0:1920.0:force_original_aspect_ratio=disable[scaled0]; &#xA;[canvas0][scaled0] overlay=(main_w-overlay_w)*0.5:(main_h-overlay_h)*0.5, settb=AVTB, format=yuv420p,fps=30[overlay0];&#xA;&#xA;[1:v]scale=w=1280:h=1920:force_original_aspect_ratio=disable, boxblur=40[canvas1]; &#xA;[1:v] scale=1280.0:957.62964:force_original_aspect_ratio=disable[scaled1]; &#xA;[canvas1][scaled1] overlay=(main_w-overlay_w)*0.5:(main_h-overlay_h)*0.5, settb=AVTB, format=yuv420p,fps=30[overlay1];&#xA;&#xA;[2:v]scale=w=1280:h=1920:force_original_aspect_ratio=disable, boxblur=40[canvas2]; &#xA;[2:v] scale=1280.0:720.0:force_original_aspect_ratio=disable[scaled2]; &#xA;[canvas2][scaled2] overlay=(main_w-overlay_w)*0.5:(main_h-overlay_h)*0.5, settb=AVTB, format=yuv420p,fps=30[overlay2];  &#xA;&#xA;[overlay0][overlay1] xfade=transition=smoothleft:duration=2:offset=5.132[transition0]; &#xA;[transition0][overlay2] xfade=transition=smoothleft:duration=2:offset=8.940001[transition1];&#xA;&#xA;[0:a]asettb=AVTB[audio0]; &#xA;[1:a]asettb=AVTB[audio1]; &#xA;[2:a]asettb=AVTB[audio2];    &#xA;[audio0][audio1]acrossfade=d=2[afade0]; &#xA;[afade0][audio2]acrossfade=d=2[afade1]"&#xA;&#xA;-vsync passthrough -c:v libx264 -pix_fmt yuv420p -map [transition1] -map [afade1] -preset ultrafast  "output.mp4"&#xA;

    &#xA;