Recherche avancée

Médias (0)

Mot : - Tags -/protocoles

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

Autres articles (43)

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

  • Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs

    12 avril 2011, par

    La manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
    Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras.

  • Possibilité de déploiement en ferme

    12 avril 2011, par

    MediaSPIP peut être installé comme une ferme, avec un seul "noyau" hébergé sur un serveur dédié et utilisé par une multitude de sites différents.
    Cela permet, par exemple : de pouvoir partager les frais de mise en œuvre entre plusieurs projets / individus ; de pouvoir déployer rapidement une multitude de sites uniques ; d’éviter d’avoir à mettre l’ensemble des créations dans un fourre-tout numérique comme c’est le cas pour les grandes plate-formes tout public disséminées sur le (...)

Sur d’autres sites (5345)

  • FFmpeg live rtmp capture to segments and encoding to mp4 is causing time glitches in the output

    19 août 2020, par ezwrighter

    I am having issues with capturing live video and converting the latest x minutes to a useable mp4 on demand.

    


    Currently i am capturing the latest 15m of a live rtmp stream and recording it with visual timestamp on it and saving it to segment files like this :

    


    ffmpeg -i rtmps://domain/myawesomestream.stream -map 0 -vf drawtext=x=10:y=10:shadowcolor=white:shadowx=1:shadowy=1:text='%{localtime\:%m/%d/%Y %H\\\:%M\\\:%S MST}' -vcodec libx264 -crf 21 -acodec copy -an -start_at_zero -f segment -segment_time 15 -segment_wrap 61 -segment_list_type ffconcat -segment_list_size 60 -segment_list bufferTime.ffcat -segment_format mpegts /dvr/captureTime-%03d.ts

    


    This works and allows me to always have the latest 15m of video captured with usable segments that I can then roll into mp4 files on demand like this without any re-encoding :

    


    /usr/bin/ffmpeg -safe 0 -f concat -i /dvr/bufferTime.ffcat -c copy -f mp4 /var/www/chat/dvr/ugb/fifteenminutesofvideo.mp4

    


    This does a great job of giving me the last 15 minutes of video from the live stream at any given moment. However, I would like to be able to get the last X minutes of video from the current segments instead of having to get the whole 15m minutes, without more encoding. I can sort of do it with two passes like this :

    


    /usr/bin/ffmpeg -safe 0 -f concat -i /dvr/bufferTime.ffcat -c copy -f mp4 -y /dvr/tmp/mywhole15minutes.mp4
/usr/bin/ffmpeg -sseof -120 -i /dvr/tmp/myshole15minutes.mp4 -c copy -f mp4 -y /dvr/my120secondsofvideo.mp4

    


    This gives me the last 120 seconds of video, but the front of the video has timestamp or keyframe issues at the front of it. It shows the visual timestamp between 5-12 seconds behind and then pauses or jumps the empty frames (Depending on the player) and then starts to play normally. I would love to fix the front of this video and have played with genpts and other flags to no avail :-( Any hints that might push me in the right direction ? Thanks ffmpeg pros out there ! I don't have a great place to publicly host the bad encoded video file, but would be happy to PM a link.

    


  • Convert ogg byte array to wav byte array Python

    2 février 2023, par Ramish Rasool

    I want to convert ogg byte array/bytes with Opus codec to wav byte array/bytes without saving to disk. I have downloaded audio from telegram api and it is in byte array format with .ogg extension. I do not want to save it to filesystem to eliminate filesystem io latencey.

    


    Currently what I am doing is after saving the audio file in .ogg format using code the below code using telegram api for reference https://docs.python-telegram-bot.org/en/stable/telegram.file.html#telegram.File.download_to_drive

    


    # listen for audio messages
async def audio(update, context):
    newFile = await context.bot.get_file(update.message.voice.file_id)
    await newFile.download_to_drive(output_path)


    


    I am using the code

    


    subprocess.call(["ffmpeg", "-i", output_path, output_path.replace(".ogg", ".wav"), '-y'], stderr=subprocess.DEVNULL, stdout=subprocess.DEVNULL)


    


    to convert ogg file to wav file. But this is not what I want.

    


    I want the code

    


    async def audio(update, context):
    newFile = await context.bot.get_file(update.message.voice.file_id)
    byte_array = await newFile.download_as_bytearray()


    


    to get byte_array and now I want this byte_array to be converted to wav without saving to disk and without using ffmpeg. Let me know in comments if something is unclear. Thanks !

    


    Note : I have setted up a telegram bot at the backend which listens for audios sent to private chat which I do manually for testing purposes.

    


  • How to correctly specify the path to a file in -vf media ?

    15 juillet 2024, par Wintreist

    Good afternoon, please, I really need help.
I'm putting a watermark on the video :

    


    with tempfile.TemporaryFile("wb", delete=False, suffix=".png") as watermark_file:
    watermark_file.write(buff.read())
(
    ffmpeg
    .input(str(path))
    .output(
        os.environ.get("TEMP")+f"\\{uuid.hex}_{path.name}",
        vf=f"movie='{watermark_file.name}' [watermark]; [in][watermark] overlay='{overlay}' [out]"
    )
    .global_args('-copyts')
    .run()
)


    


    In a temporary folder, I create a file in which I write a watermark from io.BytesIO
using the ffmpeg-python library, I do not work directly with the console.

    


    The problem is that when running .run() to the console outputs the following :

    


    [Parsed_movie_0 @ 0000011b21b3e300] Failed to avformat_open_input 'C'
[AVFilterGraph @ 0000011b21b4d4c0] Error initializing filters
[vost#0:0/libvpx-vp9 @ 0000011b23a07500] Error initializing a simple filtergraph
Error opening output file C:\Users\smeta\AppData\Local\Temp\5e5a695966cf4d728edbd7f39c509d0e_000.webm.
Error opening output files: No such file or directory


    


    But if I copy a watermarked file from temp and upload it to the workspace :
vf=f"movie='{'test.png'}' [watermark]; [in][watermark] overlay='{overlay}' [out]"
then everything works as it should. I.e. apparently there is a problem with the path to the watermark, and I do not understand what to do.
I ask for help