Recherche avancée

Médias (1)

Mot : - Tags -/artwork

Autres articles (112)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • Mise à jour de la version 0.1 vers 0.2

    24 juin 2013, par

    Explications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
    Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains 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 ;

Sur d’autres sites (13824)

  • Ffmpeg ouputting empty file to s3 when editing a remote video clip on AWS Lambda function

    8 août 2023, par enjoysturtles

    I'm trying to take a clip from a remote url, use ffmpeg to edit it, and save the result to s3.

    


    I have a layer installed with ffmpeg attached to a lambda function. The lambda function runs an ffmpeg script on it and uploads the result to S3, however, the file size is either much smaller than it should be, or 0 bytes.

    


    Locally, the code works perfectly, and it's outputting 500kb files into lambda. I'm running python 3.9 locally as well as on the lambda.

    


    I thought that the file was not downloading fully before ffmpeg begins processing, which would explain the much smaller output file sizes.

    


    I tried downloading the remote file to the lambda's /tmp and using that as the input for ffmpeg, but I continued having the same issue with the empty file.

    


    Here's all the code in my lambda function :

    


    import json
import subprocess
import shlex
import boto3
from datetime import datetime

def lambda_handler(event, context):
    download_url = 'https://newslater-resources.s3.us-west-2.amazonaws.com/ca4a9d5b-691a-49cc-90aa-15636c222017.mov'

    s3 = boto3.client(
      's3',
      region_name="us-east-1",
    )

    key = '/edits/%s.mov' % int(datetime.utcnow().timestamp())

    command='''
      /opt/bin/ffmpeg -i %s \
        -vf "crop=w=in_h*9/16:h=in_h,scale=1080x1920" \
        -vcodec libx264 \
        -crf 23 \
        -preset veryfast \
        -c: a copy \
        -s 1080x1920 \
         - -y
    ''' % (download_url)

    split_command = shlex.split(command)

    p1 = subprocess.run(split_command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)

    response = s3.put_object(Body=p1.stdout, Bucket='edited-clips', Key=key)

    signed_url = s3.generate_presigned_url(
      ClientMethod='get_object',
      Params={
        'Bucket': 'edited-clips',
        'Key': key,
      } 
    )


    


    Any help would be greatly appreciated. Thank you !

    


  • Live stream doesn't seem to be passed to AWS correctly

    12 août 2024, par NoobAmI

    I'm trying to stream my live video into Amazon IVS and I don't see it on the live channels.

    


    Is it possible I have a mistake in my FFMPEG configuration ?
I'm expecting to see this in my playback url or on the console screen for playback but I see nothing at the moment.

    


    As I understand it, shouldn't I see some kind of playback in the live channels if a stream is being sent that channel ?

    


    `  async sendDataToIvs(channelArn: string, payload: any): Promise<void> {&#xA;    const injestServer = &#x27;***.global-contribute.live-video.net&#x27;;&#xA;    const streamKey = &#x27;sk_us-east-1_*****&#x27;;&#xA;  &#xA;    const ffmpeg = spawn(&#x27;ffmpeg&#x27;, [&#xA;      &#x27;-re&#x27;, // Read input at native frame rate&#xA;      &#x27;-i&#x27;, &#x27;-&#x27;, // Input from stdin (live stream data)&#xA;      &#x27;-r&#x27;, &#x27;30&#x27;, // Frame rate&#xA;      &#x27;-c:v&#x27;, &#x27;libx264&#x27;, // Video codec - H.264&#xA;      &#x27;-pix_fmt&#x27;, &#x27;yuv420p&#x27;, // Pixel format&#xA;      &#x27;-profile:v&#x27;, &#x27;main&#x27;, // H.264 profile&#xA;      &#x27;-preset&#x27;, &#x27;veryfast&#x27;, // Encoder quality setting&#xA;      &#x27;-x264opts&#x27;, &#x27;nal-hrd=cbr:no-scenecut&#x27;, // Additional x264 options&#xA;      &#x27;-minrate&#x27;, &#x27;3000&#x27;, // Minimum bitrate&#xA;      &#x27;-maxrate&#x27;, &#x27;3000&#x27;, // Maximum bitrate&#xA;      &#x27;-g&#x27;, &#x27;60&#x27;, // GOP size&#xA;      &#x27;-c:a&#x27;, &#x27;aac&#x27;, // Audio codec&#xA;      &#x27;-b:a&#x27;, &#x27;160k&#x27;, // Audio bitrate&#xA;      &#x27;-ac&#x27;, &#x27;2&#x27;, // Audio channels&#xA;      &#x27;-ar&#x27;, &#x27;44100&#x27;, // Audio sample rate&#xA;      &#x27;-f&#x27;, &#x27;flv&#x27;, // Output format&#xA;      `rtmps://${injestServer}:443/app/${streamKey}` // Output destination&#xA;    ]);&#xA;  &#xA;    ffmpeg.stdin.write(payload, (err) => {&#xA;      console.log(payload)&#xA;      if (err) console.error(&#x27;Error writing payload to FFmpeg stdin:&#x27;, err);&#xA;    });&#xA;  &#xA;    ffmpeg.on(&#x27;close&#x27;, (code) => {&#xA;      console.log(`FFmpeg process exited with code ${code}`);&#xA;    });&#xA;  &#xA;    ffmpeg.stdin.on(&#x27;error&#x27;, (err) => {&#xA;      console.error(&#x27;Error writing to FFmpeg stdin:&#x27;, err);&#xA;    });&#xA;  &#xA;    ffmpeg.stderr.on(&#x27;data&#x27;, (data) => {&#xA;      console.error(`FFmpeg error: ${data}`);&#xA;    });&#xA;  } `&#xA;</void>

    &#xA;

  • Audio effects in ffmpeg

    29 mars 2012, par Kyborg2011

    Does ffmpeg audio effects like reverb ? Can I work with the channels (to detain them, mix) ? If so please link to code samples or examples of codes. thanks in advance !