Recherche avancée

Médias (0)

Mot : - Tags -/objet éditorial

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (35)

  • Pas question de marché, de cloud etc...

    10 avril 2011

    Le vocabulaire utilisé sur ce site essaie d’éviter toute référence à la mode qui fleurit allègrement
    sur le web 2.0 et dans les entreprises qui en vivent.
    Vous êtes donc invité à bannir l’utilisation des termes "Brand", "Cloud", "Marché" etc...
    Notre motivation est avant tout de créer un outil simple, accessible à pour tout le monde, favorisant
    le partage de créations sur Internet et permettant aux auteurs de garder une autonomie optimale.
    Aucun "contrat Gold ou Premium" n’est donc prévu, aucun (...)

  • 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

  • Le plugin : Podcasts.

    14 juillet 2010, par

    Le problème du podcasting est à nouveau un problème révélateur de la normalisation des transports de données sur Internet.
    Deux formats intéressants existent : Celui développé par Apple, très axé sur l’utilisation d’iTunes dont la SPEC est ici ; Le format "Media RSS Module" qui est plus "libre" notamment soutenu par Yahoo et le logiciel Miro ;
    Types de fichiers supportés dans les flux
    Le format d’Apple n’autorise que les formats suivants dans ses flux : .mp3 audio/mpeg .m4a audio/x-m4a .mp4 (...)

Sur d’autres sites (4805)

  • FFmpeg transcoding on Lambda results in unusable (static) audio

    17 mai 2020, par jmkmay

    I'd like to move towards serverless for audio transcoding routines in AWS. I've been trying to setup a Lambda function to do just that ; execute a static FFmpeg binary and re-upload the resulting audio file. The static binary I'm using is here.

    



    The Lambda function I'm using in Python looks like this :

    



    import boto3

s3client = boto3.client('s3')
s3resource = boto3.client('s3')

import json
import subprocess 

from io import BytesIO

import os

os.system("cp -ra ./bin/ffmpeg /tmp/")
os.system("chmod -R 775 /tmp")

def lambda_handler(event, context):

    bucketname = event["Records"][0]["s3"]["bucket"]["name"]
    filename = event["Records"][0]["s3"]["object"]["key"]

    audioData = grabFromS3(bucketname, filename)

    with open('/tmp/' + filename, 'wb') as f:
        f.write(audioData.read())

    os.chdir('/tmp/')

    try:
        process = subprocess.check_output(['./ffmpeg -i /tmp/joe_and_bill.wav /tmp/joe_and_bill.aac'], shell=True, stderr=subprocess.STDOUT)
        pushToS3(bucketname, filename)
        return process.decode('utf-8')
    except subprocess.CalledProcessError as e:
        return e.output.decode('utf-8'), os.listdir()


def grabFromS3(bucket, file):

    obj = s3client.get_object(Bucket=bucket, Key=file)
    data = BytesIO(obj['Body'].read())

    return(data)

def pushToS3(bucket, file):

    s3client.upload_file('/tmp/' + file[:-4] + '.aac', bucket, file[:-4] + '.aac')

    return


    



    You can listen to the output of this here. WARNING : Turn your volume down or your ears will bleed.

    



    The original file can be heard here.

    



    Does anyone have any idea what might be causing the encoding errors ? It doesn't seem to be an issue with the file upload, since the md5 on the Lambda fs matches the MD5 of the uploaded file.

    



    I've also tried building the static binary on an Amazon Linux instance in EC2, then zipping and porting it into the Lambda project, but the same issue persists.

    



    I'm stumped ! :(

    


  • Transcode video with php ffmpeg library

    27 juin 2019, par dev

    I need to upload video in 3 formate/resolution as 360p, 480p, 720p.

    After some research i got to know that some paid service are there like Amazone Elastic Transcoder . But i want to do with open source so i found FFMPEG.

    Also i want to upload video on Amazon s3 after transcode and video are in big size like video may contain 1GB size.

    I got php library for FFMPEG Library Link

    I have installed ffmpeg and it successfully generate new video. But i cannot figure out that how can i generate different formate/resolution as 360p, 480p, 720p.

    My sample Code is

           error_reporting(E_ALL);
           ini_set('display_errors', 1);

           require 'vendor/autoload.php';

           //$ffmpeg = FFMpeg\FFMpeg::create();
           $video = $ffmpeg->open('assets/small.mp4');
           $video
               ->filters()
               ->resize(new FFMpeg\Coordinate\Dimension(320, 240))
               ->synchronize();
           $video
               ->frame(FFMpeg\Coordinate\TimeCode::fromSeconds(2))
               ->save('assets/frame.jpg');

           $format = new FFMpeg\Format\Video\X264();
           $format->setAudioCodec("libmp3lame");

           $video->save($format, 'assets/new.mp4');

    Can anyone suggest me any way that how can i achieve this ??

  • How to get the thumbnail of base64 encoded video file in Nodejs ?

    3 octobre 2018, par Wai Yan Hein

    I am developing a web application using Nodejs. I am using Amazon S3 bucket to store files. What I am doing now is that when I upload a video file (mp4) to the S3 bucket, I will get the thumbnail photo of the video file from the lambda function. For fetching the thumbnail photo of the video file, I am using this package - https://www.npmjs.com/package/ffmpeg. I tested the package locally on my laptop and it is working.

    Here is my code tested on my laptop

    var ffmpeg = require('ffmpeg');

    module.exports.createVideoThumbnail = function(req, res)
    {
       try {
           var process = new ffmpeg('public/lalaland.mp4');
           process.then(function (video) {

               video.fnExtractFrameToJPG('public', {
                   frame_rate : 1,
                   number : 5,
                   file_name : 'my_frame_%t_%s'
               }, function (error, files) {
                   if (!error)
                       console.log('Frames: ' + files);
                   else
                       console.log(error)
               });

           }, function (err) {
               console.log('Error: ' + err);
           });
       } catch (e) {
           console.log(e.code);
           console.log(e.msg);
       }
       res.json({ status : true , message: "Video thumbnail created." });
    }

    The above code works well. It gave me the thumbnail photos of the video file (mp4). Now, I am trying to use that code in the AWS lambda function. The issue is the above code is using video file path as the parameter to fetch the thumbnails. In the lambda function, I can only fetch the base 64 encoded format of the file. I can get id (s3 path) of the file, but I cannot use it as the parameter (file path) to fetch the thumbnails as my s3 bucket does not allow public access.

    So, what I tried to do was that I tried to save the base 64 encoded video file locally in the lambda function project itself and then passed the file path as the parameter for fetching the thumbnails. But the issue was that AWS lamda function file system is read-only. So I cannot write any file to the file system. So what I am trying to do right now is to retrieve the thumbnails directly from the base 64 encoded video file. How can I do it ?