Recherche avancée

Médias (1)

Mot : - Tags -/censure

Autres articles (99)

  • Automated installation script of MediaSPIP

    25 avril 2011, par

    To overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
    You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
    The documentation of the use of this installation script is available here.
    The code of this (...)

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

  • Que fait exactement ce script ?

    18 janvier 2011, par

    Ce script est écrit en bash. Il est donc facilement utilisable sur n’importe quel serveur.
    Il n’est compatible qu’avec une liste de distributions précises (voir Liste des distributions compatibles).
    Installation de dépendances de MediaSPIP
    Son rôle principal est d’installer l’ensemble des dépendances logicielles nécessaires coté serveur à savoir :
    Les outils de base pour pouvoir installer le reste des dépendances Les outils de développements : build-essential (via APT depuis les dépôts officiels) ; (...)

Sur d’autres sites (9976)

  • FFmpeg leaks memory after closing activity

    28 juillet 2015, par grunk

    I’m trying to implements a rtsp player based on the roman10 tutorial.
    I can play a stream but each time i leave the activity a lot of memory is leaked.
    After some research it appears that the bitmap which is a global jobject is the cause :

    jobject createBitmap(JNIEnv *pEnv, int pWidth, int pHeight) {
       int i;
       //get Bitmap class and createBitmap method ID
       jclass javaBitmapClass = (jclass)(*pEnv)->FindClass(pEnv, "android/graphics/Bitmap");
       jmethodID mid = (*pEnv)->GetStaticMethodID(pEnv, javaBitmapClass, "createBitmap", "(IILandroid/graphics/Bitmap$Config;)Landroid/graphics/Bitmap;");
       //create Bitmap.Config
       //reference: https://forums.oracle.com/thread/1548728
       const wchar_t* configName = L"ARGB_8888";
       int len = wcslen(configName);
       jstring jConfigName;
       if (sizeof(wchar_t) != sizeof(jchar)) {
           //wchar_t is defined as different length than jchar(2 bytes)
           jchar* str = (jchar*)malloc((len+1)*sizeof(jchar));
           for (i = 0; i < len; ++i) {
               str[i] = (jchar)configName[i];
           }
           str[len] = 0;
           jConfigName = (*pEnv)->NewString(pEnv, (const jchar*)str, len);
       } else {
           //wchar_t is defined same length as jchar(2 bytes)
           jConfigName = (*pEnv)->NewString(pEnv, (const jchar*)configName, len);
       }
       jclass bitmapConfigClass = (*pEnv)->FindClass(pEnv, "android/graphics/Bitmap$Config");
       jobject javaBitmapConfig = (*pEnv)->CallStaticObjectMethod(pEnv, bitmapConfigClass,
               (*pEnv)->GetStaticMethodID(pEnv, bitmapConfigClass, "valueOf", "(Ljava/lang/String;)Landroid/graphics/Bitmap$Config;"), jConfigName);
       //create the bitmap
       return (*pEnv)->CallStaticObjectMethod(pEnv, javaBitmapClass, mid, pWidth, pHeight, javaBitmapConfig);
    }

    The bitmap is created like this :

    bitmap = createBitmap(...);

    When the activity is closed this method is called :

    void finish(JNIEnv *pEnv) {
       //unlock the bitmap
       AndroidBitmap_unlockPixels(pEnv, bitmap);
       av_free(buffer);
       // Free the RGB image
       av_free(frameRGBA);
       // Free the YUV frame
       av_free(decodedFrame);
       // Close the codec
       avcodec_close(codecCtx);
       // Close the video file
       avformat_close_input(&formatCtx);
    }

    The bitmap seems to never be freed, just unlocked.

    What should i do be sure to get back all the memory ?

    Note : i’m using ffmpeg 2.5.2.

  • Trying to use decklink output from ffmpeg's libavdevice in a C++ app

    10 février 2021, par Raster

    I'm trying to add support for decklink devices in an video streaming app that my company is developing. We're using C++ and FFMpeg as a processing library. Other types of inputs and outputs are working. Adding support for decklink inputs was really easy, it just worked (at least with the device we tested it on - DeckLink SDI Quad). But for outputs... I'm fighting this for 3 days as of now with no results. I cannot find any docs for this, neither I can find any code example, how should I initialize AVFormatContext and other parts that are needed.

    


    By reading FFMpeg's decklink avdevice code, I managed to get to the point that AVFormatContext doesn't complain about incorrect data format anymore. I'm using wrapped_avframe and pcm_s16le as a codecs, I'm setting (converting) video and audio params to values accepted by device, I'm sending AVPackets with av_interleaved_write_frame, and it doesn't work. Couple of packets are being accepted, couple of libDeckLinkAPI.so threads are spawned, and it just locks - my output thread locks on some 80-ish call to av_interleaved_write_frame. And it is a deadlock, it never goes any further. Debugger shows only that it is waiting for something :

    


    #0  futex_wait_cancelable (private=<optimized out="out">, expected=0, futex_word=0x7fe34c0402c8) at ../sysdeps/nptl/futex-internal.h:183&#xA;#1  __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x7fe34c040178, cond=0x7fe34c0402a0) at pthread_cond_wait.c:508&#xA;#2  __pthread_cond_wait (cond=0x7fe34c0402a0, mutex=0x7fe34c040178) at pthread_cond_wait.c:638&#xA;#3  0x00007fe35c69bd04 in ?? () from /lib/libDeckLinkAPI.so&#xA;#4  0x00007fe371394ac7 in ?? () from /lib/libavdevice.so.58&#xA;#5  0x00007fe370f249ad in ?? () from /lib/libavformat.so.58&#xA;#6  0x00007fe370f26615 in av_interleaved_write_frame () from /lib/libavformat.so.58&#xA;</optimized>

    &#xA;

    I'm obviously doing something wrong, but I can't find what...&#xA;Can anyone point me to some documentation or (working) code example how it should be done ?

    &#xA;

    Thanks in advance :)

    &#xA;

  • Electron, Chromium and ffmpeg licencing confusion [closed]

    12 mars 2021, par Iamisti

    Intro :&#xA;Recently I'm working on an electron based application that is free to use but also has subscription based services.&#xA;It came to my attention that ffmpeg is shipped with electron, which has GPL/LGPL licence.

    &#xA;

    My quetion is :

    &#xA;

      &#xA;
    • Am I legally able to still distribute the application and be licence-compliant with ffmpeg without owning any proper licence to it ? I thought chromium dealt with the licencing on this topic since so many applications nowadays are shipped with using electron and chromium under the hood.
    • &#xA;

    • How do I compile/build electron to make it licence compatible (in case its not ?)
    • &#xA;

    &#xA;

    I did a lot of reseearch and I found out the followings :

    &#xA;

      &#xA;
    • ffmpeg is shipped with chromium, they built their own version of ffmpeg and it seems they also have licence for it. Although that might be that they just push the responsibility down on the software developer/company who distributes their application with chromium.&#xA;Chromium licence for ffmpeg : https://chromium.googlesource.com/chromium/third_party/ffmpeg/+/703e920bb75053bf6b87d41d198cbbfbce3fb7ad/LICENSE

      &#xA;

    • &#xA;

    • Apparently ffmpeg has a checklist of how to be licence compliant. Does that mean if I do all these steps, I can still distribute the application and can legally use it ? Licence checklist for ffmpeg : http://ffmpeg.org/legal.html

      &#xA;

    • &#xA;

    • checking out some popular electron applications like Discord, Figma, Slack, etc... they ALL have ffmpeg included cause of electron when you install them. I wonder how they made it legal ? I don't see any of these checklists done on any of these popular applications.

      &#xA;

    • &#xA;

    &#xA;

    I'm know very little regarding licences, so any help would be incredibly huge help for me.

    &#xA;