Recherche avancée

Médias (1)

Mot : - Tags -/ogv

Autres articles (97)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

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

  • ANNEXE : Les plugins utilisés spécifiquement pour la ferme

    5 mars 2010, par

    Le site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)

Sur d’autres sites (11623)

  • A light-weight Rust crate for encoding videos from images and audios [closed]

    24 décembre 2019, par Agus Putra Dana

    I want to make a web app that enable users to generate video from canvas animation. I’m aware that I can record the canvas animation and the audios using catureStream(), but I want to generate the video without playing the audio. Also, the video frame rate generated using this method is not consistent.

    My idea is to capture the canvas frame by frame and store them as blob to get a consistent frame rate. And then encode the video from these blobs and some audio files uploaded by the user using web assembly. I’m also aware that I can use FFMPEG to encode the video. But the file size of the compiled FFMPEG is quite big.

    Is there any light-weight video encoder library, preferably written in Rust, just for encoding video from images and audios ?

  • Empty stream when cutting a video using ffmpeg

    17 décembre 2019, par dscv

    When I try cutting a video, it outputs an empty stream (262 byte video with 0s duration). Would appreciate any insight, thanks.

    Command used :
    ffmpeg -i /path/to/long/video.mp4 -ss 37.69 -t 4.96 -c copy /path/to/short/video.mp4

    However, when I the following (more inaccurate) command, it outputs a video. This video also has some problems, as the last frame is repeated several times, making the video one second longer (with a frozen image for one second).

    ffmpeg -ss 37.69 -i /path/to/long/video.mp4 -t 4.96 -c copy /path/to/short/video.mp4

    ffmpeg version : ffmpeg version 3.4.6-0ubuntu0.18.04.1

    The outputs for the two commands are :

    First command :

     built with gcc 7 (Ubuntu 7.3.0-16ubuntu3)
     configuration: --prefix=/usr --extra-version=0ubuntu0.18.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
     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
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/proj/vondrick/datasets/HowTo100M/video/Cars_&_Other_Vehicles/Motorcycles/52907/video_nVbIUDjzWY4.mp4':
     Metadata:
       major_brand     : dash
       minor_version   : 0
       compatible_brands: iso6avc1mp41
       creation_time   : 2015-06-26T00:39:04.000000Z
     Duration: 00:07:14.40, start: 0.000000, bitrate: 244 kb/s
       Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(progressive), 426x240 [SAR 1:1 DAR 71:40], 2 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc (default)
       Metadata:
         creation_time   : 2015-06-26T00:39:04.000000Z
         handler_name    : VideoHandler
    Output #0, mp4, to '/proj/vondrick/datasets/HowTo100M/cropped_video/Cars_&_Other_Vehicles/Motorcycles/52907/nVbIUDjzWY4/video_000000_p.mp4':
     Metadata:
       major_brand     : dash
       minor_version   : 0
       compatible_brands: iso6avc1mp41
       encoder         : Lavf57.83.100
       Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(progressive), 426x240 [SAR 1:1 DAR 71:40], q=2-31, 2 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 90k tbc (default)
       Metadata:
         creation_time   : 2015-06-26T00:39:04.000000Z
         handler_name    : VideoHandler
    Stream mapping:
     Stream #0:0 -> #0:0 (copy)
    Press [q] to stop, [?] for help
    frame=    0 fps=0.0 q=-1.0 Lsize=       0kB time=00:00:00.00 bitrate=N/A speed=   0x    
    video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

    Second command :

    ffmpeg version 3.4.6-0ubuntu0.18.04.1 Copyright (c) 2000-2019 the FFmpeg developers
     built with gcc 7 (Ubuntu 7.3.0-16ubuntu3)
     configuration: --prefix=/usr --extra-version=0ubuntu0.18.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
     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
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/proj/vondrick/datasets/HowTo100M/video/Cars_&_Other_Vehicles/Motorcycles/52907/video_nVbIUDjzWY4.mp4':
     Metadata:
       major_brand     : dash
       minor_version   : 0
       compatible_brands: iso6avc1mp41
       creation_time   : 2015-06-26T00:39:04.000000Z
     Duration: 00:07:14.40, start: 0.000000, bitrate: 244 kb/s
       Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(progressive), 426x240 [SAR 1:1 DAR 71:40], 2 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc (default)
       Metadata:
         creation_time   : 2015-06-26T00:39:04.000000Z
         handler_name    : VideoHandler
    Output #0, mp4, to '/proj/vondrick/datasets/HowTo100M/cropped_video/Cars_&_Other_Vehicles/Motorcycles/52907/nVbIUDjzWY4/video_000000_3.mp4':
     Metadata:
       major_brand     : dash
       minor_version   : 0
       compatible_brands: iso6avc1mp41
       encoder         : Lavf57.83.100
       Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(progressive), 426x240 [SAR 1:1 DAR 71:40], q=2-31, 2 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 90k tbc (default)
       Metadata:
         creation_time   : 2015-06-26T00:39:04.000000Z
         handler_name    : VideoHandler
    Stream mapping:
     Stream #0:0 -> #0:0 (copy)
    Press [q] to stop, [?] for help
    frame=  159 fps=0.0 q=-1.0 Lsize=     159kB time=00:00:04.95 bitrate= 263.0kbits/s speed=1.89e+03x    
    video:158kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.909119%
  • AWS Lambda for generate thumbnail save empty file

    30 octobre 2019, par Milousel

    I need to create aws lambda for creating thumbnail from video by using ffmpeg, which is saved on S3 and this thumbnail saved into S3 too.

    I downloaded ffmpeg from https://johnvansickle.com/ffmpeg/ page, set ffmpeg into nodejs file and send it into .zip. From this zip file I created ffmpeg layer. After that I connect my lambda with this ffmpeg layer. When I test it I receive Success response, but I save empty file (0 B size) into S3.

    const AWS = require("aws-sdk");
    const { spawn } = require("child_process");
    const { createReadStream, createWriteStream } = require("fs");

    const s3 = new AWS.S3();
    const ffmpegPath = "/opt/nodejs/ffmpeg";
    const allowedTypes = ["mov", "mpg", "mpeg", "mp4", "wmv", "avi", "webm"];
    const width = process.env.WIDTH;
    const height = process.env.HEIGHT;

    module.exports.handler = async (event, context) => {
     const srcKey = "test/0255f240-efef-11e9-862e-3949600f0ec9.mp4";
     const bucket = "video.devel.abc.com";
     const target = s3.getSignedUrl("getObject", {
       Bucket: bucket,
       Key: srcKey,
       Expires: 1000
     });
     let fileType = "mp4";
     console.log("srcKey: " + srcKey);
     console.log("bucket: " + bucket);
     console.log("target: " + target);
     if (!fileType) {
       throw new Error(`invalid file type found for key: ${srcKey}`);
     }

     if (allowedTypes.indexOf(fileType) === -1) {
       throw new Error(`filetype: ${fileType} is not an allowed type`);
     }

     function createImage(seek) {
       return new Promise((resolve, reject) => {
         let tmpFile = createWriteStream(`/tmp/screenshot.jpg`);
         const ffmpeg = spawn(ffmpegPath, [
           "-ss",
           seek,
           "-i",
           target,
           "-vf",
           `thumbnail,scale=${width}:${height}`,
           "-qscale:v",
           "2",
           "-frames:v",
           "1",
           "-f",
           "image2",
           "-c:v",
           "mjpeg",
           "pipe:1"
         ]);

         ffmpeg.stdout.pipe(tmpFile);
         ffmpeg.on("close", function(code) {
             console.log('code: ' + code);
           tmpFile.end();
           resolve();
         });

         ffmpeg.on("error", function(err) {
           console.log(err);
           reject();
         });
       });
     }

     function uploadToS3() {
       return new Promise((resolve, reject) => {
         let tmpFile = createReadStream(`/tmp/screenshot.jpg`);
         let dstKey = srcKey
           .replace(/\.\w+$/, `.jpg`)
           .replace("test/", "test/shots/");
         //const screensFile = "test/shots/";
         console.log("dstKey: " + dstKey);
         var params = {
           Bucket: bucket,
           Key: dstKey,
           Body: tmpFile,
           ContentType: `image/jpg`
         };

         s3.upload(params, function(err, data) {
           if (err) {
             console.log(err);
             reject();
           }
           console.log(`successful upload to ${bucket}/${dstKey}`);
           resolve();
         });
       });
     }

     await createImage(1);
     await uploadToS3();
     return console.log(`processed ${bucket}/${srcKey} successfully`);
    };

    When I test it I receive these logs :

  • srcKey : test/0255f240-efef-11e9-862e-3949600f0ec9.mp4
  • bucket : video.devel.abc.com
  • INFO processed video.devel.abc.com successfully
  • code : 1
  • bucket : video.devel.abc.com
  • dstKey : test/shots/0255f240-efef-11e9-862e-3949600f0ec9.jpg
  • successful upload to video.devel.abc.com/test/shots/0255f240-efef-11e9-862e-3949600f0ec9.jpg
  • processed video.devel.abc.com/test/0255f240-efef-11e9-862e-3949600f0ec9.mp4 successfully
  • So file is really created, but it is empty (size is 0 B), which is not ideal.

Boussole SPIP

SPIP.net-La documentation officielle et téléchargement de (...) SPIP Code-La documentation du code de SPIP Programmer SPIP-La documentation pour développer avec (...) Traduire SPIP-Espace de traduction de SPIP et de ses (...) Plugins SPIP-L'annuaire des plugins SPIP SPIP-Contrib-L'espace des contributions à SPIP Forge SPIP-L'espace de développement de SPIP et de ses (...) Discuter sur SPIP-Les nouveaux forums de la communauté (...) SPIP Party-L'agenda des apéros et autres rencontres (...) Médias SPIP-La médiathèque de SPIP SPIP Syntaxe-Tester l'édition de texte dans SPIP