Recherche avancée

Médias (1)

Mot : - Tags -/biomaping

Autres articles (50)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • 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 (...)

  • De l’upload à la vidéo finale [version standalone]

    31 janvier 2010, par

    Le chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
    Upload et récupération d’informations de la vidéo source
    Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
    Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)

Sur d’autres sites (8710)

  • 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;
  • Dynamic video resolution

    4 janvier 2019, par Chen Yang

    I use ffmpeg to encode my mobile phone’s screenshot to a video. when my phone is vertical the screenshot’s resolution is 478 * 850.When horizontal the resolution is 850 * 478. Encoder could handle these image to encoded video frame, and i could play this video by ffplay correctly, i means if resolution change from 478 * 850 => 850 * 478 and it still could display full phone screen. enter image description here enter image description here
    But if i play this video with any other players, it only could play harf of phone screen when frame resolution change from 478 * 850 => 850 => 478.
    enter image description here
    Do you guys know any video format could handle this situation?

  • Standardizing many mp4 files into same resolution

    22 novembre 2018, par Cowfod

    I have a huge collection of Instagram videos in different resolutions and with different audio codecs.

    Some videos are 640x640, others are 640x800. You get the picture.

    When I try to concat the videos, the video and audio go out of sync in the final output and the in some places the audio is slowed down(?).

    This is my ffmpeg concat command :

    ffmpeg -i "$(cat /home/list.txt)" -c:v copy -c:a copy /home/output.mp4

    list.txt contains over 800 clips and is formatted correctly :

    file 'clip1.mp4'
    file 'clip2.mp4'
    file 'clip3.mp4'
    etc...

    I believe the issue is due to all the different resolutions and different codecs used, so how can I standardize my collection of clips in order to concat them into a working video file ?