Recherche avancée

Médias (16)

Mot : - Tags -/mp3

Autres articles (105)

  • La sauvegarde automatique de canaux SPIP

    1er avril 2010, par

    Dans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
    Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)

  • Script d’installation automatique de MediaSPIP

    25 avril 2011, par

    Afin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
    Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
    La documentation de l’utilisation du script d’installation (...)

  • Utilisation et configuration du script

    19 janvier 2011, par

    Informations spécifiques à la distribution Debian
    Si vous utilisez cette distribution, vous devrez activer les dépôts "debian-multimedia" comme expliqué ici :
    Depuis la version 0.3.1 du script, le dépôt peut être automatiquement activé à la suite d’une question.
    Récupération du script
    Le script d’installation peut être récupéré de deux manières différentes.
    Via svn en utilisant la commande pour récupérer le code source à jour :
    svn co (...)

Sur d’autres sites (10412)

  • FFmpeg producing a flickering video from images

    21 juin 2018, par jjohnn91

    So I’m trying to make a video of a fractal rotating through some values, much like seen here.

    I generate the frames (1000 of them) using a different program written in Java that works just fine, so for the purposes of this scenario assume that all the images are in the target folder and also in numerical order as they need to appear in the video.

    I found the following code on the web to stitch images into a video, and I haven’t the faintest idea how it works, and when I run it, all of the images are indeed stitched into a video and placed on the desktop, but the video appears to have one specific frame just jump in at random positions. I’m not totally sure which one, but its one of the earlier frames, somewhere between 1 and 200 of the 1000.

    I’ve also tested making two half videos, one using the first 500 frames, and the other using the second 500 frames. The first video (1 -> 500) has flickering, and the second video (501 -> 1000) appears not to have flickering to my observations.

    I am seeking help in fixing the flickering behavior, and I will upload the video file to google drive later if asked. The Images are all 1920x1080, and in proper numerical order.

    Thanks in advance !

    import static org.bytedeco.javacpp.opencv_imgcodecs.*;
    import java.io.File;
    import org.bytedeco.javacpp.avcodec;
    import org.bytedeco.javacv.FFmpegFrameRecorder;
    import org.bytedeco.javacv.OpenCVFrameConverter;
    public class ImageToMovie{
       public static void main(String []args){
           String imgPath="C:\\Users\\John\\Images";
           String vidPath="C:\\Users\\John\\Desktop\\video.mp4";
           String[] links=new String[new File(imgPath).listFiles().length];
           File f=new File(imgPath);
           File[] f2=f.listFiles();
           for(int i=0;icode>
  • How do I compose three overlapping videos w/audio in ffmpeg ?

    10 avril 2021, par Idan Gazit

    I have three videos : let's call them intro, recording and outro. My ultimate goal is to stitch them together like so :

    


    enter image description here

    


    Both intro and outro have alpha (prores 4444) and a "wipe" to transition, so when overlaying, they must be on top of the recording. The recording is h264, and ultimately I'm encoding out for youtube with these recommended settings.

    


    I've figured out how to make the thing work correctly for intro + recording :

    


    $ ffmpeg \
  -i intro.mov \
  -i recording.mp4 \
  -filter_complex \
  "[1:v]tpad=start_duration=10:start_mode=add:color=black[rv]; \
   [1:a]adelay=delays=10s:all=1[ra]; \
   [rv][0:v]overlay[v];[0:a][ra]amix[a]" \
  -map "[a]" -map "[v]" \
  -movflags faststart -c:v libx264 -profile:v high -bf 2 -g 30 -crf 18 -pix_fmt yuv420p \
  out.mp4 -y


    


    However I can't use the tpad trick for the outro because it would render black frames over everything.

    


    I've tried various iterations with setpts/asetpts as well as passing -itsoffset for the input, but haven't come up with a solution that works correctly for both video and audio. This tries to start the outro at 16 seconds into the recording (10s start + 16s of recording is how I got to setpts=PTS+26/TB). del, but doesn't work correctly, I get both intro and outro audio from the first frame, and the recording audio cuts out when the outro overlay begins :

    


    $ ffmpeg \
  -i intro.mov \
  -i recording.mp4 \
  -i outro.mov \
  -filter_complex \
  "[1:v]tpad=start_duration=10:start_mode=add:color=black[rv]; \
   [1:a]adelay=delays=10s:all=1[ra]; \
   [2:v]setpts=PTS+26/TB[outv]; \
   [2:a]asetpts=PTS+26/TB[outa]; \
   [rv][0:v]overlay[v4]; \
   [0:a][ra]amix[a4]; \
   [v4][outv]overlay[v]; \
   [a4][outa]amix[a]" \
  -map "[a]" -map "[v]" \
  -movflags faststart -c:v libx264 -profile:v high -bf 2 -g 30 -crf 18 -pix_fmt yuv420p \
  out.mp4 -y


    


    I think the right solution lies in the direction of using setpts correctly but I haven't been able to wrap my brain fully around it. Or, maybe I'm making life complicated and there's an easier approach ?

    


    In the nice-to-have realm, I'd love to be able to specify the start of the outro relative to the end of the recording. I will be doing this to a bunch of recordings of varying lengths. It would be nice to have one command to invoke on everything rather than figuring out a specific timestamp for each one.

    


    Thank you !

    


  • Why is ffmpeg choking on this particular PNG file ?

    13 novembre 2022, par kohloth

    I'm trying to make a video out of 4 still images with ffmpeg.

    


    This is the command I am having trouble with getting working at the moment :

    


    ffmpeg -y -loop 1 -framerate 24 -t 3 \
-i ./images/title-card.png -loop 1 -framerate 24 -t 4 \
-i ./images/001.png -loop 1 -framerate 24 -t 4 \
-i ./images/002.png -loop 1 -framerate 24 -t 3 \
-i ./images/003.png -loop 1 -framerate 24 -t 4 \
-filter_complex "[0][1][2][3]concat=n=4:v=1:a=0" \
/tmp/silentVideoTest.mp4


    


    Unfortunately, I get this error :

    


    [Parsed_concat_0 @ 0x5603df1c4080] Input link in1:v0 parameters (size 1024x1024, SAR 0:1) do not match the corresponding output link in0:v0 parameters (1024x1024, SAR 3937:3937)
[Parsed_concat_0 @ 0x5603df1c4080] Failed to configure output pad on Parsed_concat_0
Error reinitializing filters!
Failed to inject frame into filter network: Invalid argument
Error while processing the decoded data for stream #3:0


    


    I have no idea what this error means. But if I use a different png for the first image, it works fine. I understand that there is something about the first png that ffmpeg does not like ; the SAR, which I believe is some kind of png metadata bit or something ?

    


    Problem is :

    


      

    • The error is confusing to me
    • 


    • I see no option to set the SAR when exporting images from Krita, Pinta, or Photopea.
    • 


    • I do not know how to view the SAR value of an image, so I can't verify that this is really the problem
    • 


    


    Also, whats more is, I've used this command in the past to change an image's SAR (I think) but it seems to only work half the time ?

    


    ffmpeg -i title-card.png -vf setsar=1 title-card-new-sar.png


    


    No idea what the value of setsar should be, so I am using 1.

    


    Would love if someone could tell me how to get it to work. In particular, how do I view the SAR of a PNG file ?

    


    Maybe I am naieve, but shouldn't ffmpeg just be able to accept png images that are the same dimensions, compression, and stitch em together without errors ? i.e. Is there an option just to say "Fix the SAR ?" or "Use the SAR of the first image for all images ?"

    



    


    Edit : Trying it on some different images, having set the SAR with ffmpeg -i ./card.png -vf setsar=1 ./card-new-sar.png, I get a similar error :

    


    [Parsed_concat_0 @ 0x55e7b6b8b640] Input link in2:v0 parameters (size 1024x1024, SAR 2834:2834) do not match the corresponding output link in0:v0 parameters (1024x1024, SAR 1:1)
[Parsed_concat_0 @ 0x55e7b6b8b640] Failed to configure output pad on Parsed_concat_0
Error reinitializing filters!
Failed to inject frame into filter network: Invalid argument
Error while processing the decoded data for stream #26:0


    


    ffmpeg still seems to complain that the SARs don't match...but surely, as its a ratio, a SAR of 2834:2834 does match a SAR of 1:1 ?

    



    


    Edit : Tried setting the SAR with ffmpeg -i ./card.png -vf setsar=2834:2834 ./card-new-sar.png, but now the error is (size 1024x1024, SAR 0:1) do not match the corresponding output link in0:v0 parameters (1024x1024, SAR 2834:2834).