Recherche avancée

Médias (0)

Mot : - Tags -/interaction

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

Autres articles (66)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

Sur d’autres sites (8356)

  • FFMPEG codec "Error opening filters" error on Windows server

    12 février 2019, par Frank Nicklin

    Im using NReco Videoconvertor on and asp.net web service but its failing with the error

    ****Error : Cannot convert media : Error opening filters !****

    When testing on my local development PC Windows 10 VS2017 it works fine. If I manually run ffmpeg as this too work fine

    ffmpeg -i c:\tempfolder\5239.hevc c:\tempfolder\5239.mp4.

    However if I try the same from my Windows 2016 Server I get a could not find codec parameters error :-

     D:\webservice\Bin>ffmpeg -i d:\video\1234.hevc d:\video\5225.mp4
    ffmpeg version N-56060-gbcd1c20 Copyright (c) 2000-2013 the FFmpeg developers
     built on Sep  6 2013 00:42:37 with gcc 4.7.3 (GCC)
     configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
     libavutil      52. 43.100 / 52. 43.100
     libavcodec     55. 31.101 / 55. 31.101
     libavformat    55. 16.101 / 55. 16.101
     libavdevice    55.  3.100 / 55.  3.100
     libavfilter     3. 83.104 /  3. 83.104
     libswscale      2.  5.100 /  2.  5.100
     libswresample   0. 17.103 /  0. 17.103
     libpostproc    52.  3.100 / 52.  3.100
    [mov,mp4,m4a,3gp,3g2,mj2 @ 028fa380] Could not find codec parameters for stream 0 (Video: none (hvc1 / 0x31637668), 352x288, 937 kb/s): unknown codec
    Consider increasing the value for the 'analyzeduration' and 'probesize' options
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'd:\video\1234.hevc':
     Metadata:
       major_brand     : qt
       minor_version   : 0
       compatible_brands: qt
       creation_time   : 2019-02-04 10:35:12
     Duration: 00:00:20.25, start: 0.000000, bitrate: 965 kb/s
       Stream #0:0(und): Video: none (hvc1 / 0x31637668), 352x288, 937 kb/s, 30.01 fps, 30 tbr, 600 tbn, 600 tbc (default)
       Metadata:
         rotate          : 90
         creation_time   : 2019-02-04 10:35:12
         handler_name    : Core Media Video
       Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 22050 Hz, mono, fltp, 23 kb/s (default)
       Metadata:
         creation_time   : 2019-02-04 10:35:12
         handler_name    : Core Media Audio

    Any thoughts please.

  • ffmpeg avcodec_send_packet/avcodec_receive_frame memory leak

    23 janvier 2019, par G Hamlin

    I’m attempting to decode frames, but memory usage grows with every frame (more specifically, with every call to avcodec_send_packet) until finally the code crashes with a bad_alloc. Here’s the basic decode loop :

    int rfret = 0;
    while((rfret = av_read_frame(inctx.get(), &packet)) >= 0){
       if (packet.stream_index == vstrm_idx) {

           //std::cout << "Sending Packet" << std::endl;
           int ret = avcodec_send_packet(ctx.get(), &packet);
           if (ret < 0 || ret == AVERROR(EAGAIN) || ret == AVERROR_EOF) {
               std::cout << "avcodec_send_packet: " << ret << std::endl;
               break;
           }

           while (ret  >= 0) {
               //std::cout << "Receiving Frame" << std::endl;
               ret = avcodec_receive_frame(ctx.get(), fr);
               if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF) {
                   //std::cout << "avcodec_receive_frame: " << ret << std::endl;
                   av_frame_unref(fr);
                   // av_frame_free(&fr);
                   break;
               }

               std::cout << "frame: " << ctx->frame_number << std::endl;

               // eventually do something with the frame here...

               av_frame_unref(fr);
               // av_frame_free(&fr);
           }
       }
       else {
           //std::cout << "Not Video" << std::endl;
       }
       av_packet_unref(&packet);
    }

    Memory usage/leakage seems to scale with the resolution of the video I’m decoding. For example, for a 3840x2160 resolution video, the memory usage in windows task manager consistently jumps up by about 8mb (1 byte per pixel ??) for each received frame. Do I need to do something besides call av_frame_unref to release the memory ?

    (more) complete code below


    void AVFormatContextDeleter(AVFormatContext* ptr)
    {
       if (ptr) {
           avformat_close_input(&ptr);
       }
    }

    void AVCodecContextDeleter(AVCodecContext* ptr)
    {
       if (ptr) {
           avcodec_free_context(&ptr);
       }
    }

    typedef std::unique_ptr AVFormatContextPtr;
    typedef std::unique_ptr AVCodecContextPtr;

    AVCodecContextPtr createAvCodecContext(AVCodec *vcodec)
    {
       AVCodecContextPtr ctx(avcodec_alloc_context3(vcodec), AVCodecContextDeleter);
       return ctx;
    }

    AVFormatContextPtr createFormatContext(const std::string& filename)
    {
       AVFormatContext* inctxPtr = nullptr;
       int ret = avformat_open_input(&inctxPtr, filename.c_str(), nullptr, nullptr);
       //    int ret = avformat_open_input(&inctx, "D:/Videos/test.mp4", nullptr, nullptr);
       if (ret != 0) {
           inctxPtr = nullptr;
       }

       return AVFormatContextPtr(inctxPtr, AVFormatContextDeleter);
    }

    int testDecode()
    {
       // open input file context
       AVFormatContextPtr inctx = createFormatContext("D:/Videos/Matt Chapman Hi Greg.MOV");

       if (!inctx) {
           // std::cerr << "fail to avforamt_open_input(\"" << infile << "\"): ret=" << ret;
           return 1;
       }

       // retrieve input stream information
       int ret = avformat_find_stream_info(inctx.get(), nullptr);
       if (ret < 0) {
           //std::cerr << "fail to avformat_find_stream_info: ret=" << ret;
           return 2;
       }

       // find primary video stream
       AVCodec* vcodec = nullptr;
       const int vstrm_idx = av_find_best_stream(inctx.get(), AVMEDIA_TYPE_VIDEO, -1, -1, &vcodec, 0);
       if (vstrm_idx < 0) {
           //std::cerr << "fail to av_find_best_stream: vstrm_idx=" << vstrm_idx;
           return 3;
       }

       AVCodecParameters* origin_par = inctx->streams[vstrm_idx]->codecpar;
       if (vcodec == nullptr) {  // is this even necessary?
           vcodec = avcodec_find_decoder(origin_par->codec_id);
           if (!vcodec) {
               // Can't find decoder
               return 4;
           }
       }

       AVCodecContextPtr ctx = createAvCodecContext(vcodec);
       if (!ctx) {
           return 5;
       }

       ret = avcodec_parameters_to_context(ctx.get(), origin_par);
       if (ret) {
           return 6;
       }

       ret = avcodec_open2(ctx.get(), vcodec, nullptr);
       if (ret < 0) {
           return 7;
       }

       //print input video stream informataion
       std::cout
               //<< "infile: " << infile << "\n"
               << "format: " << inctx->iformat->name << "\n"
               << "vcodec: " << vcodec->name << "\n"
               << "size:   " << origin_par->width << 'x' << origin_par->height << "\n"
               << "fps:    " << av_q2d(ctx->framerate) << " [fps]\n"
               << "length: " << av_rescale_q(inctx->duration, ctx->time_base, {1,1000}) / 1000. << " [sec]\n"
               << "pixfmt: " << av_get_pix_fmt_name(ctx->pix_fmt) << "\n"
               << "frame:  " << inctx->streams[vstrm_idx]->nb_frames << "\n"
               << std::flush;


       AVPacket packet;

       av_init_packet(&packet);
       packet.data = nullptr;
       packet.size = 0;

       AVFrame *fr = av_frame_alloc();
       if (!fr) {
           return 8;
       }

       int rfret = 0;
       while((rfret = av_read_frame(inctx.get(), &packet)) >= 0){
           if (packet.stream_index == vstrm_idx) {

               //std::cout << "Sending Packet" << std::endl;
               int ret = avcodec_send_packet(ctx.get(), &packet);
               if (ret < 0 || ret == AVERROR(EAGAIN) || ret == AVERROR_EOF) {
                   std::cout << "avcodec_send_packet: " << ret << std::endl;
                   break;
               }

               while (ret  >= 0) {
                   //std::cout << "Receiving Frame" << std::endl;
                   ret = avcodec_receive_frame(ctx.get(), fr);
                   if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF) {
                       //std::cout << "avcodec_receive_frame: " << ret << std::endl;
                       av_frame_unref(fr);
                       // av_frame_free(&fr);
                       break;
                   }

                   std::cout << "frame: " << ctx->frame_number << std::endl;

                   // do something with the frame here...

                   av_frame_unref(fr);
                   // av_frame_free(&fr);
               }
           }
           else {
               //std::cout << "Not Video" << std::endl;
           }
           av_packet_unref(&packet);
       }

       std::cout << "RFRET = " << rfret << std::endl;

       return 0;
    }

    Update 1 : (1/21/2019) Compiling on a different machine and running with different video files I am not seeing the memory usage growing without bound. I’ll try to narrow down where the difference lies (compiler ?, ffmpeg version ?, or video encoding ?)

    Update 2 : (1/21/2019) Ok, it looks like there is some interaction occurring between ffmpeg and Qt’s QCamera. In my application, I’m using Qt to manage the webcam, but decided to use ffmpeg libraries to handle decoding/encoding since Qt doesn’t have as comprehensive support for different codecs. If I have the camera turned on (through Qt), ffmpeg decoding memory consumption grows without bound. If the camera is off, ffmpeg behaves fine. I’ve tried this both with a physical camera (Logitech C920) and with a virtual camera using OBS-Virtualcam, with the same result. So far I’m baffled as to how the two systems are interacting...

  • ffmpeg - Convert mkv to mp4 on ubuntu 18.10 error ?

    28 mars 2020, par ScipioAfricanus

    I am trying to convert some mkvs to mp4s on Ubuntu 18.10 with ffmpeg, and I keep getting the error below. Aby thoughts ?

    I am following https://linuxconfig.org/install-ffmpeg-on-ubuntu-18-04-bionic-beaver-linux#h2-operating-system-and-software-versions

    I have installed ffmpeg and installed :

    sudo apt install -y libopus-dev libmp3lame-dev libfdk-aac-dev libvpx-dev libx264-dev yasm libass-dev libtheora-dev libvorbis-dev mercurial cmake

    Command I ran with output :

    ffmpeg -i 'video.mkv' -codec copy 'video.mp4' -strict -2 -y
    ffmpeg version 4.0.2-2 Copyright (c) 2000-2018 the FFmpeg developers
     built with gcc 8 (Ubuntu 8.2.0-7ubuntu1)
     configuration: --prefix=/usr --extra-version=2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
     libavutil      56. 14.100 / 56. 14.100
     libavcodec     58. 18.100 / 58. 18.100
     libavformat    58. 12.100 / 58. 12.100
     libavdevice    58.  3.100 / 58.  3.100
     libavfilter     7. 16.100 /  7. 16.100
     libavresample   4.  0.  0 /  4.  0.  0
     libswscale      5.  1.100 /  5.  1.100
     libswresample   3.  1.100 /  3.  1.100
     libpostproc    55.  1.100 / 55.  1.100
    Trailing options were found on the commandline.
    Input #0, matroska,webm, from 'ALL nyannyancosplay tik toks (Chronological order) (HD-720p)-WxewnMF4j6Y.mkv':
     Metadata:
       COMPATIBLE_BRANDS: iso6avc1mp41
       MAJOR_BRAND     : dash
       MINOR_VERSION   : 0
       ENCODER         : Lavf58.12.100
     Duration: 00:27:39.74, start: -0.007000, bitrate: 834 kb/s
       Stream #0:0: Video: h264 (Main), yuv420p(progressive), 790x720 [SAR 1:1 DAR 79:72], 29.97 fps, 29.97 tbr, 1k tbn, 59.94 tbc (default)
       Metadata:
         HANDLER_NAME    : ISO Media file produced by Google Inc. Created on: 01/13/2019.
         DURATION        : 00:27:39.724000000
       Stream #0:1(eng): Audio: opus, 48000 Hz, stereo, fltp (default)
       Metadata:
         DURATION        : 00:27:39.741000000
    [mp4 @ 0x560e85326100] track 1: codec frame size is not set
    [mp4 @ 0x560e85326100] opus in MP4 support is experimental, add '-strict -2' if you want to use it.
    Could not write header for output file #0 (incorrect codec parameters ?): Experimental feature
    Stream mapping:
     Stream #0:0 -> #0:0 (copy)
     Stream #0:1 -> #0:1 (copy)
       Last message repeated 1 times

    I also tried adding -strict -2 to no avail.