Recherche avancée

Médias (0)

Mot : - Tags -/auteurs

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

Autres articles (111)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs

    12 avril 2011, par

    La manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
    Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras.

  • Récupération d’informations sur le site maître à l’installation d’une instance

    26 novembre 2010, par

    Utilité
    Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
    Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...)

Sur d’autres sites (9222)

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