
Recherche avancée
Médias (1)
-
1 000 000 (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
Autres articles (96)
-
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 ) (...) -
Publier sur MédiaSpip
13 juin 2013Puis-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
Sur d’autres sites (5726)
-
ffmpeg + AWS Lambda issues. Won't compress full video
7 juillet 2022, par Joesph Stah LynnSo I followed this tutorial to set everything up, and changed the function a bit to compress video, but no matter what I try, on larger videos (basically anything over 50-100MB), the output file will always be cut short, and depending on the encoding settings I'm using, will be cut by different amounts. I tried using the solution found here, adding a -nostdin flag to my ffmpeg command, but that also didn't seem to fix the issue.

Another odd thing, is no matter what I try, if I remove the '-f mpegts' flag, the output video will be 0B.

My Lambda function is set up with 3008MB of Memory (submitted a ticket to get my limit upped so I can use the full 10240MB available), and 2048MB of Ephemeral storage (I honestly am not sure if I need anything more than the minimum 512, but I upped it to try and fix the issue). When I check my cloudwatch logs, on really large files, it will occasionally time out, but other than that, I will get no error messages, just the standard start, end, and billable time messages.

This is the code for my lambda function.


import json
import os
import subprocess
import shlex
import boto3

S3_DESTINATION_BUCKET = "rw-video-out"
SIGNED_URL_TIMEOUT = 600

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 = s3_source_basename + "-comp.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 = f"/opt/bin/ffmpeg -nostdin -i {s3_source_signed_url} -f mpegts libx264 -preset fast -crf 28 -c:a copy - "
 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)
 s3 = boto3.resource('s3')
 s3.Object(s3_source_bucket,s3_source_key).delete()

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



This is the code from the solution I mentioned, but when I try using this code, I get output.mp4 not found errors


def lambda_handler(event, context):
 print(event)
 os.chdir('/tmp')
 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 = s3_source_basename + ".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)
 print(s3_source_signed_url)
 s3_client.download_file(s3_source_bucket,s3_source_key,s3_source_key)
 # ffmpeg_cmd = "/opt/bin/ffmpeg -framerate 25 -i \"" + s3_source_signed_url + "\" output.mp4 "
 ffmpeg_cmd = f"/opt/bin/ffmpeg -framerate 25 -i {s3_source_key} output.mp4 "
 # command1 = shlex.split(ffmpeg_cmd)
 # print(command1)
 os.system(ffmpeg_cmd)
 # os.system('ls')
 # p1 = subprocess.run(command1, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
 file = 'output.mp4'
 resp = s3_client.put_object(Body=open(file,"rb"), Bucket=S3_DESTINATION_BUCKET, Key=s3_destination_filename)
 # resp = s3_client.put_object(Body=p1.stdout, Bucket=S3_DESTINATION_BUCKET, Key=s3_destination_filename)
 s3 = boto3.resource('s3')
 s3.Object(s3_source_bucket,s3_source_key).delete()
 return {
 'statusCode': 200,
 'body': json.dumps('Processing complete successfully')
 }



Any help would be greatly appreciated.


-
lavc/aarch64 : motion estimation functions in neon
26 juin 2022, par Swinney, Jonathanlavc/aarch64 : motion estimation functions in neon
- ff_pix_abs16_neon
- ff_pix_abs16_xy2_neonIn direct micro benchmarks of these ff functions verses their C implementations,
these functions performed as follows on AWS Graviton 3.ff_pix_abs16_neon :
pix_abs_0_0_c : 141.1
pix_abs_0_0_neon : 19.6ff_pix_abs16_xy2_neon :
pix_abs_0_3_c : 269.1
pix_abs_0_3_neon : 39.3Tested with :
./tests/checkasm/checkasm —test=motion —bench —disable-linux-perfSigned-off-by : Jonathan Swinney <jswinney@amazon.com>
Signed-off-by : Martin Storsjö <martin@martin.st>- [DH] libavcodec/aarch64/Makefile
- [DH] libavcodec/aarch64/me_cmp_init_aarch64.c
- [DH] libavcodec/aarch64/me_cmp_neon.S
- [DH] libavcodec/me_cmp.c
- [DH] libavcodec/me_cmp.h
- [DH] tests/checkasm/Makefile
- [DH] tests/checkasm/checkasm.c
- [DH] tests/checkasm/checkasm.h
- [DH] tests/checkasm/motion.c
- [DH] tests/fate/checkasm.mak
-
FFMPEG on Heroku exceeds memory quota in testing
5 juillet 2022, par Patrick VelliaAfter following this tutorial, and getting it to work locally on my own development environment, before really getting my hands dirty and working deeper on my own project implementation, I decided to push it up to Heroku to test in a staging environment.


I had to have Heroku add the FFMPEG build-pack and turn on the Redis Server for ActionCable to work.


I didn't link the staging to a cloud storage bucket on Google or Amazon yet, just allowed it to upload directly to the dymo disk for testing. So it would go into the storage directory as it would in development for now.


the test MOV file is 186 MB in size.


The system uploaded the file fine.


According to the logs, it then copied the file from storage to tmp as the tutorial has us do.


Then it called streamio-ffmpeg's transcode method.


At this point, Heroku forcibly kills the dymo because it far exceeds the memory quota.


As this is a test environment, it's only on the free tier of Heroku.


I'm thinking I won't be able to directly process video projects on Heroku itself, unless I'm wrong ? Would it be better to call an API like Cloud Functions or Amazon Lambda, or spin up a Compute Engine long enough to process the FFMPEG command ?