
Recherche avancée
Autres articles (40)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...) -
Use, discuss, criticize
13 avril 2011, parTalk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
A discussion list is available for all exchanges between users.
Sur d’autres sites (5863)
-
net core and video transcoding on aws lambda
14 septembre 2022, par user1765862I'm looking for a solution to :


- 

- upload video to s3 bucket
- after video upload an aws lambda function will be triggered
- lambda function will use ffmpeg layer in order to transcode video (mainly cropping with other functionalities)
- save result (transcoded video into s3 bucket)










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 GoOutsideI 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
andlambda-destination-bucket
. The contents oflambda-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 tolambda-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 thelambda-destination-bucket
. But this file is0 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
andfiles.txt
method of looping throughhttps://
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 SflaggI 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 !