Recherche avancée

Médias (91)

Autres articles (35)

  • Taille des images et des logos définissables

    9 février 2011, par

    Dans beaucoup d’endroits du site, logos et images sont redimensionnées pour correspondre aux emplacements définis par les thèmes. L’ensemble des ces tailles pouvant changer d’un thème à un autre peuvent être définies directement dans le thème et éviter ainsi à l’utilisateur de devoir les configurer manuellement après avoir changé l’apparence de son site.
    Ces tailles d’images sont également disponibles dans la configuration spécifique de MediaSPIP Core. La taille maximale du logo du site en pixels, on permet (...)

  • Configuration spécifique d’Apache

    4 février 2011, par

    Modules spécifiques
    Pour la configuration d’Apache, il est conseillé d’activer certains modules non spécifiques à MediaSPIP, mais permettant d’améliorer les performances : mod_deflate et mod_headers pour compresser automatiquement via Apache les pages. Cf ce tutoriel ; mode_expires pour gérer correctement l’expiration des hits. Cf ce tutoriel ;
    Il est également conseillé d’ajouter la prise en charge par apache du mime-type pour les fichiers WebM comme indiqué dans ce tutoriel.
    Création d’un (...)

  • Liste des distributions compatibles

    26 avril 2011, par

    Le tableau ci-dessous correspond à la liste des distributions Linux compatible avec le script d’installation automatique de MediaSPIP. Nom de la distributionNom de la versionNuméro de version Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
    Si vous souhaitez nous aider à améliorer cette liste, vous pouvez nous fournir un accès à une machine dont la distribution n’est pas citée ci-dessus ou nous envoyer le (...)

Sur d’autres sites (4257)

  • FileNotFoundError on aws Lambda when concatenating videos with ffmpeg

    2 juillet 2021, par Shibu Menon

    Goal :

    



      

    • Concat 2 videos (both are in an s3 bucket) via aws Lambda using ffmpeg
    • 


    • Upload the resultant output.mp4 to another S3 bucket
    • 


    • Python 3+
    • 


    



    I've already created a layer containing a static ffmpeg

    



    The Error :

    



    {
  "errorMessage": "[Errno 2] No such file or directory: '/tmp/output.mp4'",
  "errorType": "FileNotFoundError",
  "stackTrace": [
    [
      "/var/task/lambda_function.py",
      19,
      "lambda_handler",
      "s3.Object(bucketLowRes, mp4OutputFileName).put(Body=open(new_file_key, 'rb'))"
    ]
  ]
}


    



    My Lambda function :

    



    import json
import os
import subprocess
import boto3

s3 = boto3.resource('s3')
bucketLowRes = s3.Bucket("bucket-conc-lowres")

def lambda_handler(event, context):
    # TODO implement

    mp4OutputFileName = 'output.mp4'

    new_file_key = os.path.abspath(os.path.join(os.sep, 'tmp', mp4OutputFileName))
    subprocess.call( ['/opt/ffmpeg', '-i', 'concat:s3://bucket-word-clips/00th76kqwfs915hbixycb77y9v3riwsj30.mp4|s3://bucket-word-clips/00uoakp6jyafbu13ycvl6w2i9tj42eux30.mp4', new_file_key ] )

    s3.Object(bucketLowRes, mp4OutputFileName).put(Body=open(new_file_key, 'rb'))

    return {
        'statusCode': 200,
        'body': json.dumps('Hello from Lambda!')
    }


    



    Question :

    



      

    • FileNotFoundError : Where is the output mp4 file of my ffmpeg concat being saved ??
    • 


    • And if it is being saved to /tmp/output.mp4 , then why the FileNotFoundError ??
    • 


    



    thanks

    


  • How can I superimpose an semi-transparent image on top of a video using ffmpeg ?

    28 octobre 2013, par pixelearth

    I'm making a lot of "title" clips for some video I have. I have a simple 5 second movie over which I'd like to center an image that will contain the title text (in image format).

    This seems simple enough, but I don't know where to start...

  • AWS Lambda and Fluent FFMPEG error "cannot read property "isStream" of undefined"

    29 mai 2021, par Travis Lee

    so here's the goal : convert a .webm file hosted in an S3 into a gif and upload that to a new bucket. This all works fine when run locally, but when trying to translate it into a lambda, fluent-ffmpeg throws errors when it runs the command.

    


    Here's the code snippet :

    


    ffmpeg(new URL(vid))
  .outputOptions("-vf", "scale=320:-1:flags=lanczos,fps=14")
  .on('progress', () => {
      console.log('progress');
  })
  .on('end', () => {
     //Do stuff with the result when it is done
  })
  .output(newKey)
  .run(newKey);


    


    in this snippet, "vid" is a presigned GET url for an S3 bucket containing the .webm video file, and "newKey" is the name of the new bucket (and a temporary writeStream/File that is created in the lambda to store the new .gif file until we upload it to S3 - not super relevant to this issue).

    


    What should happen (and does locally) is that a new output is created containing the converted .gif file

    


    What happens when it is deployed in a lambda is that it reaches the .outputOptions call and throws a type error saying that it cannot read property isStream of undefined.

    


    At first glance, this seems like I simply don't have FFMPEG installed in the lambda, but I do. I have tried with the prebuilt layer using NodeJS 10 found here : https://serverlessrepo.aws.amazon.com/applications/us-east-1/145266761615/ffmpeg-lambda-layer ,
with a NodeJS 12 layer that was built by some engineers here previously, and tried building a NodeJS 14 FFMPEG layer myself and using that. I tried for all three using no configuration and letting it call the PATH ffmpeg, using the FFMPEG_PATH and FFPROBE_PATH environment variables set to either what was specified in the previous layers, or what I made it in the newly built one, and even manually setting the path to the executables using the setFfmpegPath and setFfprobePath functions found on the fluent-ffmpeg object.

    


    Lastly, I even tried bundling the executables in with the actual lambda code itself and uploading it through an S3, trying all three above methods of getting it to point to the correct paths once again to no avail.

    


    I'm seriously in need of help if anyone else has encountered something similar or just might know what is going on. I'm at wit's end here trying to figure this out.