Recherche avancée

Médias (1)

Mot : - Tags -/artwork

Autres articles (79)

  • Gestion des droits de création et d’édition des objets

    8 février 2011, par

    Par défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;

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

  • Dépôt de média et thèmes par FTP

    31 mai 2013, par

    L’outil MédiaSPIP traite aussi les média transférés par la voie FTP. Si vous préférez déposer par cette voie, récupérez les identifiants d’accès vers votre site MédiaSPIP et utilisez votre client FTP favori.
    Vous trouverez dès le départ les dossiers suivants dans votre espace FTP : config/ : dossier de configuration du site IMG/ : dossier des média déjà traités et en ligne sur le site local/ : répertoire cache du site web themes/ : les thèmes ou les feuilles de style personnalisées tmp/ : dossier de travail (...)

Sur d’autres sites (7324)

  • ffmpeg avformat_open_input() function causes memory leak when receiving live stream

    12 septembre 2023, par george_d

    I have live streams (can be UDP or HLS, video codec is H264), from which I grab frames for further processing.

    


    For this purpose, I use ffmpeg + nvjpeg + cuda libraries.

    


    However I noticed memory leak - memory usage periodically (every 10-20 seconds) is increased by 100-400 KB, the amount and period may vary.

    


    After disabling pieces of code one by one, I realized that it is avformat_open_input() which causes memory leak.

    


    No matter which buffer settings (https://ffmpeg.org/ffmpeg-protocols.html#udp) I choose for UDP, the leak still persists. Same goes for HLS streams.

    


    I tried to find anything related to this problem, but all the sources I found claimed that this problem took place in the past and has been fixed.

    


    Is there some mysterious setting I am missing, so that memory could be freed properly ?

    


    Or is this memory supposed to be freed when processing frames (i.e. using av_read_frame() and av_packet_unref(), etc) ?

    


    Minimal example of code to reproduce the problem :

    


    avformat_example.cpp

    


    #include &#xA;extern "C" {&#xA;    #include <libavformat></libavformat>avformat.h>&#xA;    #include <libavcodec></libavcodec>avcodec.h>&#xA;}&#xA;&#xA;int main(int argc, char *argv[]){&#xA;    if (argc &lt; 2) {&#xA;      return 1;&#xA;    }&#xA;&#xA;    char* inputSource = argv[1];&#xA;    AVFormatContext *ctx = NULL;&#xA;&#xA;    if (avformat_open_input(&amp;ctx, inputSource, NULL, NULL) != 0) {&#xA;        av_log(NULL,&#xA;               AV_LOG_ERROR,&#xA;               "Cannot open &#x27;%s&#x27;",&#xA;               inputSource);&#xA;        return 1;&#xA;    }&#xA;&#xA;    /*&#xA;    This loop is placed here to demonstrate&#xA;    avformat_open_input() causing leak.&#xA;    Actually, instead of noop loop there is logic of getting and processing frames,&#xA;    but it doesn&#x27;t matter now.&#xA;    As loop goes on, the amount of leaked memory increases.&#xA;    */&#xA;    while(true) {&#xA;      sleep(1);&#xA;    }&#xA;&#xA;    return 0;&#xA;}&#xA;

    &#xA;

    Compile with :

    &#xA;

    g&#x2B;&#x2B; avformat_example.cpp -lavcodec -lavutil -lavformat -I/usr/include/ffmpeg-cuda -o avformat_open_input_example&#xA;

    &#xA;

    Run :

    &#xA;

    ./avformat_open_input_example "udp://127.0.0.1:5000?reuse=1&amp;pkt_size=1316&amp;buffer_size=1310720&amp;fifo_size=40000"&#xA;

    &#xA;

    Version of ffmpeg underlying libraries :

    &#xA;

    libavutil      58.  7.100 / 58.  7.100&#xA;libavcodec     60. 11.100 / 60. 11.100&#xA;libavformat    60.  5.100 / 60.  5.100&#xA;libavdevice    60.  2.100 / 60.  2.100&#xA;libavfilter     9.  8.100 /  9.  8.100&#xA;libswscale      7.  2.100 /  7.  2.100&#xA;libswresample   4. 11.100 /  4. 11.100&#xA;

    &#xA;

  • FFmpeg - ducking music for voiceover (sidechain)

    7 décembre 2023, par kaushal

    I am trying to duck the background music from a voiceover input file using FFmpeg (I tried doing this using pydub with no success).

    &#xA;

    The below command is predominantly working, except that it is truncating my background music file (main.mp3, over 3 min long) to the length of the voiceover file (taekwondo.mp3, about a min long). Any idea or suggestion on what can I change in below command so that the output file is full 3 min long, with background music ducked when the voiceover is playing. Once the voiceover completes, background music continues to play as normal.

    &#xA;

    In below complex filter, this is what I'm doing :&#xA;adelay filter : to start voiceover playing after 5 seconds into background music&#xA;volume filter : Since my background music is too loud and voiceover is too low, I'm increasing voiceover volume by 1.5 times, and lowering background music volume to 0.7 times&#xA;sidechaincompress filter : Then I'm applying sidechain filter to duck background music whenever voiceover is playing, with usual threshold, ratio & release filters

    &#xA;

    I've tried both amix & amerge, but results in same behaviour.

    &#xA;

    ffmpeg -i main.mp3 -i taekwondo.mp3 -filter_complex "[1:a]adelay=5000|5000,volume=1.5[a];[0:a]volume=0.7[b];[a]asplit=2[sc][mix];[b][sc]sidechaincompress=threshold=0.05:ratio=20:level_sc=1:release=500:attack=1[compr];[compr][mix]amix" output.mp3&#xA;

    &#xA;

  • ts video via UDP from ffmpeg to gstreamer [closed]

    23 janvier 2024, par aron.h

    Hardware : Jetson AGX ORIN&#xA;Software : Jetpack 5.0.2

    &#xA;

    I have been attempting to send a video file locally via UDP using ffmpeg :

    &#xA;

    ffmpeg -stream_loop -1 -re -i test.ts -map 0 -c copy -preset ultrafast -f mpegts "udp://127.0.0.1:5000"

    &#xA;

    And receiving the same stream via UDP using gstreamer :

    &#xA;

    gst-launch-1.0 udpsrc port=5000 ! application/x-rtp, media=video, clock-rate=90000, encoding-name=H264 ! rtph264depay ! decodebin ! videoconvert ! aasink

    &#xA;

    But I get an error on the receiving gstreamer end :

    &#xA;

    /GstPipeline:pipeline0/GstRtpH264Depay:rtph264depay0: Could not decode stream.&#xA;Additional debug info:&#xA;gstrtpbasedepayload.c(505): gst_rtp_base_depayload_handle_buffer (): &#xA;/GstPipeline:pipeline0/GstRtpH264Depay:rtph264depay0:&#xA;Received invalid RTP payload, dropping&#xA;ERROR: from element /GstPipeline:pipeline0/GstRtpH264Depay:rtph264depay0:&#xA;The stream is in the wrong format.&#xA;Additional debug info:&#xA;gstrtph264depay.c(1298): gst_rtp_h264_depay_process ():&#xA;/GstPipeline:pipeline0/GstRtpH264Depay:rtph264depay0:&#xA;NAL unit type 27 not supported yet&#xA;

    &#xA;

    More detailed information on the video file :

    &#xA;

    Original ID: 1002&#xA;Codec: H264 - MPEG-4 AVC (part 10) (h264)&#xA;Type: Video&#xA;Video resolution: 1920x1080&#xA;Buffer dimensions: 1920x1088&#xA;Frame rate: 30&#xA;Decoded format: &#xA;Orientation: Top left&#xA;Chroma location: left&#xA;

    &#xA;

    When I listen with the command gst-launch-1.0 -v udpsrc port=5000 ! fakesink dump=1, it is quite apparent that the packets from FFMPEG are being received.&#xA;I am not sure why gstreamer's rtph264depay says the stream is in the wrong format.

    &#xA;

    Would I have to check some details on the FFMPEG side ?&#xA;This is what information FFMPEG shows by default while running.

    &#xA;

    Input #0, mpegts, from &#x27;test.ts&#x27;:&#xA;  Duration: 00:00:57.36, start: 20902.827056, bitrate: 2504 kb/s&#xA;  Program 1&#xA;    Stream #0:0[0x3ea]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc&#xA;Output #0, mpegts, to &#x27;udp://127.0.0.1:5000&#x27;:&#xA;  Metadata:&#xA;    encoder         : Lavf58.29.100&#xA;    Stream #0:0: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 29.97 fps, 29.97 tbr, 90k tbn, 90k tbc&#xA;Stream mapping:&#xA;  Stream #0:0 -> #0:0 (copy)&#xA;Press [q] to stop, [?] for help&#xA;frame=  611 fps= 30 q=-1.0 Lsize=    5847kB time=00:00:20.62 bitrate=2323.0kbits/s speed=   1x&#xA;video:5350kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 9.301388%&#xA;

    &#xA;

    Any advice would be appreciated.

    &#xA;