Recherche avancée

Médias (91)

Autres articles (108)

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

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

Sur d’autres sites (11203)

  • NodeJS stream MKV as MP4 video

    29 mars 2024, par SirMissAlot

    I'm trying to stream MKV video as MP4 on the fly with out saving the converted file

    


    first I've tried without conversion :

    


    public async streamById(req: Request, res: Response) {
    const movieId = req.params.id;
    const movie = await MovieModel.findById(movieId);
    if (!movie) {
      return res.status(404).send({ message: 'Movie not found' });
    }

    const filePath = movie.path;

    const stat = fs.statSync(filePath);
    const fileSize = stat.size;
    const range = req.headers.range;

    if (range) {
      const parts = range.replace(/bytes=/, '').split('-');
      const start = parseInt(parts[0], 10);
      const end = parts[1] ? parseInt(parts[1], 10) : fileSize - 1;

      const chunksize = end - start + 1;
      const file = fs.createReadStream(filePath, { start, end });
      const head = {
        'Content-Range': `bytes ${start}-${end}/${fileSize}`,
        'Accept-Ranges': 'bytes',
        'Content-Length': chunksize,
        'Content-Type': 'video/mp4',
      };

      res.writeHead(206, head);
      file.pipe(res);
    } else {
      const head = {
        'Content-Length': fileSize,
        'Content-Type': 'video/mp4',
      };
      res.writeHead(200, head);
      fs.createReadStream(filePath).pipe(res);
    }
  }


    


    which is working but without audio

    


    With ffmpeg I'm getting error : "Error during conversion : Output stream closed"

    


    const command = ffmpeg(file)
    .format('mp4')
    .audioCodec('aac')
    .videoCodec('libx264')
    .outputOptions('-movflags frag_keyframe+empty_moov')
    .outputOptions('-preset veryfast')
    .on('error', (err: any) => {
      console.error('Error during conversion:', err.message);
      res.end();
    })
    .on('end', () => {
      console.log('Conversion complete ');
      res.end();
    });

  // Pipe ffmpeg output directly to the response
  command.pipe(res, { end: true });


    


  • I'm having problem encoding video using Laravel FFMPEG to save it to Minio storage

    8 juillet 2022, par Ibrahim Ahmad

    I am trying to convert video from .mp4 extension into HLS format (.m3u8) using Laravel FFMPEG.

    


    FFMpeg::fromDisk('minio')
          ->open($videoFile)
          ->exportForHLS()
          ->onProgress(function ($percentage) use ($movie) {
               Cache::put('progress-' . $movie->id, $percentage);

               if($percentage >= 100) {
                 Cache::forget('progress-' . $movie->id);
                }
             })
             ->toDisk('minio')
             ->addFormat($lowBitrate, function (HLSVideoFilters $filter) {
                 $filter->resize(480, 360);
             })
             ->addFormat($midBitrate, function (HLSVideoFilters $filter) {
                 $filter->resize(852, 480);
              })
              ->addFormat($highBitrate, function (HLSVideoFilters $filter) {
                  $filter->resize(1920, 1080);
              })
              ->save($newFile);


    


    I have a .mp4 video stored in Minio S3 storage, want to export to Minio S3 storage again. And I came up with this error

    


    RecursiveDirectoryIterator::__construct(C:\Windows\Temp/52325dd01cfde90a\): Access is deni (code: 5)


    


    What does the error message say ? But when I export the video file to local, it works totally fine. How do I solve this problem. Thanks.

    


    Update :
The export process requires windows temporary folder, and I cleared the temporary folder, the problem is solved for now. This probably the temporary folder can't hold many files.

    


  • ffmpeg transcode and avfilter error

    1er décembre 2014, par rosen

    FFmpeg configure options :

    --enable-avfilter \
    --enable-nonfree \
    --disable-filters \
    --enable-filter=movie \
    --enable-filter=overlay \
    --enable-filter=null \
    --enable-filter=anull \
    --enable-filter=scale \
    --enable-filter=rotate \

    and run success use

    filter_spec = "null"; /* passthrough (dummy) filter for video */

    and get the transcoding video success !
    but use

    filter_spec = "movie=/storage/emulated/0/image.png [wm]; [in][wm] overlay=10:10 [out]";

    then run to

    if ((ret = avfilter_graph_parse_ptr(filter_graph, filter_spec,
       &inputs, &outputs, NULL)) < 0)
           goto end;

    get the error :

    Invalid data found when processing input

    please help me...