Recherche avancée

Médias (1)

Mot : - Tags -/Rennes

Autres articles (45)

  • 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

  • Ajouter notes et légendes aux images

    7 février 2011, par

    Pour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
    Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
    Modification lors de l’ajout d’un média
    Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)

  • Le plugin : Podcasts.

    14 juillet 2010, par

    Le problème du podcasting est à nouveau un problème révélateur de la normalisation des transports de données sur Internet.
    Deux formats intéressants existent : Celui développé par Apple, très axé sur l’utilisation d’iTunes dont la SPEC est ici ; Le format "Media RSS Module" qui est plus "libre" notamment soutenu par Yahoo et le logiciel Miro ;
    Types de fichiers supportés dans les flux
    Le format d’Apple n’autorise que les formats suivants dans ses flux : .mp3 audio/mpeg .m4a audio/x-m4a .mp4 (...)

Sur d’autres sites (9589)

  • Inserting an image inside a video every few frames using ffmpeg

    31 juillet 2023, par Erez Hochman

    Can I use FFMPEG to insert an image every 20 frames in a video ? 
I'm trying to create a subliminal message experiment and I thought it would be an easy way to make it but I can't find anything online.

    



    I tried to make something myself and created a script that :
    
1.splits a file into audio and video files
    
2.splits the video into frames
    
3.overwrites every 20th image in the sequence with the message image
    
4.re-encoding the video
    
5.concatenating it with the original audio

    



    this works but it's way more disk space consuming to be comfortable, is there a better way to do this ?
    
any advice or thought would be happily welcome.

    


  • Generating Video from Downloaded Images Using Fluent-FFmpeg : Issue with Multiple Image Inputs

    11 août 2023, par Pratham Bhagat

    I am having trouble creating Video from multiple images using fluent-ffmpeg in node.js.

    


    Here, I am getting the images from rquest body and downloading them in **temp **directory

    


       const imageUrls = req.body.imageUrls;
   const timeInBetween = parseFloat(req.query.time_in_between) || 1.0;

const tempDir = path.join(
      context.executionContext.functionDirectory,
      "temp"
    );

const downloadedImages = await Promise.all(
      imageUrls.map(async (imageUrl, index) => {
        try {
          const response = await axios.get(imageUrl, {
            responseType: "arraybuffer",
          });
          const imageName = `image_${index + 1}.png`;
          const imagePath = path.join(tempDir, imageName);
          await fs.writeFile(imagePath, response.data);
          return imagePath;
        } catch (error) {
          context.log(`Error downloading ${imageUrl}: ${error.message}`);
          return null;
        }
      })
    );


    


    I want to combine these images that are in downloadedImages array and create a video

    


    const outputVideoPath = path.join(tempDir, "output.mp4");

    let ffmpegCommand = ffmpeg();

    for (let i = 0; i < downloadedImages.length; i++) {
      context.log(downloadedImages.length);
      ffmpegCommand
        .input(downloadedImages[i])

        .inputOptions(["-framerate", `1/${timeInBetween}`])
        .inputFormat("image2")
        .videoCodec("libx264")
        .outputOptions(["-pix_fmt", "yuv420p"]);
    }

    ffmpegCommand
      .output(outputVideoPath)
      .on("end", () => {
        context.log("Video generation successful.");
        context.res = {
          status: 200,
          body: "Video generation and cleanup successful.",
        };
      })
      .on("error", (err) => {
        context.log.error("Error generating video:", err.message);
        context.res = {
          status: 500,
          body: "Error generating video: " + err.message,
        };
      })
      .run();


    


    By running it and giving value of "time_in_between" as 2 I get video of 2 seconds with a single image.

    


      

    • Utilized Fluent-FFmpeg library to generate a video from a list of downloaded images.
    • 


    • Expected the video to include all images, each displayed for a specified duration.
    • 


    • Tried mapping through the image paths and using chained inputs for each image.
    • 


    • Expected the video to have a sequence of images displayed.
    • 


    • Observed that the generated video only contained the first image and was of 0 seconds duration.
    • 


    


  • hardware conversion of image pixel format in ffmpeg ?

    18 janvier 2024, par dongrixinyu

    I am trying to decode an online rtmp video stream into RGB format frames, and then encoding RGB frames into an online stream.

    


    Task

    


    Here is what I do now :

    


    


    decoding a video stream to get images(RGB) ---> ai model process ---> encoding frames(RGB) to form a video stream in H264

    


    


    My scheme

    


    All my code in written in C with FFmpeg dependencies. The detailed steps are :

    


    


    rtmp/rtsp video stream ---> AVPacket ---(nvidia cuda)---> AVFrame(nv12 pix fmt) ---> AVFrame(RGB pix fmt) ---> AI process.

    


    


    


    AVFrame(RGB pix fmt) ---> AVFrame(nv12 pix fmt) ---(nvidia cuda)---> AVPacket ---> rtmp/rtsp video stream

    


    


    Now, the decoding and encoding part are run on NVIDIA GPU, which is quite fast.

    


    But the conversion of pixel format between AV_PIX_FMT_NV12 and AV_PIX_FMT_RGB is run on CPU, which is astonishingly CPU-consuming cause the size of video frame is 2k.

    


    My question

    


    So, is there any off-the-shelf method to fulfill the conversion of image pixel format on GPU (especially via cuda) directly ?