Recherche avancée

Médias (2)

Mot : - Tags -/media

Autres articles (111)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

Sur d’autres sites (7598)

  • There is a video stream option and player. But can't find where to manage video and stream

    26 janvier 2018, par Chanaka De Silva

    I’m working on this repository. in this application, we can upload a video taken by a action camera or drone, and it uses GPS coordinates (lat,lang) and draw the path of the video in the map. And also we can play the video via the system too after upload.

    Bt the size of the video is too much high. So it take a lot of time to process video and also download and play when we host in a server. I wanted to reduce size. So I write this code.

    try {
    new ffmpeg('demo.mp4', function (err, video) {
       if (!err) {
           video
               .setVideoSize('50%', true, false)
               .setVideoFrameRate(30)
               .save('output.mp4', function (error, file) {
                   if (error) {
                       console.log("error : ", error);
                   }
                   if (!error)
                       console.log('Video file: ' + file);
               });
           console.log('The video is ready to be processed');
       } else {
           console.log('Error: ' + err);
       }
    });

    }

    But the issue is I can’t find where is the video coming from in this application. We need to pass like "demo.mp4" to my code as you can see. This is the index file if this application : https://github.com/chanakaDe/replay-lite/blob/master/frontend/index.html

    And this is the player file : https://github.com/chanakaDe/replay-lite/blob/master/frontend/player.js

    This is the file called api.js : https://github.com/chanakaDe/replay-lite/blob/master/frontend/api.js

    This file also has some video functions : https://github.com/chanakaDe/replay-lite/blob/master/gopro/index.js

    Please guys, sometimes you will see this questions as a silly question. But you have the repo to check and can you guys please check and let me know where to get a video file or stream to add my size reduce code ?

  • How to fix that ? [duplicate]

    30 septembre 2016, par Độc Hành

    This question already has an answer here :

    Watermark short videos upload from pc working.
    But download video 720p from vimeo and watermark not working

     set_time_limit(0);
     $ffmpeg = FFMpeg\FFMpeg::create([
           'ffmpeg.binaries' => '/usr/bin/ffmpeg',
           'ffprobe.binaries' => '/usr/bin/ffprobe',
           'timeout' => 0, // The timeout for the underlying process
           //'ffmpeg.threads' => 12,   // The number of threads that FFMpeg should use
       ]);
        $video = $ffmpeg->open( '/var/www/webroot/ccbank/frontend/web/uploads/vimeo.mp4');
       $watermark = '/var/www/webroot/ccbank/frontend/web/uploads/logo-h100.png';
       $video->filters()->watermark($watermark, [
           'position' => 'relative',
           'right' => 50,
           'top' => 50,
       ]);
       $format = new FFMpeg\Format\Video\X264();
       $output =  '/var/www/webroot/ccbank/frontend/web/uploads/watermark1.mp4';
       $video->save($format, $output);

    Browser error :
    error1

    error command line :

    '/usr/bin/ffmpeg' '-y' '-i' '/var/www/webroot/ccbank/frontend/web/uploads/vimeo.mp4' '-vf' 'movie=/var/www/webroot/ccbank/frontend/web/uploads/logo-h100.png [watermark]; [in][watermark] overlay=main_w - 50 - overlay_w:50 [out]' '-vcodec' 'libx264' '-acodec' 'libfaac' '-b:v' '1000k' '-refs' '6' '-coder' '1' '-sc_threshold' '40' '-flags' '+loop' '-me_range' '16' '-subq' '7' '-i_qfactor' '0.71' '-qcomp' '0.6' '-qdiff' '4' '-trellis' '1' '-b:a' '128k' '-pass' '1' '-passlogfile' '/tmp/ffmpeg-passes57ee9ba784e323laim/pass-57ee9ba784f92' '/var/www/webroot/ccbank/frontend/web/uploads/watermark1.mp4'

    Terminal :

    error2

    lib libfaac-dev ready installed
    How to fix that ?

  • Promise chaining and resolution

    23 janvier 2019, par Shourya Sharma

    I am trying to convert videos one by one with the help of promises. i am using ffmpeg for conversion and multer for uploading multiple files.

    multer uploads multiple files at once after which i have to chain the conversions one by one. as of now it just converts the 1st file.

    i thought chaining of promises ..like in an array should work but i am confused if i can define new promises in an array as ffmpeg also returns a promise

    My router :

    const router = require('express').Router();
    const multer = require('multer');
    const ffmpeg = require('ffmpeg');

    let str;
    const storage = multer.diskStorage({
     destination: (req, file, cb) => {
       cb(null, './uploads');
     },
     filename: (req, file, cb) => {
       str = file.originalname.replace(/\.[^/.]+$/, "");
       str = str.replace(/[^a-z0-9+]+/gi, '_') + '.' + file.originalname.replace(/^.*\./, '');
       cb(null, str);
     }
    });

    const upload = multer({ storage: storage }).array('files', 12);

    router.post('/upload', (req, res, next) => {
     // req.files is an array of files
     // req.body will contain the text fields, if there were any
     function uploadFile() {
       return new Promise((resolve, reject) => {
         upload(req, res, (err) => {
           if (err) {
             res.send(err) // Pass errors to Express.
             reject(`Error: Something went wrong!`);
           } else if (req.files == undefined) {
             res.send(`No File selected.`);
             resolve();
           } else if (!err && req.files.length > 0) {
             res.status(201).send(`${req.files.length} File(s): ${req.files} uploaded successfully.`);
             console.log('uploaded');
             resolve();
           }
         });
       });
     }

     uploadFile().then(() => {
       try {
         var process = new ffmpeg('./uploads/' + str);
         process.then(function (video) {
           console.log('The video is ready to be processed');
           video.addCommand('-hide_banner', '');
           video.addCommand('-y', '');
           video.addCommand('-c:a', 'aac');
           video.addCommand('-ar', '48000');
           video.addCommand('-c:v', 'h264');
           video.addCommand('-profile:v', 'main');
           video.addCommand('-crf', '20');
           video.addCommand('-sc_threshold', '0');
           video.addCommand('-g', '50');
           video.addCommand('-keyint_min', '50');
           video.addCommand('-hls_time', '4');
           video.addCommand('-hls_playlist_type', 'vod');
           video.addCommand('-vf', 'scale=-2:720');
           video.addCommand('-b:v', '1400k');
           video.addCommand('-maxrate', '1498k');
           video.addCommand('-bufsize', '2100k');
           video.addCommand('-b:a', '128k');
           video.save('./converted/' + str, function (error, file) {
             if (!error)
               console.log('Video file: ' + file);
           });
           }, function (err) {
             console.log('Error: ' + err);
           });
       } catch (e) {
         console.log(e.code);
         console.log(e.msg);
       }
     }).catch((err) => {
       console.log(Error, err);
     });
    });

    module.exports = router;