Recherche avancée

Médias (1)

Mot : - Tags -/école

Autres articles (67)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

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

  • Submit bugs and patches

    13 avril 2011

    Unfortunately a software is never perfect.
    If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
    If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
    You may also (...)

Sur d’autres sites (10398)

  • Evolution #3964 : mise en forme minimum des formulaires

    26 mars 2018, par nico d_

    Et encore un dans theme.css :

    @media print 
    

    /* Ne pas imprimer */
    .spip-admin,
    .spip-admin-float,
    .spip-previsu display : none ;
    .repondre,
    .formulaire_spip display : none ;
    ...

    Pas de pitié pour les formulaires :p

    Je serais plutôt d’avis de ne garder que ça dans spip.css :

    @media print 
        .forum-titre, .formulaire_forum  display : none ; 
    
    
  • Upload FFmpeg output directly to Amazon S3

    26 octobre 2017, par user1790300

    I am using the fluent-ffmpeg library with node.js to transcode videos originally in a flash movie format to the mp3 format with multiple resolutions, 1080p, etc.. Once the transcoding is complete, I would like to move the transcoded video to an s3 bucket.

    I pull the original .flv file from a source s3 bucket and pass the stream to the ffmpeg constructor function. The issue is after the transcoding completes, how do I then get the stream of the mp4 data to send to s3.

    Here is the code I have so far :

           var params = {
               Bucket: process.env.SOURCE_BUCKET,
               Key: fileName
           };
           s3.getObject(params, function(err, data) {
               if (err) console.log(err, err.stack); // an error occurred

               var format = ffmpeg(data)
               .size('854x480')
               .videoCodec('libx264')
               .format('flv')
               .toFormat('mp4');
               .on('end', function () {
                   //Ideally, I would like to do the uploading here

                   var params = {
                      Body: //{This is my confusion, how do I get the stream to add here?},
                      Bucket: process.env.TRANSCODED_BUCKET,
                      Key: fileName
                   };
                   s3.putObject(params, function (err, data) {

                  });
               })
               .on('error', function (err) {
                   console.log('an error happened: ' + err.message);
               });

           });

    For the code above, where can I get the transcoded stream to add to the "Body" property of the params object ?

    Update :

    Here is a revision of what I am trying to do :

    var outputStream: MemoryStream = new MemoryStream();

           var proc = ffmpeg(currentStream)
               .size('1920x1080')
               .videoCodec('libx264')
               .format('avi')
               .toFormat('mp4')
               .output(outputStream)
               // setup event handlers
               .on('end', function () {
                   uploadFile(outputStream, "").then(function(){
                       resolve();
                   })
               })
               .on('error', function (err) {
                   console.log('an error happened: ' + err.message);
               });

    I would like to avoid copying the file to the local filesystem from s3, rather I would prefer to process the file in memory and upload back to s3 when finished. Would fluent-ffmpeg allow this scenario ?

  • AWS Lambda - FFmpeg to extract frames doesn't write anything

    7 avril 2024, par Stormsson

    I have a lambda with a ffmpeg layer on it.

    


    The command i want to use is basically

    


    ffmpeg -i video.mp4 -qscale:v 2 -vf fps=8 '%04d.jpg'


    


    so it has an input file, and creates 8 frames per second in the same folder

    


    This code seems to do everything except writing the files, what am I missing ?

    


    import ...
SIGNED_URL_TIMEOUT = 60
FPS_SAMPLES = 8

def lambda_handler(event, context):
    # Set up logging.
    logger = logging.getLogger(__name__)

    s3_client = boto3.client('s3')

    s3_source_bucket = event['Records'][0]['s3']['bucket']['name']
    s3_source_key = event['Records'][0]['s3']['object']['key']

    s3_source_basename = os.path.splitext(os.path.basename(s3_source_key))[0]

    logger.info( "bucket: %s, key: %s, basename: %s",s3_source_bucket, s3_source_key, s3_source_basename)

    s3_source_signed_url = s3_client.generate_presigned_url('get_object',
    Params={'Bucket': s3_source_bucket, 'Key': s3_source_key},
    ExpiresIn=SIGNED_URL_TIMEOUT)

    with tempfile.TemporaryDirectory() as tmpdir:
        os.chdir(tmpdir) # change the current folder to that one (current one is in     os.getcwd())
        cwd = os.getcwd()
        ffmpeg_cmd = "/opt/bin/ffmpeg -i \"" + s3_source_signed_url + "\" -qscale:v 2 -vf fps="+str(FPS_SAMPLES)+" "+ cwd + "/'%04d.jpg'"
    print("COMMAND: "+ffmpeg_cmd)
    
        command1 = shlex.split(ffmpeg_cmd)
        p1 = subprocess.run(command1, stdout=subprocess.PIPE, stderr=subprocess.PIPE)

        # List all files and directories in the current directory
        contents = os.listdir(cwd)
    
        # Print the contents
        print(f"Contents of {cwd}:")
        for item in contents:
            print(item) # <--- NOthing here...

   
return {
    'statusCode': 200,
    'body': json.dumps("bucket: %s, key: %s, basename: %s" % (s3_source_bucket, s3_source_key, s3_source_basename))
}