Recherche avancée

Médias (0)

Mot : - Tags -/xmlrpc

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

Autres articles (37)

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

  • Contribute to documentation

    13 avril 2011

    Documentation is vital to the development of improved technical capabilities.
    MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
    To contribute, register to the project users’ mailing (...)

  • Ajouter notes et légendes aux images

    7 février 2011, par

    Pour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
    Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
    Modification lors de l’ajout d’un média
    Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)

Sur d’autres sites (5244)

  • net core and video transcoding on aws lambda

    14 septembre 2022, par user1765862

    I'm looking for a solution to :

    


      

    1. upload video to s3 bucket
    2. 


    3. after video upload an aws lambda function will be triggered
    4. 


    5. lambda function will use ffmpeg layer in order to transcode video (mainly cropping with other functionalities)
    6. 


    7. save result (transcoded video into s3 bucket)
    8. 


    


    My language of choice inside lambda is c# and net core runtime.

    


    I have found various resources for video manipulation with aws ffmpeg layer using lambda function but no examples in net core lambda.

    


    My question is :

    


    


    Can I use existing FFmpeg/FFprobe Lambda Layer for Amazon Linux such
as this one with lambda function written in c# and .net core ?

    


    


    Another question :

    


    


    Would you suggest Amazon Elastic Transcoder as a better choice with
lambda function .net core integration ?

    


    


  • Lambda/ffmpeg timelapse generation - output zero bytes, can't debug ffmpeg

    25 août 2021, par GoOutside

    I am attempting to use an AWS Lambda FFMPEG layer to build a timelapse of static images in an S3 bucket. To begin, I am basing my project off of the tutorial located here.

    


    I can replicate the steps in the tutorial, so I know the FFMPEG layer is working in Lambda. I have replicated the FFMPEG commands on a standalone server, so I know they are correct.

    


    Here is my setup : I have two S3 buckets, lambda-source-bucket and lambda-destination-bucket. The contents of lambda-source-bucket are :

    


    1.jpg
2.jpg
3.jpg
4.jpg
5.jpg
6.jpg
7.jpg
files.txt


    


    The files.txt contains this :

    


    file 'https://lambda-source-bucket.s3.us-west-2.amazonaws.com/1.jpg'
file 'https://lambda-source-bucket.s3.us-west-2.amazonaws.com/2.jpg'
file 'https://lambda-source-bucket.s3.us-west-2.amazonaws.com/3.jpg'
file 'https://lambda-source-bucket.s3.us-west-2.amazonaws.com/4.jpg'
file 'https://lambda-source-bucket.s3.us-west-2.amazonaws.com/5.jpg'
file 'https://lambda-source-bucket.s3.us-west-2.amazonaws.com/6.jpg'
file 'https://lambda-source-bucket.s3.us-west-2.amazonaws.com/7.jpg'


    


    This is my Lambda function code (in Python) :

    


    import json
import os
import subprocess
import shlex
import boto3

S3_DESTINATION_BUCKET = "lambda-destination-bucket"
SIGNED_URL_TIMEOUT = 60

def lambda_handler(event, context):

    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]
    s3_destination_filename = "timelapse.mp4"

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

    ffmpeg_cmd = "/opt/bin/ffmpeg -y -r 24 -f concat -safe 0 -protocol_whitelist file,http,tcp,https,tls -I ""https://lambda-source-bucket.s3.us-west-2.amazonaws.com/files.txt"" -c copy -s 1024x576 -vcodec libx264 -"    
command1 = shlex.split(ffmpeg_cmd)
    p1 = subprocess.run(command1, stdout=subprocess.PIPE, stderr=subprocess.PIPE)

    resp = s3_client.put_object(Body=p1.stdout, Bucket=S3_DESTINATION_BUCKET, Key=s3_destination_filename)

    return {
        'statusCode': 200,
        'body': json.dumps('Processing complete successfully')
    }


    


    The trigger for the Lambda function is when a new files.txt file is added to lambda-source-bucket.

    


    So far I have been able to get the trigger to fire, the function supposedly runs without errors (in Cloudwatch), and the function creates a new timelapse.mp4 in the lambda-destination-bucket. But this file is 0 bytes. I see no FFMPEG errors in the Cloudwatch console, though I am not sure I know how to configure my Lambda function code to log FFMPEG errors.

    


    Also : if I'm going about this in a totally wrong way, I'd love to hear feedback. I'm guessing that the concat and files.txt method of looping through https:// is not the most efficient way to do this, but it's the only way I can figure this out so far.

    


    Any help is most sincerely and humbly appreciated.

    


  • Python Lambda function and ffmpeg command with stdout from jpg to ts file

    28 juillet 2021, par Sflagg

    I have a AWS Lambda Python function setup to process jpg and convert it to a ts file.

    


    I followed these instructions https://aws.amazon.com/blogs/media/processing-user-generated-content-using-aws-lambda-and-ffmpeg/ but changed the command from vfr to cfr conversion to a jpg to ts conversion.

    


    This is the command I am using

    


    ffmpeg_cmd = "/opt/bin/ffmpeg -r 30000/1001 -loop 1 -i \"" + s3_source_signed_url + "\" -f lavfi -i anullsrc=channel_layout=stereo:sample_rate=48000 -t 30 -vcodec libx264 -crf 23 -s 1920x1080 -r 30000/1001 -g 150 -pix_fmt yuv420p -acodec aac -b:a 96k -ar 48000 -"

    


    Everything else is basically the same from the AWS article besides having s3 triggers in my Lambda look for jpeg and jpg suffixes.

    


    But this results in 0 byte ts file.

    


    I have a hunch that I need to modify the command that has a seekable output format (e.g. mpegts) when writing to stdout ; currently my command is likely not working for stdout and that is why I get an empty ts file. But I am having trouble formatting the command correctly. Any help with this would be greatly appreciated !