Recherche avancée

Médias (16)

Mot : - Tags -/mp3

Autres articles (74)

  • Demande de création d’un canal

    12 mars 2010, par

    En fonction de la configuration de la plateforme, l’utilisateur peu avoir à sa disposition deux méthodes différentes de demande de création de canal. La première est au moment de son inscription, la seconde, après son inscription en remplissant un formulaire de demande.
    Les deux manières demandent les mêmes choses fonctionnent à peu près de la même manière, le futur utilisateur doit remplir une série de champ de formulaire permettant tout d’abord aux administrateurs d’avoir des informations quant à (...)

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

  • Gestion de la ferme

    2 mars 2010, par

    La ferme est gérée dans son ensemble par des "super admins".
    Certains réglages peuvent être fais afin de réguler les besoins des différents canaux.
    Dans un premier temps il utilise le plugin "Gestion de mutualisation"

Sur d’autres sites (10540)

  • Convert s3 video files resolution and store it back to s3

    5 avril 2019, par Pritam Roy

    I want to convert s3 bucket video file resolutions to other resolutions and store it back to s3.
    I know we can use ffmpeg locally to change the resolution.
    Can we use ffmpeg to convert s3 files and store it back using Django ?

    I am puzzled as from where to start and what should be the process.
    Whether I should have the video file from s3 bucket in buffer and then convert it using ffmpeg and then upload it back to s3.
    Or is there anyway to do it directly without having to keep it in buffer.

  • Creating GIF with FFMPEG in AWS Lambda creates an empty gif ?

    29 décembre 2020, par blablubla12

    I'm trying to create a gif using an existing command (which I have no idea what it's doing as I don't really understand ffmpeg). That command worked perfectly on a C# Console App (as a string), however once I migrated to AWS Lambda (Node.js 12.x - which I'm also new at) it uploads an empty gif (0 B). Here is a part of the code :

    


    const bucket = eventObject.BucketName;
const srcKey = eventObject.ObjectKey;
const target = s3.getSignedUrl('getObject', { Bucket: bucket, Key: srcKey, Expires: 1000 });
const overlayTarget = s3.getSignedUrl('getObject', { Bucket: bucket, Key: 'overlays/overlay.png', Expires: 1000 });
const fileName = guid + "_gif.gif";
const tempPath = '/tmp/' + fileName;

function CreateGif() {
    return new Promise((resolve, reject) => {

        const ffmpeg = spawn(ffmpegPath, [
            "-ss",
            eventObject.GifTimecode,
            "-i",
            target,
            "-i",
            overlayTarget,
            "-filter_complex",
            `[0:v] trim = duration = ${eventObject.GifDuration}, setpts = PTS - STARTPTS, scale = 450:-1[trimmed]; [trimmed] split[trimmed1][trimmed2];     [trimmed2] reverse[rev];     [trimmed1] [rev] concat=n=2:v=1:a=0 [v];     [v] [1:v] overlay=0:0:format=rgb[overlayed];     [overlayed] split[a][b];     [a] palettegen=stats_mode=diff[palette];     [b] [palette] paletteuse=bayer:bayer_scale=3.5[out] `,
            "-map",
            '[out]',
            tempPath
        ]);

        ffmpeg.stderr.setEncoding('utf8');
        ffmpeg.stderr.on('data', (data) => {
            console.log(data);
        });

        ffmpeg.on('close', function (code) {
            console.log('closed');
            resolve();
        });

        ffmpeg.on('error', function (err) {
            console.log(err);
            reject();
            throw new Error(err);
        });
    });
}

function uploadToS3() {
    return new Promise((resolve, reject) => {
        let tmpFile = createReadStream(tempPath);

        var params = {
            Bucket: bucket,
            Key: 'gifs/' + fileName,
            Body: tmpFile,
            ContentType: `image/gif`
        };

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

await CreateGif();
await uploadToS3();


    


    I'm sure the issue is the args that are being passed, however I've not found a way to separate the args in the array in a way that works.

    


    Here's the same command in C# (this one works fine) :

    


    var command = "-ss " + timeCode + " -i "
                  + "\"" + videoPath + "\""
                  + " -i "
                  + "\"" + path + "/" + imageOverlayFilePath + "\" "
                  + " -filter_complex "
                  + "\""
                  + $"[0:v] trim = duration = {gifDuration}, setpts = PTS - STARTPTS, scale = 450:-1[trimmed]; [trimmed] split[trimmed1][trimmed2];     [trimmed2] reverse[rev];     [trimmed1] [rev] concat=n=2:v=1:a=0 [v];     [v] [1:v] overlay=0:0:format=rgb[overlayed];     [overlayed] split[a][b];     [a] palettegen=stats_mode=diff[palette];     [b] [palette] paletteuse=bayer:bayer_scale=3.5[out] "
                  + "\""
                  + " -map [out] "
                  + "\"" + output + "\"";


    


    How do I separate the command string in the args array spawn(ffmpegPath, [])

    


  • How to add a watermark to video on firebase storage using ffmpeg

    31 décembre 2020, par awabs

    I am trying to add a watermark to a video using firebase functions and ffmpeg, but I do know the right code for it. I know is that ffmpen is now available in google cloud env so this approach should work.
Any help is appreciated.

    


    const functions = require('firebase-functions');
const { Storage } = require('@google-cloud/storage');
const projectId = 'video-demo-a57fa';
let gcs = new Storage ({
  projectId
});
const os =require('os');
const path =require('path');
const spawn = require('child-process-promise').spawn;


exports.addLogo = functions.storage.object().onFinalize(event =>{
   
    const bucket =event.bucket;
    const contentType =event.contentType;
    const filePath =event.name;
    console.log(path.dirname(filePath));

    console.log('File change detected, function execution started');


    if (path.basename(filePath).startsWith('resized-')) {
        console.log('We already renamed that file!');
        return;
    }

    const destBucket = gcs.bucket(bucket);
    const tmpFilePath = path.join(os.tmpdir(), path.basename(filePath));
    const metadata = { contentType: contentType };
    return destBucket.file(filePath).download({
        destination: tmpFilePath
    }).then(()=>{
        return spawn('ffmpeg',['-i', 'video.mp4'], tmpFilePath )
    }).then(() => {
        console.log(tmpFilePath);
        return destBucket.upload(tmpFilePath, {
            destination: path.dirname(filePath)+'/resized-' + path.basename(filePath),
            metadata: metadata
            
        })
    }).catch(err=>{
        console.log(err);
    });
})