Recherche avancée

Médias (1)

Mot : - Tags -/book

Autres articles (55)

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

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

  • Sharing FFMPEG video stream data between processes

    21 juin 2016, par lgaravaglia

    I’m trying to find a method for sharing FFMPEG library datatypes between two processes.

    The project that I’m working on requires one process to buffer the FFMPEG stream that is being received and another process needs to read from the buffer and perform some actions on the video stream. Unfortunately, I can’t use a multi-threaded approach for this project. Due to some limitations in my system I have to use separate processes.

    The data that I would like to share I have placed in a general struct as follows :

    struct FFMPEGData {
    AVFormatContext *pFormatCtx;
    AVCodecContext  *pCodecCtx;
    AVCodec         *pCodec;
    AVFrame         *pFrame, dst;
    AVPacket        *packet;
    AVPacket* pack = new AVPacket[packetNum];
    };

    The buffering process uses the format context and codec context to read the video stream and then it places packets in the AVPacket array pack. The other process should grab packets from the array and decode them, also using the format and codec contexts.

    I looked into the Boost Interprocess library, but that does not seem to be setup to handle this type of situation easily.

    Would anyone know a method for sharing my general struct between multiple processes ?

  • ffmpeg framerate inconsistent

    16 septembre 2021, par user3190036

    ffmpeg is being run with the same arguments but different inputs in two separate places in my code. The framerate is set to 12fps with -framerate. In one case the output video matches the framerate pretty well every time. In the other case the video is coming back with 1 second of video for every 15 input frames, but again it is consistent. What could possibly be causing the discrepancy ?

    


    Arguments :
-y -framerate 12 -itsoffset -654ms -i "C :\path/%06d.JPG" -i "C :\path/audio.mp3" -map 0:v:0 -map 1:a:0 -vf scale=1280:720:force_original_aspect_ratio=decrease,pad=1280:720 :-1 :-1:color=black -acodec aac -vcodec libx264 -ar 48000 -pix_fmt yuv420p -movflags +faststart "C :\path\output.mp4"

    


    There are dozens of differences in the code that calls it but I can't understand how any of that would influence the framerate. I tried switching out the mp3 with one of an arbitrary different length to see if that had an effect but it did not. That leaves only the image inputs.

    


    edit : So it gets stranger. I reproduced both cases and modified the framerate value for each to check what happened. In almost every case I got more seconds of video than expected. I was doing these tests with 400 frames and 5 seconds of audio to ensure the lack of -shortest wasn't a factor. The only time I got a perfectly accurate framerate was when it was set to 1. In every other case (except the verbatim 12fps in the case that was always working) the video was too short by 5-15%. This makes it a bit of a mystery how either part of my code ever produced good results.

    


  • There are audio gaps when I join multiple .ts files into a single .mp4 file

    2 juin 2020, par woopwoop399

    After I merge multiple .ts files into a single .mp4 file, when I play this file, I hear short gaps in audio. The gap happens always at same places, but has only about 50% chance of happening, it feels like video player doesn't manage to decode something in time. This gap happens when I play the file with mpc-hc videoplayer, but doesn't happen with vlc player. I'd switch, but mpc-hc worked flawlessly for every file I opened so far for years, so I think the .mp4 file is somehow malformed.

    



    I used this command ffmpeg -f concat -safe 0 -i mylist.txt -c copy sm22413936-ts.mp4, all necessary files are here https://files.catbox.moe/9cl0pm.zip

    



    I asked about this here previously https://superuser.com/questions/1520894/there-are-audio-gaps-when-i-join-multiple-ts-files-into-a-single-mp4-file , but first solution required reencoding, and my solution caused desync really noticeable on long videos.

    



    I suspect that this .mp4 is muxed wrong or something, maybe I need to remux it somehow.