Recherche avancée

Médias (91)

Autres articles (66)

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

  • 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

  • Organiser par catégorie

    17 mai 2013, par

    Dans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
    Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
    Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...)

Sur d’autres sites (5219)

  • Ffmpeg burnt in subtitles out of sync when converting to hls

    19 mai 2020, par user1503606

    I have a file that has subtitles burn into it and they are perfectly in sync.

    



    Here is the file. https://983yqbz442.s3.amazonaws.com/little-mermaid-captions.mp4

    



    I run this command to convert to hls and it creates the .ts files and the .vtt files.

    



    ffmpeg -i little-mermaid-captions.mp4 -profile:v baseline -level 3.0 -s 640x360 -start_number 0 -hls_time 10 -hls_list_size 0 -f hls index.m3u8


    



    I also then create a master.m3u8 file in the same folder with the following.

    



    #EXTM3U
#EXT-X-VERSION:3
#EXT-X-INDEPENDENT-SEGMENTS
#EXT-X-STREAM-INF:BANDWIDTH=800000,RESOLUTION=640x360,SUBTITLES="subtitles"
index.m3u8
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subtitles",NAME="English",DEFAULT=YES,AUTOSELECT=YES,FORCED=NO,LANGUAGE="ENG",URI="index_vtt.m3u8"


    



    Now if I play the master.m3u8 file the subtitles are now out of sync and are about 1 sec to quick. I understand this is probably a setting I am missing through FFmpeg but really stuck on this and would appreciate any insight.

    



    Thanks

    



    More info.

    



    Here is a link to the direct .m3u8 this can be opened in Safari.

    



    https://983yqbz442.s3.amazonaws.com/hlstests/master.m3u8

    



    The generated vtt file is here.

    



    https://983yqbz442.s3.amazonaws.com/hlstests/subs-0.vtt

    



    If you look at the start of the .vtt file you will see this.

    



    WEBVTT

00:06.840 --> 00:10.320
once long ago in the deep blue below


    



    It should start at 00:06.840 but when playing the .m3u8 file in Safari you should see it starts at around 5 seconds not 6 about a second too early.

    


  • ffmpeg padding doesn't scale when changing resolution

    5 mars 2023, par Martin

    I have a ffmpeg command which takes a bunch of audio files, 3 image files, and renders a video with them.

    


    Image Input Dimmensions :

    


      

    • 1_front.jpg 600w x 593h
    • 


    • 2_back.jpg 600w x 466h
    • 


    • 3_cd.jpg 600w x 598h
    • 


    


    The video has a resolution of w=600 h=593, which is the resolution of the first img.

    


    Here's the full command

    


    ffmpeg
 -r 2 -i "E:\filepath\10. Deejay Punk-Roc - Knock 'em All The Way Out.aiff"
 -r 2 -i "E:\filepath\11. Deejay Punk-Roc - Spring Break.aiff" -r 2 -i "E:\filepath\12. Deejay Punk-Roc - Fat Gold Chain.aiff" 
 -r 2 -i "E:\filepath\1_front.jpg" -r 2 -i "E:\filepath\2_back.jpg" -r 2 -i "E:\filepath\3_cd.jpg" 
 
 -filter_complex 
 "
 [0:a][1:a][2:a]concat=n=3:v=0:a=1[a]; 
 
 [3:v]scale=w=600:h=593,setsar=1,loop=580.03:580.03[v3]; 

 [4:v]pad=600:593:0:63:color=pink,setsar=1,loop=580.03:580.03[v4];
 
 [5:v]scale=w=600:h=593,setsar=1,loop=580.03:580.03[v5];
 
 [v3][v4][v5]concat=n=3:v=1:a=0,pad=ceil(iw/2)*2:ceil(ih/2)*2[v]"
 
  -map "[v]" -map "[a]" -c:a pcm_s32le -c:v libx264 -bufsize 3M -crf 18 -pix_fmt yuv420p -tune stillimage -t 870.04 
  "E:\filepath\vidOutPutCorrect.mkv"



    


    For filter_complex this second part will add padding to the second image so that it does not get stretched or cropped.

    


    [4:v]pad=600:593:0:63:color=pink,setsar=1,loop=580.03:580.03[v4];


    


    Specifically this part

    


    pad=600:593:0:63:color=pink


    


    Which I understand means w=600 and h=593, but i dont know that the last part 0:63 means.

    


    You can see the output has the pink padding correctly
enter image description here

    


    but i want to render the video with a resolution of w=1920 h=1898 instead of w=600 h=593.

    


    So i update the command to have this new resolution :

    


    ffmpeg -r 2 -i "E:\filepath\10. Deejay Punk-Roc - Knock 'em All The Way Out.aiff" -r 2 -i "E:\filepath\11. Deejay Punk-Roc - Spring Break.aiff" -r 2 -i "E:\filepath\12. Deejay Punk-Roc - Fat Gold Chain.aiff" -r 2 -i "E:\filepath\1_front.jpg" -r 2 -i "E:\filepath\2_back.jpg" -r 2 -i "E:\filepath\3_cd.jpg" 

-filter_complex "
[0:a][1:a][2:a]concat=n=3:v=0:a=1[a];

[3:v]scale=w=1920:h=1898,setsar=1,loop=580.03:580.03[v3];

[4:v]pad=1920:1898:0:63:color=pink,setsar=1,loop=580.03:580.03[v4];

[5:v]scale=w=1920:h=1898,setsar=1,loop=580.03:580.03[v5];

[v3][v4][v5]concat=n=3:v=1:a=0,pad=ceil(iw/2)*2:ceil(ih/2)*2[v]"

 -map "[v]" -map "[a]" -c:a pcm_s32le -c:v libx264 -bufsize 3M -crf 18 -pix_fmt yuv420p -tune stillimage -t 870.04 "E:\filepath\slidet.mkv"


    


    my video does in fact now have a resolution of 1920x1798 which is great, but the 2nd image padding portion has the image super small and in a corner

    


    enter image description here

    


    So this line works :

    


    pad=600:593:0:63:color=pink


    


    but with a different resolution is looks bad with the image in the top left corner

    


    pad=1920:1898:0:63:color=pink


    


    What do I need to change 0:63 to in order to have the image be centered ?

    


    Download files : http://www.mediafire.com/folder/e8ja1n8elszk1lu,dxw4vglrz7polyh,ojjx6kcqruksv5r,lah9rano4svj46o,q5jg0083vbj9y1p,d3pt8ydf3ulqm5m/shared

    


  • How can I merge these 2 FFmpeg commands ?

    7 juin 2019, par WebDev

    I have two commands which are part of a larger set of commands. Basically I need to merge these two into one command to speed things up.

    ffmpeg -y -f concat -safe 0 -protocol_whitelist "file,http,https,tcp,tls" -i "photos.txt" -i "mainscreen.png" -i "audio.mp3" -filter_complex "scale=3840x2160,zoompan=z='if(lte(zoom,1.0),1.2,max(1.001,zoom-0.0015))':x='iw/2-(iw/zoom/2)':y='ih/2-(ih/zoom/2)':s=1280x720:fps=15:d=120, overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2, drawtext=fontfile=font.otf:text='%%~ni':fontcolor=black:fontsize=32:x=90:y=582" -preset veryfast -tune stillimage -shortest -pix_fmt yuv420p "slideshow.mp4"

    ffmpeg -y -i "slideshow.mp4" -filter_complex "[0:a]showwaves=mode=cline:s=110x36:r=15:scale=sqrt:colors=0x222222,colorkey=0x000000:0.01:0.1,format=yuva420p[v];[0:v][v]overlay=77:444,scale=1280:720[outv]" -map "[outv]" -map 0:a -preset veryfast "done.mp4"

    Firstly creates a slideshow and adds text, then draws a showwaves effect onto the video.

    Update

    From Gyan’s response, and after tinkering for a while, it kind of works how I needed it to. It does what I wanted, but keeps throwing "depreciated pixel format" error. Here’s the updated command once I finished. What is the problem, and is the command written properly ?

    ffmpeg -y -f concat -safe 0 -protocol_whitelist "file,http,https,tcp,tls" -i "images.txt" -i "screen.png" -i "audio.mp3" -filter_complex "scale=3840x2160,zoompan=z='if(lte(zoom,1.0),1.2,max(1.001,zoom-0.0015))':x='iw/2-(iw/zoom/2)':y='ih/2-(ih/zoom/2)':s=1280x720:fps=15:d=120, overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2, drawtext=fontfile=Assets/Fonts/font.otf:text='%%~ni':fontcolor=black:fontsize=32:x=90:y=582[v];[2:a]showwaves=mode=cline:s=110x36:r=15:scale=sqrt:colors=0x222222,colorkey=0x000000:0.01:0.1,format=yuva420p[w];[v][w]overlay=77:444,scale=1280:720[outv]" -map "[outv]" -map 2:a -c:v libx264 -c:a aac -preset veryfast -shortest -pix_fmt yuv420p "done.mp4"

    Second update

    Thanks to Gyan for helping me better understand the command. Here is the final code which does what I need :

    ffmpeg -y -f concat -safe 0 -protocol_whitelist "file,http,https,tcp,tls" -i "images.txt" -i "screen.png" -i "tmp.audio.mp3" -filter_complex "[0]scale=3840x2160,zoompan=z='if(lte(zoom,1.0),1.2,max(1.001,zoom-0.0015))':x='iw/2-(iw/zoom/2)':y='ih/2-(ih/zoom/2)':s=1280x720:fps=15:d=120, overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2, drawtext=fontfile=font.otf:text='%%~ni':fontcolor=black:fontsize=32:x=90:y=582[v];[2:a]showwaves=mode=cline:s=110x36:r=15:scale=sqrt:colors=0x222222,colorkey=0x000000:0.01:0.1,format=yuva420p[w];[v][w]overlay=77:444,scale=1280:720[outv]" -map "[outv]" -map 2:a -preset veryfast -shortest -pix_fmt yuv420p "done.mp4"

    Only change from Gyan’s code is I removed [p] ;[1][p] and replaced with a comma to achieve what I needed. Seems to work perfect now, ignoring the depreciated pixels warning.