Recherche avancée

Médias (2)

Mot : - Tags -/documentation

Autres articles (111)

  • 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 (...)

  • Automated installation script of MediaSPIP

    25 avril 2011, par

    To overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
    You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
    The documentation of the use of this installation script is available here.
    The code of this (...)

  • Que fait exactement ce script ?

    18 janvier 2011, par

    Ce script est écrit en bash. Il est donc facilement utilisable sur n’importe quel serveur.
    Il n’est compatible qu’avec une liste de distributions précises (voir Liste des distributions compatibles).
    Installation de dépendances de MediaSPIP
    Son rôle principal est d’installer l’ensemble des dépendances logicielles nécessaires coté serveur à savoir :
    Les outils de base pour pouvoir installer le reste des dépendances Les outils de développements : build-essential (via APT depuis les dépôts officiels) ; (...)

Sur d’autres sites (10089)

  • FFmpeg image2pipe write buffer wait until done

    20 décembre 2020, par Michael Joseph Aubry

    I'm extracting frames from an external source and passing it in as a buffer to FFMPEG using image2pipe and -i -

    


    const childProcess = spawn(ffmpeg, [
  "-y",
  "-f",
  "image2pipe",
  "-i",
  "-",
  "-vcodec",
  "libx264",
  "-pix_fmt",
  "yuv420p",
  output
]);


    


    Then I have a loop that does the job.

    


    for (let i = 0; i < 250; i++) {
  // ...await
}


    


    Inside the promise

    


    // ... do the job to get buffer

childProcess.stdin.write(frame); // frame === buffer

// frame done
resolve("success!");


    


    The problem is in some videos the frames jump and is janky. This is because FFmpeg is not fully done writing to the file before moving onto the next frame.

    


    Is there a way to write a buffer to a file through FFmpeg and make sure the frame is done writing before moving on ?

    


    Some more information

    


    Here is the source file https://s3.us-west-2.amazonaws.com/storycreator.v2.uploads/ckigi4kro00160vlfjmt74afp

    


    Here is the rendered file https://s3.us-west-2.amazonaws.com/storycreator.testing/607715f0-3ab9-11eb-a139-3bb84618c6c5.mp4?t=1607585343922

    


    Here are logs

    


    2020-12-10T07:28:48.942Z    0ae0c435-54d3-416f-9d1a-8ddf595a7e83    INFO    frame=  130 fps= 16 q=-1.0 Lsize=      83kB time=00:00:05.08 bitrate= 133.6kbits/s speed=0.641x    video:80kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 2.928688%


    


    2020-12-10T07:28:48.942Z    0ae0c435-54d3-416f-9d1a-8ddf595a7e83    INFO    [libx264 @ 0x640d6c0] frame I:1     Avg QP:15.47  size: 68227[libx264 @ 0x640d6c0] frame P:33    Avg QP:15.07  size:   246[libx264 @ 0x640d6c0] frame B:96    Avg QP:18.75  size:    56[libx264 @ 0x640d6c0] consecutive B-frames:  1.5%  0.0%  0.0% 98.5%


    


    2020-12-10T07:28:48.943Z    0ae0c435-54d3-416f-9d1a-8ddf595a7e83    INFO    [libx264 @ 0x640d6c0] mb I  I16..4: 24.6% 60.5% 14.9%[libx264 @ 0x640d6c0] mb P  I16..4:  0.0%  0.2%  0.0%  P16..4:  0.8%  0.0%  0.0%  0.0%  0.0%    skip:98.9%[libx264 @ 0x640d6c0] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8:  0.3%  0.0%  0.0%  direct: 0.0%  skip:99.7%  L0:26.7% L1:73.3% BI: 0.0%[libx264 @ 0x640d6c0] 8x8 transform intra:62.0% inter:83.6%[libx264 @ 0x640d6c0] coded y,uvDC,uvAC intra: 49.2% 44.3% 32.1% inter: 0.0% 0.2% 0.0%[libx264 @ 0x640d6c0] i16 v,h,dc,p: 53% 38%  7%  2%[libx264 @ 0x640d6c0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 26% 24% 29%  3%  3%  3%  5%  3%  4%[libx264 @ 0x640d6c0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 37% 26% 14%  3%  4%  5%  4%  4%  3%[libx264 @ 0x640d6c0] i8c dc,h,v,p: 57% 27% 13%  3%[libx264 @ 0x640d6c0] Weighted P-Frames: Y:0.0% UV:0.0%[libx264 @ 0x640d6c0] ref P L0: 95.1%  1.2%  3.1%  0.6%[libx264 @ 0x640d6c0] ref B L0: 48.1% 51.3%  0.7%[libx264 @ 0x640d6c0] ref B L1: 97.3%  2.7%[libx264 @ 0x640d6c0] kb/s:125.75


    


    2020-12-10T07:28:48.944Z    0ae0c435-54d3-416f-9d1a-8ddf595a7e83    INFO    [cache @ 0x5f57940] Statistics, cache hits:0 cache misses:3551


    


  • Sound is lost when concatenate several videos with ffmpeg

    18 août 2020, par Yevhenii Molodtsov

    I have a python script that generates an FFmpeg command and then runs it with shell.
Everything is going okay (the videos are concatenated, the needed cross-dissolve effect is also great), but there are two problems I am trying to fix :

    


      

    1. The output loses the sound.
    2. 


    3. The output is frizzing a little bit (it seems like there are about 10 fps).
    4. 


    


    The example of command generatede by the script is here :

    


    ffmpeg -i /tmp/media/import-2020-Aug-18-Tuesday-08-31-10/temp_8ce3c8ac-
1379-4a16-b141-ebdc910e1142.mp4 -i /tmp/media/import-2020-Aug-18-
Tuesday-08-31-10/temp_d9f60ffb-0a83-4052-8ebb-620a574d1871.mp4 -i 
/tmp/media/import-2020-Aug-18-Tuesday-08-31-10/temp_93934eaa-9589-4736-
8d11-fd8c1bdf0b92.mp4  -filter_complex "
[0:v]trim=start=0:end=4.038,setpts=PTS-STARTPTS[clip0];
[1:v]trim=start=2:end=4.038,setpts=PTS-STARTPTS[clip1];
[2:v]trim=start=2,setpts=PTS-STARTPTS[clip2];
[0:v]trim=start=5.038:end=6.038,setpts=PTS-STARTPTS[out0];
[1:v]trim=start=5.038:end=6.038,setpts=PTS-STARTPTS[out1];
[1:v]trim=start=0:end=2,setpts=PTS-STARTPTS[in1];
[2:v]trim=start=0:end=2,setpts=PTS-STARTPTS[in2];
[in1]format=pix_fmts=yuva420p,fade=t=in:st=0:d=2:alpha=1[fadein1];
[in2]format=pix_fmts=yuva420p,fade=t=in:st=0:d=2:alpha=1[fadein2];
[out0]format=pix_fmts=yuva420p,fade=t=out:st=0:d=2:alpha=1[fadeout0];
[out1]format=pix_fmts=yuva420p,fade=t=out:st=0:d=2:alpha=1[fadeout1];
[fadein1]fifo[fadein1fifo];[fadein2]fifo[fadein2fifo];
[fadeout0]fifo[fadeout0fifo];[fadeout1]fifo[fadeout1fifo];[fadeout0fifo]
[fadein1fifo]overlay[crossfade0];[fadeout1fifo]
[fadein2fifo]overlay[crossfade1];[clip0][crossfade0][clip1][crossfade1]
[clip2]concat=n=5[output]" -map "[output]" 
/tmp/media/final/some_filename_c8e898b2-e3f7-4656-b3b9-1e8fb93cd75c.mp4


    


    I would much appreciate any help because I am new to this tool and here I got stuck.

    


  • Getting "Buffer queue overflow, dropping" while concatenation in ffmpeg

    19 août 2020, par Yevhenii Molodtsov

    I have a python script that generates the FFmpeg command to concatenate the video clips.
Here is the script :

    


            ffmpeg 
        -i /tmp/media/import-2020-Aug-19-Wednesday-08-08-26/temp_eba59811-bb5c-4e36-aa7d-b1731e70432c.mp4 
        -i /tmp/media/import-2020-Aug-19-Wednesday-08-08-26/temp_2a6d7907-7cad-4f38-ae82-4b475546d3e0.mp4 
        -i /tmp/media/import-2020-Aug-19-Wednesday-08-08-26/temp_d7371ecb-01df-4199-951f-336fa475998f.mp4 
        -i /tmp/media/import-2020-Aug-19-Wednesday-08-08-26/temp_cc5de0f1-84b4-47bc-b390-45b5f8711914.mp4 
        -i /tmp/media/import-2020-Aug-19-Wednesday-08-08-26/temp_bf796e0d-135f-40fd-ab8e-4780da6973fd.mp4  
        -filter_complex 
        "[0:v]trim=start=0:end=8.032,setpts=PTS-STARTPTS[clip0];
        [1:v]trim=start=2:end=13.047,setpts=PTS-STARTPTS[clip1];
        [2:v]trim=start=2:end=13.558,setpts=PTS-STARTPTS[clip2];
        [3:v]trim=start=2:end=13.186,setpts=PTS-STARTPTS[clip3];
        [4:v]trim=start=2,setpts=PTS-STARTPTS[clip4];
        [0:v]trim=start=9.032:end=10.032,setpts=PTS-STARTPTS[out0];
        [1:v]trim=start=14.047:end=15.047,setpts=PTS-STARTPTS[out1];
        [2:v]trim=start=14.558:end=15.558,setpts=PTS-STARTPTS[out2];
        [3:v]trim=start=14.186:end=15.186,setpts=PTS-STARTPTS[out3];
        [1:v]trim=start=0:end=2,setpts=PTS-STARTPTS[in1];
        [2:v]trim=start=0:end=2,setpts=PTS-STARTPTS[in2];
        [3:v]trim=start=0:end=2,setpts=PTS-STARTPTS[in3];
        [4:v]trim=start=0:end=2,setpts=PTS-STARTPTS[in4];
        [in1]format=pix_fmts=yuva420p,fade=t=in:st=0:d=2:alpha=1[fadein1];
        [in2]format=pix_fmts=yuva420p,fade=t=in:st=0:d=2:alpha=1[fadein2];
        [in3]format=pix_fmts=yuva420p,fade=t=in:st=0:d=2:alpha=1[fadein3];
        [in4]format=pix_fmts=yuva420p,fade=t=in:st=0:d=2:alpha=1[fadein4];
        [out0]format=pix_fmts=yuva420p,fade=t=out:st=0:d=2:alpha=1[fadeout0];
        [out1]format=pix_fmts=yuva420p,fade=t=out:st=0:d=2:alpha=1[fadeout1];
        [out2]format=pix_fmts=yuva420p,fade=t=out:st=0:d=2:alpha=1[fadeout2];
        [out3]format=pix_fmts=yuva420p,fade=t=out:st=0:d=2:alpha=1[fadeout3];
        [fadein1]fifo[fadein1fifo];
        [fadein2]fifo[fadein2fifo];
        [fadein3]fifo[fadein3fifo];
        [fadein4]fifo[fadein4fifo];
        [fadeout0]fifo[fadeout0fifo];
        [fadeout1]fifo[fadeout1fifo];
        [fadeout2]fifo[fadeout2fifo];
        [fadeout3]fifo[fadeout3fifo];
        [fadeout0fifo][fadein1fifo]overlay[crossfade0];
        [fadeout1fifo][fadein2fifo]overlay[crossfade1];
        [fadeout2fifo][fadein3fifo]overlay[crossfade2];
        [fadeout3fifo][fadein4fifo]overlay[crossfade3];
        [clip0][crossfade0][clip1][crossfade1][clip2][crossfade2][clip3][crossfade3][clip4]concat=n=9[output];
         [0:a][1:a]acrossfade=d=10:c1=tri:c2=tri[A1];
         [A1][2:a]acrossfade=d=10:c1=tri:c2=tri[A2];
         [A2][3:a]acrossfade=d=10:c1=tri:c2=tri[A3];
         [A3][4:a]acrossfade=d=10:c1=tri:c2=tri[audio] " -map "[output]" -map "[audio]" /tmp/media/final/some_filename_587463a2-e3ca-436a-874b-a72e295e46ac.mp4


    


    But I get the following error : Buffer queue overflow, dropping.
I read that to solve this I need to use fifo, but I can't figure out where should I place it. I addition, it seems like fifo works only with video streams.
I would much appreciate any help !