Recherche avancée

Médias (0)

Mot : - Tags -/xmlrpc

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

Autres articles (37)

  • 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 (...)

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

  • Ecrire une actualité

    21 juin 2013, par

    Pré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 ) (...)

Sur d’autres sites (7596)

  • I want to print HLS files using ffmpeg in aws lambda (python)

    14 avril 2021, par 최우선

    I implemented it through the link(https://aws.amazon.com/ko/blogs/media/processing-user-generated-content-using-aws-lambda-and-ffmpeg/) here, and it works well.

    


    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 + ".m3u8"

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 -i \"" + s3_source_signed_url + "\" -codec: copy -start_number 0 -hls_time 10 -hls_list_size 0 -f hls -"
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)


    


    However, the actual output through ffmpeg is multiple files. For example test.m3u8, test0.ts, test1.ts .....

    


    But when I print p1.stdout, it looks like multiple files (test.m3u8,test0.ts....) are merged into one file.

    


    Is there a way to get the actual output multiple files (test.m3u8,test0.ts......) from p1.stdout ? Please help.

    


  • ffprobe only shows a single stream

    19 novembre 2018, par marchaos

    I’ve got a webcam that is capable of 1080p. Under windows I can choose a 1080p 2mbps and all works well. When using ffprobe, it only shows a single 640x480 stream. If you use ffmpeg copy, it only records at 640x480.

    Is there a way to get it to record at the full 1080p ?

  • AWS Lambda - FFmpeg to extract frames doesn't write anything

    7 avril 2024, par Stormsson

    I have a lambda with a ffmpeg layer on it.

    


    The command i want to use is basically

    


    ffmpeg -i video.mp4 -qscale:v 2 -vf fps=8 '%04d.jpg'


    


    so it has an input file, and creates 8 frames per second in the same folder

    


    This code seems to do everything except writing the files, what am I missing ?

    


    import ...
SIGNED_URL_TIMEOUT = 60
FPS_SAMPLES = 8

def lambda_handler(event, context):
    # Set up logging.
    logger = logging.getLogger(__name__)

    s3_client = boto3.client('s3')

    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]

    logger.info( "bucket: %s, key: %s, basename: %s",s3_source_bucket, s3_source_key, s3_source_basename)

    s3_source_signed_url = s3_client.generate_presigned_url('get_object',
    Params={'Bucket': s3_source_bucket, 'Key': s3_source_key},
    ExpiresIn=SIGNED_URL_TIMEOUT)

    with tempfile.TemporaryDirectory() as tmpdir:
        os.chdir(tmpdir) # change the current folder to that one (current one is in     os.getcwd())
        cwd = os.getcwd()
        ffmpeg_cmd = "/opt/bin/ffmpeg -i \"" + s3_source_signed_url + "\" -qscale:v 2 -vf fps="+str(FPS_SAMPLES)+" "+ cwd + "/'%04d.jpg'"
    print("COMMAND: "+ffmpeg_cmd)
    
        command1 = shlex.split(ffmpeg_cmd)
        p1 = subprocess.run(command1, stdout=subprocess.PIPE, stderr=subprocess.PIPE)

        # List all files and directories in the current directory
        contents = os.listdir(cwd)
    
        # Print the contents
        print(f"Contents of {cwd}:")
        for item in contents:
            print(item) # <--- NOthing here...

   
return {
    'statusCode': 200,
    'body': json.dumps("bucket: %s, key: %s, basename: %s" % (s3_source_bucket, s3_source_key, s3_source_basename))
}