Recherche avancée

Médias (1)

Mot : - Tags -/école

Autres articles (80)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

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

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

Sur d’autres sites (8107)

  • Subtract a specific string from a variable in a for loop

    14 octobre 2020, par Filip

    I am making a file converter with batch using FFMPEG.

    


    I have encountered a problem when trying to subtract the name of a file from the complete link to the file to get the directory of the folder it is in so after the file is converted it can be put into that directory.

    


    Can someone advise me on how I could subtract the string from the filename variable from the string in the directory

    


    My code :

    


    @echo off
SETLOCAL ENABLEDELAYEDEXPANSION
set filetype=.flac
for /R %%a in ("*%filetype%*") do (
    set directory=%%a
    set filename=%%~na%filetype%
    set convdir=!directory:%filename%=!
    echo !convdir!
    pause
    ffmpeg -i "%%a" "convdir%%~na.wav"
    echo Converted %%a
)
echo Convertion Done!
pause


    


  • Writing an MP4 slideshow video to S3 using the Lambda FFmpeg Layer

    15 avril 2020, par Gracie

    I am using AWS Lambda with the FFmpeg layer to try and build a 15 second MP4 file (beach.mp4) - from 3 static images that show for 3, 5 and 7 seconds in sequence.
These 3 images are within my Lambda upload deployment zip on S3, along with the sequence.txt file needed for the function.

    



    SEQUENCE.TXT

    



    file beach1.jpg
outpoint 3
file beach2.jpg
outpoint 8
file beach3.jpg
outpoint 15

    



    FFMPEG COMMAND

    



    ffmpeg -f concat -i sequence.txt -c:v libx264 -tune stillimage -c:a aac -b:a 192k -pix_fmt yuv420p -shortest beach.mp4

    



    I am writing a file to S3, but it is blank, only 15 bytes. So doesn't contain the MP4 file created by FFmpeg. I think this has something to do with sync or streaming the video file so both the txt can be read and the MP4 can be written to a file, but not sure.

    



    How can I read the .txt contents and then write the ffmpeg command to a file in /tmp/ ?

    



    You can download or view the files at https://lifeisabeach.netlify.app/
(For some strange reason the MP4 length when built locally is 19 seconds, when it should be 15 !)

    



    const util = require('util');
const AWS = require('aws-sdk');
const s3 = new AWS.S3();
const { readFileSync, writeFileSync, unlinkSync, writeFile, readdir } = require('fs');
//const fs = require('fs');
const path = require('path');
const { spawnSync } = require('child_process');

exports.handler = async (event, context, callback) => {

    const outputBucket = 'mys3bucket';
    const sequenceTXT = "sequence.txt";

    // FFmpeg creates the file, using the contents of sequence.txt to create timed image slides
    const mp4create = await spawnSync(
        '/opt/bin/ffmpeg',
        [
            '-f',
            'concat',
            '-i',
            sequenceTXT,
            '-c:v',
            'libx264',
            '-tune',
            'stillimage',
            '-c:a',
            'aac',
            '-b:a',
            '192k',
            '-pix_fmt',
            'yuv420p',
            '-shortest',
            'beach.mp4'
        ]
    );

    // Write ffmpeg output to a file in /tmp/
    const writeMP4File = util.promisify(writeFile);
    await writeMP4File('/tmp/beach.mp4', mp4create, 'binary');
    console.log('MP4 content written to /tmp/');

    // Copy MP4 data to a variable to enable write to S3 Bucket
    let result = mp4create;
    console.log('MP4 Result contents ', result);

    const vidFile = readFileSync('/tmp/beach.mp4');

    // Set S3 bucket details and put MP4 file into S3 bucket from /tmp/
    const s3 = new AWS.S3();
    const params = {
        Bucket: outputBucket,
        Key: 'beach.mp4',
        ACL: 'private',
        Body: vidFile
    };

    // Put MP4 file from AWS Lambda function /tmp/ to an S3 bucket
    const s3Response = await s3.putObject(params).promise();
    callback(null, s3Response);

};


    


  • Using AForge.Net for commercial closed-source applications

    22 mars 2015, par ilay zeidman

    I have application that our company want to make a product from.
    The application uses AForge.Net and in the AForge.Video.FFMPEG.dll which is under
    GPL v3 license. You can see AForge.net license

    My question : can I use this dll in my product ? Do my product have to be under gpl3 and the source should be available ?