Recherche avancée

Médias (3)

Mot : - Tags -/Valkaama

Autres articles (65)

  • Mise à jour de la version 0.1 vers 0.2

    24 juin 2013, par

    Explications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
    Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Dépôt de média et thèmes par FTP

    31 mai 2013, par

    L’outil MédiaSPIP traite aussi les média transférés par la voie FTP. Si vous préférez déposer par cette voie, récupérez les identifiants d’accès vers votre site MédiaSPIP et utilisez votre client FTP favori.
    Vous trouverez dès le départ les dossiers suivants dans votre espace FTP : config/ : dossier de configuration du site IMG/ : dossier des média déjà traités et en ligne sur le site local/ : répertoire cache du site web themes/ : les thèmes ou les feuilles de style personnalisées tmp/ : dossier de travail (...)

Sur d’autres sites (12690)

  • Why does ffmpeg hang indefinitely when composing videos ?

    11 octobre 2022, par Brendan Hill

    I am executing ffmpeg commands in a Java microservice (which runs dockerised in kubernetes in a temporary pod created by KEDA from an Amazon SQS queue... but unlikely to be relevant).

    


    About 30% of the time, the ffmpeg process hangs indefinitely :

    


    
/usr/local/bin/ffmpeg 
     -i /tmp/transcode-3b928f5f-3cd9-4cd6-9175-b7c1621aa7ce13592236077853079159/person1.mkv 
     -i /tmp/transcode-3b928f5f-3cd9-4cd6-9175-b7c1621aa7ce13592236077853079159/person2.mkv
     -filter_complex [0:v][1:v]hstack=inputs=2[v];[0:a]aresample=async=1000[0sync];[1:a]aresample=async=1000[1sync];[0sync][1sync]amix[a] 
     -map [v] 
     -map [a] 
     -c:v libx264 
     -crf 18 
     -ac 2 
     -vsync 1 
     -r 25 
     -shortest /tmp/transcode-3b928f5f-3cd9-4cd6-9175-b7c1621aa7ce13592236077853079159/composed.mp4



    


    This causes the Java code to wait indefinitely :

    


    
        Process proc = Runtime.getRuntime().exec(cmd);

        StreamConsumer outConsumer = new StreamConsumer(proc.getInputStream(), stdout);
        StreamConsumer errConsumer = new StreamConsumer(proc.getErrorStream(), stderr);

        // execute data read/write in separate threads
        outExecutor.submit(outConsumer);
        errorExecutor.submit(errConsumer);

        proc.waitFor() // Hangs indefinitely, with ~30% probability



    


    It is not specifically about the video files because they generally work on retry (with similar 30% failure probability so sometimes several retries are necessary). Of course, since it hangs indefinitely instead of exiting with failure, it has to wait hours before we risk another retry.

    


      

    1. Why is ffmpeg hanging indefinitely and how to fix ?

      


    2. 


    3. Can I get ffmpeg to fail early instead of hanging indefinitely (so I can trigger retry immediately) ?

      


    4. 


    5. I see many questions and posts about ffmpeg hanging indefinitely. Is ffmpeg inherently unstable ?

      


    6. 


    


  • swscale/aarch64 : add hscale specializations

    26 mai 2022, par Swinney, Jonathan
    swscale/aarch64 : add hscale specializations
    

    This patch adds code to support specializations of the hscale function
    and adds a specialization for filterSize == 4.

    ff_hscale8to15_4_neon is a complete rewrite. Since the main bottleneck
    here is loading the data from src, this data is loaded a whole block
    ahead and stored back to the stack to be loaded again with ld4. This
    arranges the data for most efficient use of the vector instructions and
    removes the need for completion adds at the end. The number of
    iterations of the C per iteration of the assembly is increased from 4 to
    8, but because of the prefetching, there must be a special section
    without prefetching when dstW < 16.

    This improves speed on Graviton 2 (Neoverse N1) dramatically in the case
    where previously fs=8 would have been required.

    before : hscale_8_to_15__fs_8_dstW_512_neon : 1962.8
    after : hscale_8_to_15__fs_4_dstW_512_neon : 1220.9

    Signed-off-by : Jonathan Swinney <jswinney@amazon.com>
    Signed-off-by : Martin Storsjö <martin@martin.st>

    • [DH] libswscale/aarch64/hscale.S
    • [DH] libswscale/aarch64/swscale.c
    • [DH] libswscale/utils.c
  • RTMP streaming not working with fluent-ffmpeg and gl

    15 avril 2023, par Smile

    I'm trying to send opengl rendering results to rtmp using gl and fluent-ffmpeg packages.
    &#xA;The render function writes opengl output to glBuf.
    &#xA;And the render function is called about 60 times per second.
    &#xA;And it calls ffmpeg with that glBuf as input.

    &#xA;

    import ffmpeg from "fluent-ffmpeg";&#xA;import GL from "gl";&#xA;import { env } from "./env";&#xA;import { PassThrough } from "stream";&#xA;&#xA;const WIDTH = 1920;&#xA;const HEIGHT = 1080;&#xA;const gl = GL(WIDTH, HEIGHT);&#xA;&#xA;const glBuf = new PassThrough();&#xA;const render = () => {&#xA;  gl.viewport(0, 0, WIDTH, HEIGHT);&#xA;  gl.clearColor(0, 0, 0, 1);&#xA;  gl.clear(gl.COLOR_BUFFER_BIT);&#xA;&#xA;  const pixels = new Uint8Array(WIDTH * HEIGHT * 4);&#xA;  gl.readPixels(0, 0, WIDTH, HEIGHT, gl.RGBA, gl.UNSIGNED_BYTE, pixels);&#xA;  glBuf.write(pixels);&#xA;};&#xA;&#xA;const FRAMES = 10;&#xA;setInterval(() => {&#xA;  for (let i = 0; i &lt; FRAMES; i&#x2B;&#x2B;) {&#xA;    render();&#xA;  }&#xA;}, FRAMES * 1.1 * (1000 / 60));&#xA;&#xA;ffmpeg()&#xA;  .input(glBuf)&#xA;  .inputFormat("rawvideo")&#xA;  .inputOptions([`-video_size ${WIDTH}x${HEIGHT}`, "-pix_fmt rgba"])&#xA;  .inputFPS(60)&#xA;  .outputFormat("flv")&#xA;  .outputOptions([&#xA;    "-c:v libx264",&#xA;    "-preset veryfast",&#xA;    "-maxrate 3000k",&#xA;    "-bufsize 6000k",&#xA;    "-pix_fmt yuv420p",&#xA;    "-g 60",&#xA;    "-c:a aac",&#xA;    "-b:a 160k",&#xA;    "-ac 2",&#xA;  ])&#xA;  .on("error", (err) => {&#xA;    console.error(err);&#xA;  })&#xA;  .output(`${env.stream_url}/${env.stream_key}`)&#xA;  .run();&#xA;

    &#xA;

    However, stream health shows No data. That is, the data is ignored.
    &#xA;Not works

    &#xA;

    So I modified the code to save flv file. It works then.

    &#xA;

    import ffmpeg from "fluent-ffmpeg";&#xA;import GL from "gl";&#xA;import { env } from "./env";&#xA;import { PassThrough } from "stream";&#xA;&#xA;const WIDTH = 1920;&#xA;const HEIGHT = 1080;&#xA;const gl = GL(WIDTH, HEIGHT);&#xA;&#xA;const glBuf = new PassThrough();&#xA;const render = () => {&#xA;  gl.viewport(0, 0, WIDTH, HEIGHT);&#xA;  gl.clearColor(0, 0, 0, 1);&#xA;  gl.clear(gl.COLOR_BUFFER_BIT);&#xA;&#xA;  const pixels = new Uint8Array(WIDTH * HEIGHT * 4);&#xA;  gl.readPixels(0, 0, WIDTH, HEIGHT, gl.RGBA, gl.UNSIGNED_BYTE, pixels);&#xA;  glBuf.write(pixels);&#xA;};&#xA;&#xA;const FRAMES = 10;&#xA;const renderInterval = setInterval(() => {&#xA;  for (let i = 0; i &lt; FRAMES; i&#x2B;&#x2B;) {&#xA;    render();&#xA;  }&#xA;}, FRAMES * 1.1 * (1000 / 60));&#xA;&#xA;setTimeout(() => {&#xA;  clearInterval(renderInterval);&#xA;  glBuf.end();&#xA;  console.log("done!");&#xA;}, 3000);&#xA;&#xA;ffmpeg()&#xA;  .input(glBuf)&#xA;  .inputFormat("rawvideo")&#xA;  .inputOptions([`-video_size ${WIDTH}x${HEIGHT}`, "-pix_fmt rgba"])&#xA;  .inputFPS(60)&#xA;  .outputFormat("flv")&#xA;  .outputOptions([&#xA;    "-c:v libx264",&#xA;    "-preset veryfast",&#xA;    "-maxrate 3000k",&#xA;    "-bufsize 6000k",&#xA;    "-pix_fmt yuv420p",&#xA;    "-g 60",&#xA;    "-c:a aac",&#xA;    "-b:a 160k",&#xA;    "-ac 2",&#xA;  ])&#xA;  .on("error", (err) => {&#xA;    console.error(err);&#xA;  })&#xA;  .output(`output.flv`)&#xA;  .run();&#xA;&#xA;

    &#xA;

    It works then

    &#xA;

    Why doesn't first code work ?

    &#xA;