Recherche avancée

Médias (0)

Mot : - Tags -/content

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

Autres articles (28)

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

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

  • Création définitive du canal

    12 mars 2010, par

    Lorsque votre demande est validée, vous pouvez alors procéder à la création proprement dite du canal. Chaque canal est un site à part entière placé sous votre responsabilité. Les administrateurs de la plateforme n’y ont aucun accès.
    A la validation, vous recevez un email vous invitant donc à créer votre canal.
    Pour ce faire il vous suffit de vous rendre à son adresse, dans notre exemple "http://votre_sous_domaine.mediaspip.net".
    A ce moment là un mot de passe vous est demandé, il vous suffit d’y (...)

Sur d’autres sites (4421)

  • FFMPEG for aws s3 bucket signed url not working in node js

    21 août 2018, par ahmed sharief

    I am trying to create thumbnails from an amazon s3 bucket signed url. I am able to generate thumbnails when i run the command in terminal

    ffmpeg -ss 00:00:02 -i "https://test-s3-bucket.s3.ap-south-1.amazonaws.com/user_gallery_assets/5b6936069ac2bf0602085367/gallery/images/5b7be08527641dee8c1f8134.mp4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=xxxxxxxxx%2F20180821%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Date=20180821T095101Z&X-Amz-Expires=900&X-Amz-Signature=d7f81f4eed3d6c87c04dc1b0ad06beeb946afa33d417585f57fad72aeadb3ac0&X-Amz-SignedHeaders=host" -vframes 1 -q:v 2 -f image2 output.jpg

    I am running the above command in terminal and its working fine but when i try to implement the same in node js its showing "no such file or directory error". Though i am encoding the url with double quotes then also its showign same error. Here is my node js code....

    function uploadThumbNailForVideo(obj,url, thumb_url){
       return new Promise((resolve, reject) => resolve(url))
       .then((url) => awsHelper.getImage(url))
       .then((result) => {

           var resUrl = "\""+result+"\"";

           var args = [
               '-i', resUrl,
               '-ss', '00:00:02',
               '-vframes', '1',
               '-f','image2',
               'output.jpg'
           ]
           //console.log(args)
           var ffmpeg = require('child_process').spawn('ffmpeg', args);

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

           ffmpeg.on('close', function (code) {

           });

           ffmpeg.stderr.on('data', function (data) {
               var tData = data.toString('utf8');
               var a = tData.split('\n');
               console.log("A",a);
           });

           ffmpeg.stdout.on('data', function (data) {
               //
           });


       });

    }

    and i am getting the following error

    A [ 'ffmpeg version 4.0.2 Copyright (c) 2000-2018 the FFmpeg
    developers' ]
    A [ '',
     '  built with Apple LLVM version 9.1.0 (clang-902.0.39.2)',
     '  configuration: --prefix=/usr/local/Cellar/ffmpeg/4.0.2 --enable-
    shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --
    enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-
    gpl --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-
    opencl --enable-videotoolbox --disable-lzma',
      '  libavutil      56. 14.100 / 56. 14.100',
      '  libavcodec     58. 18.100 / 58. 18.100',
     '  libavformat    58. 12.100 / 58. 12.100',
     '  libavdevice    58.  3.100 / 58.  3.100',
     '  libavfilter     7. 16.100 /  7. 16.100',
     '  libavresample   4.  0.  0 /  4.  0.  0',
     '  libswscale      5.  1.100 /  5.  1.100',
     '  libswresample   3.  1.100 /  3.  1.100',
     '  libpostproc    55.  1.100 / 55.  1.100',
     '"https://test-s3-bucket.s3.ap-south-1.amazonaws.com/user_gallery_assets/5b6936069ac2bf0602085367/gallery/images/5b7be08527641dee8c1f8134.mp4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=xxxxxxxxx%2F20180821%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Date=20180821T095101Z&X-Amz-Expires=900&X-Amz-Signature=d7f81f4eed3d6c87c04dc1b0ad06beeb946afa33d417585f57fad72aeadb3ac0&X-Amz-SignedHeaders=host": No such file or directory',
     '' ]

    ffmpeg exited with code 1
  • 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 ??