Recherche avancée

Médias (2)

Mot : - Tags -/media

Autres articles (40)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • 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 ;

  • 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

Sur d’autres sites (7462)

  • Cannot find a matching stream for unlabeled input pad 0 on filter Parsed_split_0

    26 mars 2023, par VenoM

    So I'm using ytdl-core & ffmpeg to convert some videos from YouTube to MP4 and then manipulate them in a way or take screenshots. But the issue I'm facing is - some videos are downloaded and are completely playable, but others are corrupt.

    


    This is the error I get when I try to take screenshot of the corrupted video :

    


    


    Error : ffmpeg exited with code 1 : Cannot find a matching stream for unlabeled input pad 0 on filter Parsed_split_0

    


    


    And obviously, error is there because the video is corrupted, but WHY is that the case ?

    


    Here's my code (read TL ;DR below) :

    


      router.post("/screenshot", async (req, res) => {
  const urlToScreenshot = req.body.url;
  const timestamp = parseInt(req.body.t, 10);
  const YouTubeURL = `https://youtube.com/watch?v=${urlToScreenshot}`;
  const filename = uuidv4();

  const videoPath = `${filePath}/${filename}.mp4`;

  const downloadStartTime = timestamp - 3;
  const downloadEndTime = timestamp + 3;

  const videoStream = ytdl(YouTubeURL, {
    quality: "highest",
  });

  const ffmpegCommand = ffmpeg(videoStream)
    .setStartTime(downloadStartTime)
    .duration(downloadEndTime - downloadStartTime)
    .outputOptions("-c:v", "libx264")
    .outputOptions("-c:a", "copy")
    .outputOptions("-b:v", "10M")
    .outputOptions("-filter:v", "scale=1920:1080")
    .outputOptions("-q:v", "1")
    .outputOptions("-reconnect", "1") // enable reconnection attempts
    .outputOptions("-ignore_io_errors", "1") // ignore input/output errors
    .on("end", async () => {
      console.log("Video downloaded successfully: " + videoPath);

      const screenshotPath = `${filePath}/${filename}.png`;
      ffmpeg(videoPath)
        .screenshots({
          count: 1,
          timemarks: ["1"],
          folder: filePath,
          filename: `${filename}.png`,
        })
        .on("end", async () => {
          console.log(`Screenshot saved successfully: ${screenshotPath}`);
          try {
            const cloudinaryResult = await cloudinary.uploader.upload(
              screenshotPath
            );
            const screenshotUrl = cloudinaryResult.secure_url;
            console.log(`Screenshot uploaded to Cloudinary: ${screenshotUrl}`);
            // await unlink(videoPath);
            console.log(`Video file deleted: ${videoPath}`);
            // await unlink(screenshotPath);
            console.log(`Screenshot file deleted: ${screenshotPath}`);
            res.status(200).json({ screenshotUrl });
          } catch (err) {
            console.error(
              "An error occurred while uploading the screenshot to Cloudinary:",
              err
            );
            // await unlink(videoPath);
            // await unlink(screenshotPath);
            res.status(500).send("Internal Server Error");
          }
        })
        .on("error", async (err) => {
          console.error("An error occurred while taking the screenshot:", err);
          // await unlink(videoPath);
          // await unlink(screenshotPath);
          res.status(500).send("Internal Server Error");
        });
    })
    .on("error", async (err) => {
      console.error("An error occurred while downloading the video:", err);
      await unlink(videoPath); // delete the file on error
      res.status(500).send("Internal Server Error");
    })
    .save(videoPath);

  // console.log(ffmpegCommand);
});


    


    Code Summary : Basically I'm passing the videoID and timestamp (because I want to download a certain section of the video, not the whole video), it downloads the video, then takes a screenshot of the video at a certain timestamp (i.e 1st second) and sends the screenshot to Cloudinary (a cloud file storage).

    


    This works fine for 50% of the videos I've tried, but doesn't for other videos.

    


    Here's a picture of a corrupt video and a working video.

    


    enter image description here

    


    Working Video

    


    Corrupt Video

    


    Some help would be greatly appreciated !

    


  • Issue with video compression using HLS from laravel protonemedia/laravel-ffmpeg package

    29 mars 2023, par Mateo Kantoci

    I'm using laravel-ffmpeg package in order to compress videos and save it as .m3u8.
In another words, I have a job that is gathering all uncompressed files and compress them 1by1 and save them to google cloud storage. Furthermore, compression is using exportForHLS from package and throws an error :

    


    ProtoneMedia\LaravelFFMpeg\Exporters\HLSPlaylistGenerator::getStreamInfoLine(): Return value must be of type string, null returned in /var/www/html/ipaparazzo/vendor/pbmedia/laravel-ffmpeg/src/Exporters/HLSPlaylistGenerator.php:32


    


    In some cases compression works but my job is failing for most of the time.

    


    Anyone experienced similar issue ?

    


    P.S. It is working as expected when using public storage.

    


    This is my code exactly as per laravel-ffmpeg documentation :

    


    ->exportForHLS()
->setSegmentLength(10) // optional
->setKeyFrameInterval(48) // optional
->addFormat($lowBitrate, function($media) {
    $media->scale(426, 240);
})
->addFormat($midBitrate, function($media) {
    $media->scale(640, 360);
})
->addFormat($highBitrate, function($media) {
    $media->scale(640, 480);
})
->onProgress(function ($percentage) {
   echo "{$percentage}% transcoded\n";
})
->toDisk('gcs2')
->save($videoPath)
->cleanupTemporaryFiles();


    


  • Terminal command to upgrade FFMPEG

    14 avril 2023, par Savvy Turtle

    Everything is still installed but once I upgraded my server from CentOS 7.6 to Cloud Linux FFMPEG does not seem to work anymore.

    


    When I go and debug it in the admin section where you upload a test video and hit debug it shows a toast to upload a video. and on the front end of https://turtle.tube/ users upload a video and it gets stuck at 100% upload and processed.

    


    So I'm wondering whether I need to ugrade FFMPEG to work with Cloud Linux update or If I need to restart it.

    


    Any help would be great thanks.

    


    Savvy

    


    Checked Version, looked for terminal command to upgrade FFMPEG to latest stable release of : FFmpeg 5.1.3 "Riemann" or FFmpeg 6.0 "Von Neumann" but have not figured out the command to upgrade yet.

    


    nor the command to restart FFMPEG if that even exist.

    


    Current version of FFMPEG shows :

    


    ffmpeg -version

    


    ffmpeg version 3.4.12 Copyright (c) 2000-2022 the FFmpeg developers
built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-44)
configuration : —prefix=/usr —bindir=/usr/bin —datadir=/usr/share/ffmpeg —docdir=/usr/share/doc/ffmpeg —incdir=/usr/include/ffmpeg —libdir=/usr/lib64 —mandir=/usr/share/man —arch=x86_64 —optflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong —param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' —extra-ldflags='-Wl,-z,relro ' —extra-cflags=' ' —enable-libopencore-amrnb —enable-libopencore-amrwb —enable-libvo-amrwbenc —enable-version3 —enable-bzlib —disable-crystalhd —enable-fontconfig —enable-gcrypt —enable-gnutls —enable-ladspa —enable-libass —enable-libbluray —enable-libcdio —enable-libdrm —enable-indev=jack —enable-libfreetype —enable-libfribidi —enable-libgsm —enable-libmp3lame —enable-nvenc —enable-openal —enable-opencl —enable-opengl —enable-libopenjpeg —enable-libopus —disable-encoder=libopus —enable-libpulse —enable-librsvg —enable-libsoxr —enable-libspeex —enable-libtheora —enable-libvorbis —enable-libv4l2 —enable-libvidstab —enable-libvpx —enable-libx264 —enable-libx265 —enable-libxvid —enable-libzvbi —enable-avfilter —enable-avresample —enable-libmodplug —enable-postproc —enable-pthreads —disable-static —enable-shared —enable-gpl —disable-debug —disable-stripping —shlibdir=/usr/lib64 —enable-libmfx —enable-runtime-cpudetect
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libavresample 3. 7. 0 / 3. 7. 0
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100