Recherche avancée

Médias (0)

Mot : - Tags -/configuration

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

Autres articles (15)

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

  • Contribute to documentation

    13 avril 2011

    Documentation is vital to the development of improved technical capabilities.
    MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
    To contribute, register to the project users’ mailing (...)

  • Supporting all media types

    13 avril 2011, par

    Unlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)

Sur d’autres sites (4162)

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

    


  • Python : FFmpeg Input/output error using discord.py

    29 mai 2023, par PeeblYweeb

    here is my code :

    


       async def direct(self, interaction: discord.Interaction, link: str):
        voice_client = get(self.bot.voice_clients, guild=interaction.guild)
        if voice_client is None:
            return await interaction.response.send_message("❌ Connect to a channel first.")

        await interaction.response.send_message("Using direct link.")
        voice_client.play(discord.FFmpegPCMAudio(link))
        return


    


    here is my error :

    


    [tls @ 0x557c73a19d00] Error in the pull function.
https://cdn.discordapp.com/attachments/1109998398150545410/1112473248505004142/portradio-_1_.ogg: Input/output error
2023-05-28 13:29:11 INFO     discord.player ffmpeg process 1458408 successfully terminated with return code of 0.


    


    this happens usually around half-way through whatever im playing consistently

    


    i've tried setting arguments like :

    


    ffmpeg_options = {'options': '-vn -dn -sn -ignore_unknown -fflags +discardcorrupt'}


    


    from this other post
’corrupt input packet in stream 1’ error in FFMPEG
which fixed the error corrupt input packet but im still having trouble any ideas ?

    


    goal is to get the audio playing to discord without having to store the file locally then playing it from there then discarding it after.

    


  • FFMPEG : How should I deal with constant corrupt packets incoming from a remote stream ? [closed]

    2 mai 2023, par 2x2

    I'll get downvoted madly fast ; I am new here, and, honestly, I'm weak at FFMPEG.

    


    I am working to "record" a test HLS broadcast (colored bars) into a local mp4 file.

    


    Trying to normally record it into the file, using a simple command, yields this result. It works fine at the start, due to the corrupt packets slowly accumulating and seemingly seamlessly getting spliced together. After, the recording simply continues, and begins to lag frequently.

    


    I'll summarize the FFMPEG log below :

    


    >! ```
>! 
>! Command input:
>! 
>! > ffmpeg -i http://IP_1:8080/udp/IP_2:1234 -c copy OUT/test1.mp4
>! 
>! ...
>! 
>! Initialization:
>! 
>! ffmpeg version 2023-04-26-git-e3143703e9-full_build-www.gyan.dev Copyright (c) 2000-2023 the FFmpeg developers
>! built with gcc 12.2.0 (Rev10, Built by MSYS2 project)
>! configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libaribb24 --enable-libaribcaption --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libvpl --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libcodec2 --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
>! libavutil      58.  6.100 / 58.  6.100
>! libavcodec     60. 10.100 / 60. 10.100
>! libavformat    60.  5.100 / 60.  5.100
>! libavdevice    60.  2.100 / 60.  2.100
>! libavfilter     9.  5.100 /  9.  5.100
>! libswscale      7.  2.100 /  7.  2.100
>! libswresample   4. 11.100 /  4. 11.100
>! libpostproc    57.  2.100 / 57.  2.100
>! 
>! ...
>! 
>! Problems begin:
>! 
>! [mpeg2video @ 000001e3f88a60c0] Invalid frame dimensions 0x0.
>! Last message repeated 4 times
>! 
>! ...
>! 
>! Repetitive two errors - Packet errors:
>! 
>! [mpegts @ 000001e3f888b300] PES packet size mismatch
>! [mpegts @ 000001e3f888b300] Packet corrupt (stream = 0, dts = 4813344832).
>! 
>! ...
>! 
>! Information:
>! 
>! Input #0, mpegts, from 'http://IP_1:8080/udp/IP_2:1234':
>! Duration: N/A, start: 53478.855478, bitrate: 3428 kb/s
>! Program 10
>! Metadata:
>! service_name    : SERVICE
>! service_provider: unknown
>! Stream #0:0[0x65]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, top first), 720x576 [SAR 16:15 DAR 4:3], 3300 kb/s, 25 fps, 25 tbr, 90k tbn
>! Side data:
>! cpb: bitrate max/min/avg: 3300000/0/0 buffer size: 1638400 vbv_delay: N/A
>! Stream #0:1[0x66](rus): Audio: mp2 ([3][0][0][0] / 0x0003), 44100 Hz, mono, fltp, 128 kb/s
>! Output #0, mp4, to 'OUT/test1.mp4':
>! Metadata:
>! encoder         : Lavf60.5.100
>! Stream #0:0: Video: mpeg2video (Main) (mp4v / 0x7634706D), yuv420p(tv, top first), 720x576 [SAR 16:15 DAR 4:3], q=2-31, 3300 kb/s, 25 fps, 25 tbr, 90k tbn
>! Side data:
>! cpb: bitrate max/min/avg: 3300000/0/0 buffer size: 1638400 vbv_delay: N/A
>! Stream #0:1(rus): Audio: mp2 (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 128 kb/s
>! Stream mapping:
>! Stream #0:0 -> #0:0 (copy)
>! Stream #0:1 -> #0:1 (copy)
>! Press [q] to stop, [?] for help
>! 
>! ```


    


    I will also attach a video demonstration of the occurrence :

    


    https://drive.google.com/file/d/13ndIpH3de3k8f3TMVGEbJUNVe-vD0vIW/view?usp=sharing

    


    Download it ; the processed web version doesn't include any of the visual glitches that are visible in the original file.

    


    I have been wanting to run FFMPEG with a minute-long delay (i.e. intentionally increasing the latency). Unfortunately, FFMPEG only has features to lower latency, not add more (I read the entire documentation trying to figure this out).

    


    Another of my ideas was to try FFPLAY (afaik it's FFMPEG but with output to a window). Didn't work, got the same errors.

    


    None of the other parameters listed in the documentation seemed to have any use to help me out ; I tried a bunch, to no avail.

    


    What will you suggest ? I would like to hear some ideas on how I could fix this.