Recherche avancée

Médias (91)

Autres articles (43)

  • Changer son thème graphique

    22 février 2011, par

    Le thème graphique ne touche pas à la disposition à proprement dite des éléments dans la page. Il ne fait que modifier l’apparence des éléments.
    Le placement peut être modifié effectivement, mais cette modification n’est que visuelle et non pas au niveau de la représentation sémantique de la page.
    Modifier le thème graphique utilisé
    Pour modifier le thème graphique utilisé, il est nécessaire que le plugin zen-garden soit activé sur le site.
    Il suffit ensuite de se rendre dans l’espace de configuration du (...)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • Ajouter notes et légendes aux images

    7 février 2011, par

    Pour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
    Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
    Modification lors de l’ajout d’un média
    Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)

Sur d’autres sites (6037)

  • /bin/sh : ffmpeg : command not found while merge audio with with using ffmpeg aws lamda [duplicate]

    1er mai 2023, par bhavesh kaila

    I am trying to merge audio with video using the below command in AWS lambda using Python but the getting and below error.

    


    ffmpeg Command

    


    cmd = 'ffmpeg  -stream_loop -1 -i mayur.mp4 -i audio.mp3 -shortest -map 0:v:0 -map 1:a:0 -y out/output.mp4'
subprocess.call(cmd, shell=True) 


    


    Aws Lambda Error

    


    2023-05-01T16:08:18.591+05:30   INIT_START Runtime Version: python:3.10.v2 Runtime Version ARN: arn:aws:lambda:eu-north-1::runtime:7764dc7f3ff1fc45718f596be4cd03d7bca223f0586f3bfa5fe6584d6af81cd8

2023-05-01T16:08:19.631+05:30   START RequestId: 4557a174-e12c-4924-971a-ef8f852b106b Version: $LATEST

2023-05-01T16:08:22.286+05:30

Copy
/bin/sh: ffmpeg: command not found
/bin/sh: ffmpeg: command not found

2023-05-01T16:08:23.926+05:30   [ERROR] FileNotFoundError: [Errno 2] No such file or directory: '/tmp/output.mp4' Traceback (most recent call last):   File "/var/task/lambda_function.py", line 65, in lambda_handler     s3_upload_response = s3.put_object(Bucket=bucket, Body=open('/tmp/output.mp4', 'rb'), Key =filename)

2023-05-01T16:08:23.929+05:30   END RequestId: 4557a174-e12c-4924-971a-ef8f852b106b


    


    Full Code snippet

    


    import json
from gtts import gTTS
import openpyxl
import boto3
import base64
import openai
import os
import random
import ffmpeg
import subprocess

# os.system("cp -ra bin/ffmpeg /tmp/")
# os.system("chmod -R 775 /tmp")

#from botocore.vendored import requests
language = 'en'
def lambda_handler(event, context):
    input1 = event["queryStringParameters"]['question']
    outputText=""
    
    # Define variable to load the dataframe
    dataframe = openpyxl.load_workbook('QNA/Book1.xlsx')
    
      #accesskey and secretkey for the S3 bucket
    accesskey = os.getenv("access_key")
    secretkey = os.getenv("secret_key")
    
    # Define variable to read sheet
    ws = dataframe['Sheet1']
    
    for row in ws.iter_rows(0,dataframe.active.max_row):
        for cell in row:
          #print(cell.value)
          if input1 in str(cell.value):
            outputText=row[1].value
  
    
    
      #Save Audio File
    audio = gTTS(text=outputText, lang=language, slow=False)
    audio.save("/tmp/audio.mp3")
    
    cmd='ffmpeg -stream_loop -1 -i QNA/mayur.mp4 -i tmp/audio.mp3 -shortest -map 0:v:0 -map 1:a:0 -y tmp/output.mp4'
    subprocess.run(cmd, shell=True)


    


    Note : I Download the static library from Here and added it to the python folder and generate python.zip with other dependencies and upload it on the aws layer and the AWS layer is linked with the python function.

    


    Note : Above code is working fine with google codelab and is able to generate a merged video working fine.

    


    Any help would be appriciated

    


  • FFMPEG color key filter applied, output to a transparent HEVC mov file, speed is different

    2 mars 2023, par Patrick Vellia

    I have an original recording that has the following ffprobe output :

    


    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test.mp4':
  Metadata:
    major_brand     : mp41
    minor_version   : 538120216
    compatible_brands: mp41
    creation_time   : 2023-02-28T19:06:41.000000Z
    firmware        : H21.01.01.50.00
  Duration: 00:00:08.15, start: 0.000000, bitrate: 60160 kb/s
  Stream #0:0(eng): Video: hevc (Main) (hvc1 / 0x31637668), yuvj420p(pc, bt709), 3840x2160 [SAR 1:1 DAR 16:9], 59891 kb/s, 119.88 fps, 119.88 tbr, 120k tbn, 119.88 tbc (default)
    Metadata:
      creation_time   : 2023-02-28T19:06:41.000000Z
      handler_name    : GoPro H.265
      vendor_id       : [0][0][0][0]
      encoder         : GoPro H.265 encoder
      timecode        : 19:05:32:105
  Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 189 kb/s (default)
    Metadata:
      creation_time   : 2023-02-28T19:06:41.000000Z
      handler_name    : GoPro AAC  
      vendor_id       : [0][0][0][0]
      timecode        : 19:05:32:105
  Stream #0:2(eng): Data: none (tmcd / 0x64636D74), 0 kb/s (default)
    Metadata:
      creation_time   : 2023-02-28T19:06:41.000000Z
      handler_name    : GoPro TCD  
      timecode        : 19:05:32:105
  Stream #0:3(eng): Data: bin_data (gpmd / 0x646D7067), 76 kb/s (default)
    Metadata:
      creation_time   : 2023-02-28T19:06:41.000000Z
      handler_name    : GoPro MET  
Unsupported codec with id 0 for input stream 2
Unsupported codec with id 100359 for input stream 3


    


    This video is chroma keyed, so I ran the following command the key out the green and export it to a HEVC mov container (the Apple HEVC supports alpha channel via the videotoolbox codec) :

    


    ffmpeg -i test.mp4 -vf colorkey=0x00b140:0.3:0.1 -vcodec hevc_videotoolbox -alpha_quality 0.5 -tag:v hvc1 output1.mov


    


    which results in this ffprobe :

    


    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'output1.mov':
  Metadata:
    major_brand     : qt  
    minor_version   : 512
    compatible_brands: qt  
    encoder         : Lavf58.76.100
  Duration: 00:00:08.15, start: 0.000000, bitrate: 366946 kb/s
  Stream #0:0(eng): Video: hevc (Main) (hvc1 / 0x31637668), yuv420p(tv, gbr/bt709/bt709, progressive), 3840x2160 [SAR 1:1 DAR 16:9], 367188 kb/s, 119.88 fps, 119.88 tbr, 120k tbn, 120k tbc (default)
    Metadata:
      handler_name    : GoPro H.265
      vendor_id       : FFMP
      encoder         : Lavc58.134.100 hevc_videotoolbo
      timecode        : 19:05:32:105
  Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 118 kb/s (default)
    Metadata:
      handler_name    : GoPro AAC  
      vendor_id       : [0][0][0][0]
  Stream #0:2(eng): Data: none (tmcd / 0x64636D74), 0 kb/s
    Metadata:
      handler_name    : GoPro H.265
      timecode        : 19:05:32:105
Unsupported codec with id 0 for input stream 2


    


    When the play the original video inside a web browser, it will play normally. As in, the video doesn't play in slo-mo but at "normal speed" which is what I actually want. User can slow it down and still have the frames necessary to keep the clarity when desired.

    


    However, when I play the second video, it is unnaturally slow even at 2x the speed.

    


    The only difference I can see above is that the export didn't include the second data stream (input 3).

    


    This was recorded on a GoPro Hero 10. I am using FFMPEG 4.6.

    


    Any help would be appreciated to fine tune the command.

    


  • concat two videos with same format

    24 mars 2023, par ttb

    I'm trying to concat two videos that have very similar formats :

    


    Stream #0:0[0x1](und): Video: hevc (Main 10) (hev1 / 0x31766568), yuv420p10le(tv), 1920x1080 [SAR 1:1 DAR 16:9], 1141 kb/s, 23.98 fps, 23.98 tbr, 24k tbn (default)
    Metadata:
      handler_name    : VideoHandler
      vendor_id       : [0][0][0][0]
  Stream #0:1[0x2](eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 224 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
      vendor_id       : [0][0][0][0]


    


    and

    


      Stream #0:0(und): Video: hevc (hev1 / 0x31766568), yuv420p10le(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 23.98 fps, 24k tbn (default)
    Metadata:
      creation_time   : 2023-03-24T21:10:17.000000Z
      handler_name    : VideoHandler
      vendor_id       : [0][0][0][0]
      encoder         : Lavc60.6.101 libx265
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
  Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 341 kb/s (default)
    Metadata:
      creation_time   : 2023-03-24T21:10:17.000000Z
      handler_name    : Surround
      vendor_id       : [0][0][0][0]


    


    But the video ends up freezing when played. Not sure what's wrong, I matched everything ?