Recherche avancée

Médias (91)

Autres articles (79)

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

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

Sur d’autres sites (9014)

  • Impossible to redirect video stream after conversion (mkv to mp4)

    17 décembre 2019, par elgrusko

    I’m currently realising a school project which aims a streaming video website (like Netflix) using torrent-stream (with the magnet link). I am using NodeJS for the stream part.

    My problem is : I can’t redirect the stream to the HTML 5 player while i’m trying to stream and converting (with ffmpeg) video at the same time. I think it’s because I just can’t know what’s will be the final size of the converted file.
    In browser’s console I have this message : net::ERR_CONTENT_LENGTH_MISMATCH 200 (OK)

    I tried to put this in the header : Transfer-Encoding: chunked instead of Content-Length
    I specify that the stream (before conversion) works perfectly

    This is my code :

    getTorrentFile.then(function (file) {
                   res.setHeader('Content-Type', 'video/mp4');
                   res.setHeader('Content-Length', file.length);
                   const ranges = parseRange(file.length, '15' /* variable à comprendre */, { combine: true });
                   console.log(ranges);
                   if (ranges === -1) {
                       // 416 Requested Range Not Satisfiable
                       console.log('416')
                       res.statusCode = 416;
                       return res.end();
                   } else if (ranges === -2 || ranges.type !== 'bytes' || ranges.length > 1) {
                       // 200 OK requested range malformed or multiple ranges requested, stream ent'ire video
                       if (req.method !== 'GET') return res.end();
                       console.log('200')
                       stream = file.createReadStream()
                       ffmpeg(stream)
                       .videoCodec('libx264')
                       .audioCodec('aac')
                       .output(res)
                       .output('./video/' + film + '_s' + season + '_e' + episode + '.mp4')
                       .outputFormat('mp4')
                       .outputOptions('-movflags frag_keyframe+empty_moov')
                       .on('error', function(err) {
                           console.log('An error occurred: ' + err.message);
                       })
                       .on('progress', function(progress) {
                           console.log('Processing: ' + progress.targetSize + 'kb done');
                         })
                       .on('end', function() {
                           console.log('Processing finished !');
                       })
                       .addOutputOption('-acodec')
                       .run()

    Sorry if i’m not really clear, ask me some questions if you need more informations :)

    Thanks for your help, bye :)

  • Fixing audio/video out of sync when editing recorded broadcast

    27 décembre 2019, par sba

    I have recorded broadcast-ed material using a DVB-T tuner.

    That produces several TS files per recording (most likely to keep filesize within FAT32 limitations).

    I have concatenated each recording into a single TS file using :

    ffmpeg.exe -f concat -i $filelist -c copy -y $outputfile

    From there, I need to perform edits to remove commercials, strip extra stuff from the start and end, and optionally extract each episode into a separate file.

    I own Pinnacle Studio 23 Ultimate, that doesn’t support TS as input so I’m converting TS to MP4 using something like :

    ffmpeg -y -i foo.ts -crf 18 -ac 2 -r 25 -c:v libx265 -ar 48000 -b:a 192k -c:a aac -aspect 16:9 bar.mp4

    (I’ve tried several ways/options, including using HandBrake for that conversion).

    What happens is that in the resulting edited material, audio and video are out of sync. Can be in the whole file, or only in some sections.

    This could be linked to glitches (missing frames...) in the original recording.

    But when I play the original single-file TS, or the MP4 version, in any player such as VLC, audio and video are properly aligned. So these players are able to deal with the aforementioned glitches and "re-align" the audio and video streams.

    How can I "rewrite" the whole input file in such a way that audio and video are "fully synchronized" so that editing will be possible ?

    Thanks in advance for your help.

  • play m3u8 video from laravel storage

    21 janvier 2020, par Jennsen

    My question is the same as how to play m3u8 videos from laravel storage but this one did not get answers.

    If I play the video from the public folder it does it without problems.

    but if I want to play it from storage this doesn’t work.

       public function watch(Request $request, Episode $episode)
    {

       $video = Storage::disk('videos')->get($episode->video);

       return new Response($video, 200, ['Content-Type' => 'application/x-mpegURL', 'isHls' => true]);
    }

    this is the definition of my disk in config/filesystems.php

     'videos' => [
           'driver' => 'local',
           'root' => storage_path('app/videos'),
           'url' => env('APP_URL').'/storage',
           'visibility' => 'public',
       ],

    this is my conversion code (job)

        */
    public function handle()
    {
       $path = $this->episode->id . '.m3u8';
       $lowBitrate  = (new X264 ('aac'))->setKiloBitrate(500)->setVideoCodec('libx264');
       $midBitrate  = (new X264 ('aac'))->setKiloBitrate(1000)->setVideoCodec('libx264');
       $highBitrate = (new X264 ('aac'))->setKiloBitrate(3000)->setVideoCodec('libx264');

       FFMpeg::fromDisk('tmp')->open($this->episode->video)
           ->exportForHLS()
           ->dontSortFormats()
           ->setSegmentLength(10)
           ->toDisk('local')
           ->addFormat($lowBitrate, function($media) {
               $media->addFilter(function ($filters) {
                   $filters->resize(new \FFMpeg\Coordinate\Dimension(640, 480));
               });
           })
           ->addFormat($midBitrate, function($media) {
               $media->addFilter(function ($filters) {
                   $filters->resize(new \FFMpeg\Coordinate\Dimension(1280, 960));
               });
           })
           ->addFormat($highBitrate, function($media) {
               $media->addFilter(function ($filters) {
                   $filters->resize(new \FFMpeg\Coordinate\Dimension(1280, 960));
               });
           })
           ->save($path);

       $this->episode->update([
           'video' => $path,
       ]);

       FFMpeg::cleanupTemporaryFiles();

    }