Recherche avancée

Médias (3)

Mot : - Tags -/collection

Autres articles (50)

  • Encodage et transformation en formats lisibles sur Internet

    10 avril 2011

    MediaSPIP transforme et ré-encode les documents mis en ligne afin de les rendre lisibles sur Internet et automatiquement utilisables sans intervention du créateur de contenu.
    Les vidéos sont automatiquement encodées dans les formats supportés par HTML5 : MP4, Ogv et WebM. La version "MP4" est également utilisée pour le lecteur flash de secours nécessaire aux anciens navigateurs.
    Les documents audios sont également ré-encodés dans les deux formats utilisables par HTML5 :MP3 et Ogg. La version "MP3" (...)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • Ajouter notes et légendes aux images

    7 février 2011, par

    Pour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
    Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
    Modification lors de l’ajout d’un média
    Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)

Sur d’autres sites (9756)

  • C++ ffmpeg and SDL2 video rendering memory leak

    10 avril 2017, par kj192

    I have made a small program what plays a video in SDL2.0 and FFmpeg.
    The software does work and do it is purpose.
    I have left the software running and I have faced a huge memory consumption and started to look online what can I do against it.
    I have used the following tutorials :
    http://www.developersite.org/906-59411-FFMPEG
    http://ardrone-ailab-u-tokyo.blogspot.co.uk/2012/07/212-ardrone-20-video-decording-ffmpeg.html

    I wonder if someone can give advice what do I do wrong. I have tried valgrind but I can’t find any information. I have did try to comment out sections and what I have seen even if I’m not rendering to the display the memory usage is growing and after delete something still not been freed up :

    if (av_read_frame(pFormatCtx, &packet) >= 0)

    the whole source code is here :
    main :

    #include
    #include <ios>
    #include <iostream>
    #include <fstream>
    #include
    #include <sdl2></sdl2>SDL.h>
    #include "video.h"
    using namespace std;

    void memory()
    {
    using std::ios_base;
    using std::ifstream;
    using std::string;

    double vm_usage     = 0.0;
    double resident_set = 0.0;

    // 'file' stat seems to give the most reliable results
    //
    ifstream stat_stream("/proc/self/stat",ios_base::in);

    // dummy vars for leading entries in stat that we don't care about
    //
    string pid, comm, state, ppid, pgrp, session, tty_nr;
    string tpgid, flags, minflt, cminflt, majflt, cmajflt;
    string utime, stime, cutime, cstime, priority, nice;
    string O, itrealvalue, starttime;

    // the two fields we want
    //
    unsigned long vsize;
    long rss;

    stat_stream >> pid >> comm >> state >> ppid >> pgrp >> session >> tty_nr
               >> tpgid >> flags >> minflt >> cminflt >> majflt >> cmajflt
               >> utime >> stime >> cutime >> cstime >> priority >> nice
               >> O >> itrealvalue >> starttime >> vsize >> rss; // don't care about the rest

    stat_stream.close();

    long page_size_kb = sysconf(_SC_PAGE_SIZE) / 1024; // in case x86-64 is configured to use 2MB pages
    vm_usage     = vsize / 1024.0;
    resident_set = rss * page_size_kb;
    std::cout&lt;&lt;"VM: " &lt;&lt; vm_usage &lt;&lt; " RE:"&lt;&lt; resident_set &lt;&lt; std::endl;
    }


    int main()
    {
    //This example using 1280x800 video
    av_register_all();
    if( SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_TIMER ))
    {
       fprintf(stderr, "Could not initialize SDL - %s\n", SDL_GetError());
       exit(1);
    }
    SDL_Window* sdlWindow = SDL_CreateWindow("Video Window", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 1280, 800, SDL_WINDOW_OPENGL);
    if( !sdlWindow )
    {
       fprintf(stderr, "SDL: could not set video mode - exiting\n");
       exit(1);
    }
    SDL_Renderer* sdlRenderer = SDL_CreateRenderer(sdlWindow, -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC | SDL_RENDERER_TARGETTEXTURE);
    SDL_Texture* sdlTexture = SDL_CreateTexture(sdlRenderer, SDL_PIXELFORMAT_YV12, SDL_TEXTUREACCESS_STREAMING, 1280, 800);
    if(!sdlTexture)
    {
       return -1;
    }
    SDL_SetTextureBlendMode(sdlTexture,SDL_BLENDMODE_BLEND );
    //VIDEO RESOLUTION
    SDL_Rect sdlRect;
    sdlRect.x = 0;
    sdlRect.y = 0;
    sdlRect.w = 1280;
    sdlRect.h = 800;    
    memory();
    for(int i = 1; i &lt; 6; i++)
    {
       memory();  
       video* vid = new video("vid.mp4");  
       while (!vid -> getFinished())
       {
           memory();
           vid -> Update(sdlTexture);
           SDL_RenderCopy(sdlRenderer,sdlTexture,&amp;sdlRect,&amp;sdlRect);
           SDL_RenderPresent(sdlRenderer);
       }
       delete vid;
       memory();
    }  
    SDL_DestroyTexture(sdlTexture);
    SDL_DestroyRenderer(sdlRenderer);
    SDL_DestroyWindow(sdlWindow);
    SDL_Quit();
    return 0;
    }
    </fstream></iostream></ios>

    video.cpp

    #include "video.h"

    video::video(const std::string&amp; name) : _finished(false)
    {
    av_register_all();
    pFormatCtx = NULL;
    pCodecCtxOrig = NULL;
    pCodecCtx = NULL;
    pCodec = NULL;
    pFrame = NULL;
    sws_ctx = NULL;
    if (avformat_open_input(&amp;pFormatCtx, name.c_str(), NULL, NULL) != 0)
    {
    _finished = true; // Couldn't open file
    }
    // Retrieve stream information
    if (avformat_find_stream_info(pFormatCtx, NULL) &lt; 0)
    {
    _finished = true; // Couldn't find stream information
    }
    videoStream = -1;
    for (i = 0; i &lt; pFormatCtx->nb_streams; i++)
    {
       if (pFormatCtx->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO)
       {
           videoStream = i;
           break;
       }
    }
    if (videoStream == -1)
    {
       _finished = true; // Didn't find a video stream
    }
    // Get a pointer to the codec context for the video stream
    pCodecCtxOrig = pFormatCtx->streams[videoStream]->codec;
    // Find the decoder for the video stream
    pCodec = avcodec_find_decoder(pCodecCtxOrig->codec_id);
    if (pCodec == NULL)
    {
       fprintf(stderr, "Unsupported codec!\n");
       _finished = true; // Codec not found
    }
    pCodecCtx = avcodec_alloc_context3(pCodec);
    if (avcodec_copy_context(pCodecCtx, pCodecCtxOrig) != 0)
    {
       fprintf(stderr, "Couldn't copy codec context");
       _finished = true; // Error copying codec context
    }
    // Open codec
    if (avcodec_open2(pCodecCtx, pCodec, NULL) &lt; 0)
    {
       _finished = true; // Could not open codec
    }
    // Allocate video frame
    pFrame = av_frame_alloc();
    sws_ctx = sws_getContext(pCodecCtx->width, pCodecCtx->height,
    pCodecCtx->pix_fmt, pCodecCtx->width, pCodecCtx->height,
    AV_PIX_FMT_YUV420P,
    SWS_BILINEAR,
    NULL,
    NULL,
    NULL);
    yPlaneSz = pCodecCtx->width * pCodecCtx->height;
    uvPlaneSz = pCodecCtx->width * pCodecCtx->height / 4;
    yPlane = (Uint8*)malloc(yPlaneSz);
    uPlane = (Uint8*)malloc(uvPlaneSz);
    vPlane = (Uint8*)malloc(uvPlaneSz);
    if (!yPlane || !uPlane || !vPlane)
    {
       fprintf(stderr, "Could not allocate pixel buffers - exiting\n");
       exit(1);
    }
    uvPitch = pCodecCtx->width / 2;
    }
    void video::Update(SDL_Texture* texture)
    {
    if (av_read_frame(pFormatCtx, &amp;packet) >= 0)
    {
       // Is this a packet from the video stream?
       if (packet.stream_index == videoStream)
       {
           avcodec_decode_video2(pCodecCtx, pFrame, &amp;frameFinished, &amp;packet);
           // Did we get a video frame?
           if (frameFinished)
           {
               AVPicture pict;
               pict.data[0] = yPlane;
               pict.data[1] = uPlane;
               pict.data[2] = vPlane;
               pict.linesize[0] = pCodecCtx->width;
               pict.linesize[1] = uvPitch;
               pict.linesize[2] = uvPitch;
               // Convert the image into YUV format that SDL uses
               sws_scale(sws_ctx, (uint8_t const * const *) pFrame->data,pFrame->linesize, 0, pCodecCtx->height, pict.data,pict.linesize);
               SDL_UpdateYUVTexture(texture,NULL,yPlane,pCodecCtx->width,uPlane,uvPitch,vPlane,uvPitch);
           }
       }
       // Free the packet that was allocated by av_read_frame
       av_packet_unref(&amp;packet);
       av_freep(&amp;packet);
    }
    else
    {
       av_packet_unref(&amp;packet);
       av_freep(&amp;packet);
       _finished = true;
    }
    }
    bool video::getFinished()
    {
    return _finished;
    }
    video::~video()
    {
    av_packet_unref(&amp;packet);
    av_freep(&amp;packet);
    av_frame_free(&amp;pFrame);
    av_freep(&amp;pFrame);
    free(yPlane);
    free(uPlane);
    free(vPlane);
    // Close the codec
    avcodec_close(pCodecCtx);
    avcodec_close(pCodecCtxOrig);
    sws_freeContext(sws_ctx);
    // Close the video file
    for (int i = 0; i &lt; pFormatCtx->nb_streams; i++)
    {
       AVStream *stream = pFormatCtx->streams[i];
       avcodec_close(stream->codec);
    }
    avformat_close_input(&amp;pFormatCtx);
    /*av_dict_free(&amp;optionsDict);  
    sws_freeContext(sws_ctx);
    av_free_packet(&amp;packet);
    av_free(pFrameYUV);
    av_free(buffer);
    avcodec_close(pCodecCtx);
    avformat_close_input(&amp;pFormatCtx);*/
    }

    video.h

    #include <string>
    #include <sdl2></sdl2>SDL.h>
    #ifdef __cplusplus
    extern "C" {
    #endif
    #include <libavcodec></libavcodec>avcodec.h>
    #include <libavformat></libavformat>avformat.h>
    #include <libswscale></libswscale>swscale.h>
    #ifdef __cplusplus
    }
    #endif

    class video
    {
      private:
       bool _finished;
       AVFormatContext *pFormatCtx;
       int videoStream;
       unsigned i;
       AVCodecContext *pCodecCtxOrig;
       AVCodecContext *pCodecCtx;
       AVCodec *pCodec;
       AVFrame *pFrame;
       AVPacket packet;
       int frameFinished;
       struct SwsContext *sws_ctx;
       Uint8 *yPlane, *uPlane, *vPlane;
       size_t yPlaneSz, uvPlaneSz;
       int uvPitch;
      public:
       video(const std::string&amp; name);
       ~video();
       void Update(SDL_Texture* texture);
       bool getFinished();
    };
    </string>

    I’m looking forward to your answers

  • Dreamcast SD Adapter and DreamShell

    31 décembre 2014, par Multimedia Mike — Sega Dreamcast

    Nope ! I’m never going to let go of the Sega Dreamcast hacking. When I was playing around with Dreamcast hacking early last year, I became aware that there is such a thing as an SD card adapter for the DC that plugs into the port normally reserved for the odd DC link cable. Of course I wanted to see what I could do with it.

    The primary software that leverages the DC SD adapter is called DreamShell. Working with this adapter and the software requires some skill and guesswork. Searching for these topics tends to turn up results from various forums where people are trying to cargo-cult their way to solutions. I have a strange feeling that this post might become the unofficial English-language documentation on the matter.

    Use Cases
    What can you do with this thing ? Undoubtedly, the primary use is for backing up (ripping) the contents of GD-ROMs (the custom optical format used for the DC) and playing those backed up (ripped) copies. Presumably, users of this device leverage the latter use case more than the former, i.e., download ripped games, load them on the SD card, and launch them using DreamShell.

    However, there are other uses such as multimedia playback, system exploration, BIOS reprogramming, high-level programming, and probably a few other things I haven’t figured out yet.

    Delivery
    I put in an order via the dc-sd.com website and in about 2 short months, the item arrived from China. This marked my third lifetime delivery from China and curiously, all 3 of the shipments have pertained to the Sega Dreamcast.


    Dreamcast SD Adapter package

    Click for larger image


    I thought it was very interesting that this adapter came in such complete packaging. The text is all in Chinese, though the back states “Windows 98 / ME / 2000 / XP, Mac OS 9.1, LINUX2.4”. That’s what tipped me off that they must have just cannibalized some old USB SD card readers and packaging in order to create these. Closer inspection of the internals through the translucent pink case confirms this.

    Usage
    According to its change log, DreamShell has been around for a long time with version 1.0.0 released in February of 2004. The current version is 4.0.0 RC3. There are several downloads available :

    1. DreamShell 4.0 RC 3 CDI Image
    2. DreamShell 4.0 RC 3 + Boot Loader
    3. DreamShell 4.0 RC 3 + Core CDI image

    Option #2 worked for me. It contains a CDI disc image and the DreamShell files in a directory named DS/.

    Burn the CDI to a CD-R in the normal way you would burn a bootable Dreamcast disc from a CDI image. This is open-ended and left as an exercise to the reader, since there are many procedures depending on platform. On Linux, I used a small script I found once called burncdi-dc.sh.

    Then, copy the contents of the DS/ folder to an SD card. As for filesystem, FAT16 and FAT32 are both known to work. The files in DS/ should land in the root of the SD card ; the folder DS/ should not be in the root.

    Plug the SD card into the DC SD adapter and plug the adapter in the link cable port on the back of the Dreamcast. Then, boot the disc. If it works, you will see this minor corruption of the usual Sega licensing screen :


    DreamShell logo on Dreamcast startup

    Then, there will be a brief white-on-black text screen that explains the booting process :


    DreamShell booting text

    Then, there will be the main DreamShell logo :


    DreamShell logo

    Finally, you will land on the DreamShell main desktop :


    DreamShell 4.0.0 RC3 main desktop

    Skepticism
    At first, I was supremely skeptical of the idea that this SD adapter could perform speedily enough to play games reasonably. This was predicated on the observation that my DC coder’s cable that I used to use for homebrew development could not transfer faster than 115200 bits/second, amounting to about 11 kbytes/sec. I assumed that this was a fundamental limitation of the link port.

    In fact, I ripped a few of my Dreamcast discs over a decade ago and still have those rips lying around. So I copied the ISO image of Resident Evil : Code Veronica — the game I personally played most on the DC — to the SD card (anywhere works) and used the “ISO loader” icon seen on the desktop above to launch the game.

    It works :


    Resident Evil: Code Veronica title

    The opening FMV plays at full speed. Everything loads as fast as I remember. I was quite surprised.

    Digression : My assumptions about serial speeds have often been mistaken. 10 years ago, I heard stories about how we would soon be able to watch streaming video on our cell phones. I scoffed because I thought the 56K limitation of dialup modems was some sort of fundamental speed-of-light type of limitation for telephony bandwidth, wired or wireless.

    The desktop menu also includes a ‘speedtest’ tool that profiles the write and read performance of your preferred storage medium. For my fastest SD card (a PNY 2 GB card) :


    DreamShell speedtest utility

    This is probably more representative of the true adapter bandwidth as reading and writing is a good deal faster through more modern interfaces on PC and Mac with this same card.

    Look at the other options on the speedtest console. Hard drive ? Apparently, it’s possible, but it requires a good deal more hardware hacking than just purchasing this SD adapter.

    Ripping
    As you can see from the Resident Evil screenshot, playing games works quite nicely. How about ripping ? I’m pleased to say that DreamShell has a beautiful ripping interface :


    Ripping a GD-ROM using DreamShell

    Enter a name for the disc (or read the disc label), select the storage medium, and let it, well, rip. It indicates which track it’s working on and the Sega logo acts as a progress bar, shading blue as the track rip progresses.

    I’m finally, efficiently, archiving that collection of Sega Dreamcast demo discs ; I’m hoping they’ll eventually find a home at the Internet Archive. How is overall ripping performance ? Usually about 38-40 minutes to rip a full 900-1000 MB. That certainly beats the 27-28 hours that were required when I performed the ripping at 11 kbytes/sec via the DC coders cable.

    All is well until I get a sector reading error :


    DreamShell ripping error

    That’s when it can come in handy to have 3 DC consoles (see ?! not crazy !).

    Other Uses
    There’s a file explorer. You can browse the filesystem of the SD card, visual memory unit, or the CD portion of the GD-ROM (would be more useful if it accessed the GD area). There are FFmpeg files included. So I threw a random Cinepak file and random MPEG-1 file at it to see what happens. MPEG-1 didn’t do anything, but this Cinepak file from some Sierra game played handily :


    DreamShell playing Cinepak

    If you must enter strings, it helps to have a Dreamcast keyboard (which I do). Failing that, here’s a glimpse of the onscreen keyboard that DreamShell equips :


    DreamShell onscreen keyboard

    Learning to use it is a game in itself.

    There is an option of installing DreamShell in the BIOS. I did not attempt this. I don’t know if it’s possible (not like there’s a lot of documentation)– perhaps a custom BIOS modchip is needed. But here’s what the screen looks like :


    DreamShell BIOS installation menu

    There is also a plain console to interact with (better have a physical keyboard). There are numerous file manipulation commands and custom system interaction commands. I see one interesting command called ‘addr’ that looks useful for dumping memory regions to a file.

    A Lua language interpreter is also built in. I would love to play with this if I could ascertain whether DreamShell provided Dreamcast-specific APIs.

    Tips And Troubleshooting
    I have 3 Dreamcast consoles, affectionately named Terran, Protoss, and Zerg after the StarCraft II stickers with which they are adorned. Some seem to work better than others. Protoss seemed to be able to boot the DreamShell disc more reliably than the others. However, I was alarmed when it couldn’t boot one morning when it was churning the previous day.

    I think the problem is that it was just cold. That seemed to be the issue. I put in a normal GD-ROM and let it warm up on that disc for awhile and then DreamShell booted fine. So that’s my piece of cargo-culting troubleshooting advice.

  • Building my own FFmpeg for android in Ubuntu 14.04 LTS (Vitamio)

    16 août 2016, par EduardoUstarez

    I am trying to build FFmpeg because I realized that my app doesn’t work for android 6.0 in x86 devices before that I have published my app with targetsdkversion 23 (It has text relocations) and now I can’t publish my app using targetsdkversion 22 (This is the way that I could fix the problem). So I read a lot about this problem It seems there isn’t a solution. Some people say that I can compile ffmpeg using —disable-asm flag and I can solve the problem. I want to generate a libffmeg.so for vitamio that works on x86 android 6.0.

    I am using

    Ubuntu 14.04 LTS

    Android NDK r12b

    And my example project is Vitamio-5.0.2 from Download

    So I am working on this tutorial

    This is my FFmpeg-Android.sh file

    #!/bin/bash

    export ANDROID_NDK=/home/myuser/Downloads/android-ndk-r12b

    DEST=`pwd`/build/ffmpeg &amp;&amp; rm -rf $DEST
    SOURCE=`pwd`/ffmpeg

    if [ -d ffmpeg ]; then
     cd ffmpeg
    else
     git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg
     cd ffmpeg
    fi

    git reset --hard
    git clean -f -d
    git checkout `cat ../ffmpeg-version`
    patch -p1 &lt;../FFmpeg-VPlayer.patch
    [ $PIPESTATUS == 0 ] || exit 1

    git log --pretty=format:%H -1 > ../ffmpeg-version

    TOOLCHAIN=$ANDROID_NDK/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86
    SYSROOT=$ANDROID_NDK/platforms/android-14/arch-arm/
    $ANDROID_NDK/build/tools/make-standalone-toolchain.sh --platform=android-14 --install-dir=$TOOLCHAIN

    export PATH=$TOOLCHAIN/bin:$PATH
    export CC="ccache arm-linux-androideabi-gcc"
    export LD=arm-linux-androideabi-ld
    export AR=arm-linux-androideabi-ar

    CFLAGS="-O3 -Wall -mthumb -pipe -fpic -fasm \
     -finline-limit=300 -ffast-math \
     -fstrict-aliasing -Werror=strict-aliasing \
     -fmodulo-sched -fmodulo-sched-allow-regmoves \
     -Wno-psabi -Wa,--noexecstack \
     -D__ARM_ARCH_5__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5TE__ \
     -DANDROID -DNDEBUG"

    FFMPEG_FLAGS="--target-os=linux \
     --arch=arm \
     --enable-cross-compile \
     --cross-prefix=arm-linux-androideabi- \
     --enable-shared \
     --enable-static \
     --disable-symver \
     --disable-doc \
     --disable-ffplay \
     --disable-ffmpeg \
     --disable-ffprobe \
     --disable-ffserver \
     --disable-avdevice \
     --disable-avfilter \
     --disable-encoders \
     --disable-muxers \
     --disable-filters \
     --disable-devices \
     --disable-everything \
     --enable-protocols  \
     --enable-parsers \
     --enable-demuxers \
     --enable-decoders \
     --enable-bsfs \
     --enable-network \
     --enable-swscale  \
     --disable-demuxer=sbg \
     --disable-demuxer=dts \
     --disable-parser=dca \
     --disable-decoder=dca \
     --disable-asm \
     --enable-version3"


    for version in neon armv7 vfp armv6; do

     cd $SOURCE

     case $version in
       neon)
         EXTRA_CFLAGS="-march=armv7-a -mfpu=neon -mfloat-abi=softfp -mvectorize-with-neon-quad"
         EXTRA_LDFLAGS="-Wl,--fix-cortex-a8"
         ;;
       armv7)
         EXTRA_CFLAGS="-march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp"
         EXTRA_LDFLAGS="-Wl,--fix-cortex-a8"
         ;;
       vfp)
         EXTRA_CFLAGS="-march=armv6 -mfpu=vfp -mfloat-abi=softfp"
         EXTRA_LDFLAGS=""
         ;;
       armv6)
         EXTRA_CFLAGS="-march=armv6"
         EXTRA_LDFLAGS=""
         ;;
       *)
         EXTRA_CFLAGS=""
         EXTRA_LDFLAGS=""
         ;;
     esac

     PREFIX="$DEST/$version" &amp;&amp; mkdir -p $PREFIX
     FFMPEG_FLAGS="$FFMPEG_FLAGS --prefix=$PREFIX"

     ./configure $FFMPEG_FLAGS --extra-cflags="$CFLAGS $EXTRA_CFLAGS" --extra-ldflags="$EXTRA_LDFLAGS" | tee $PREFIX/configuration.txt
     cp config.* $PREFIX
     [ $PIPESTATUS == 0 ] || exit 1

     make clean
     make -j4 || exit 1
     make install || exit 1

     rm libavcodec/inverse.o
     $CC -lm -lz -shared --sysroot=$SYSROOT -Wl,--no-undefined -Wl,-z,noexecstack $EXTRA_LDFLAGS libavutil/*.o libavutil/arm/*.o libavcodec/*.o libavcodec/arm/*.o libavformat/*.o libswresample/*.o libswscale/*.o -o $PREFIX/libffmpeg.so

     cp $PREFIX/libffmpeg.so $PREFIX/libffmpeg-debug.so
     arm-linux-androideabi-strip --strip-unneeded $PREFIX/libffmpeg.so

    done

    https://www.vitamio.org/en/2013/Tutorial_0509/13.html

    The other files are the same as url provides

    Then the result is

    enter image description here

    I have deleted -Werror=strict-aliasing from CFLAGS and it generates the other .so files less libffmpeg.so

    enter image description here

    The error is in this code line

    $CC -lm -lz -shared --sysroot=$SYSROOT -Wl,--no-undefined -Wl,-z,noexecstack $EXTRA_LDFLAGS libavutil/*.o libavutil/arm/*.o libavcodec/*.o libavcodec/arm/*.o libavformat/*.o libswresample/*.o libswscale/*.o -o $PREFIX/libffmpeg.so

    I have removed ccache from export CC="ccache arm-linux-androideabi-gcc"
    and I have an error

    enter image description here

    I have changed —disable-asm to —enable-asm and I have compiled FFmpeg-Android.sh correctly

    enter image description here

    I copied the libffmpeg.so generated in armv6, armv7, neon and vfp files in my android studio project.

    I don’t know if I copied libffmpeg.so files in the correct place

    armv6 -> arm64-v8a
    armv7 -> armeabi-v7a
    neon  -> x86

    enter image description here

    And the result in Android Studio

    I/Vitamio[5.0.2][Player]: Copyright (c) YIXIA (http://yixia.com).
                             THIS SOFTWARE (Vitamio) IS WORK OF YIXIA (http://yixia.com)
    I/Vitamio[5.0.2][Player]: LOAD FFMPEG START: libffmpeg.so
    E/Vitamio[5.0.2][Player]: FIND_NAME_SYM ffmpeg, av_copy_packet
    E/Vitamio[5.0.2][Player]: FIND_NAME_SYM ffmpeg, avfilter_register_all
    E/Vitamio[5.0.2][Player]: FIND_NAME_SYM ffmpeg, avfilter_uninit
    E/Vitamio[5.0.2][Player]: FIND_NAME_SYM ffmpeg, avfilter_get_by_name
    E/Vitamio[5.0.2][Player]: FIND_NAME_SYM ffmpeg, avfilter_inout_alloc
    E/Vitamio[5.0.2][Player]: FIND_NAME_SYM ffmpeg, avfilter_inout_free
    E/Vitamio[5.0.2][Player]: FIND_NAME_SYM ffmpeg, avfilter_graph_alloc
    E/Vitamio[5.0.2][Player]: FIND_NAME_SYM ffmpeg, avfilter_graph_create_filter
    E/Vitamio[5.0.2][Player]: FIND_NAME_SYM ffmpeg, avfilter_graph_parse
    E/Vitamio[5.0.2][Player]: FIND_NAME_SYM ffmpeg, avfilter_graph_parse2
    E/Vitamio[5.0.2][Player]: FIND_NAME_SYM ffmpeg, avfilter_graph_parse_ptr
    E/Vitamio[5.0.2][Player]: FIND_NAME_SYM ffmpeg, avfilter_graph_config
    E/Vitamio[5.0.2][Player]: FIND_NAME_SYM ffmpeg, av_buffersrc_add_frame
    E/Vitamio[5.0.2][Player]: FIND_NAME_SYM ffmpeg, av_buffersink_get_buffer_ref
    E/Vitamio[5.0.2][Player]: FIND_NAME_SYM ffmpeg, avfilter_unref_bufferp
    E/Vitamio[5.0.2][Player]: FIND_NAME_SYM ffmpeg, avfilter_graph_free
    E/Vitamio[5.0.2][Player]: FIND_NAME_SYM ffmpeg, av_abuffersink_params_alloc
    E/Vitamio[5.0.2][Player]: FIND_NAME_SYM ssl, SSL_shutdown
    E/Vitamio[5.0.2][Player]: FIND_NAME_SYM ssl, SSL_free
    E/Vitamio[5.0.2][Player]: FIND_NAME_SYM ssl, SSL_CTX_free
    E/Vitamio[5.0.2][Player]: FIND_NAME_SYM ssl, SSL_load_error_strings
    E/Vitamio[5.0.2][Player]: FIND_NAME_SYM ssl, SSL_library_init
    E/Vitamio[5.0.2][Player]: FIND_NAME_SYM ssl, SSL_CTX_new
    E/Vitamio[5.0.2][Player]: FIND_NAME_SYM ssl, TLS_client_method
    E/Vitamio[5.0.2][Player]: FIND_NAME_SYM ssl, SSL_new
    E/Vitamio[5.0.2][Player]: FIND_NAME_SYM ssl, SSL_set_fd
    E/Vitamio[5.0.2][Player]: FIND_NAME_SYM ssl, SSL_connect
    E/Vitamio[5.0.2][Player]: FIND_NAME_SYM ssl, SSL_read
    E/Vitamio[5.0.2][Player]: FIND_NAME_SYM ssl, SSL_write
    E/Vitamio[5.0.2][Player]: FIND_NAME_SYM ssl, ERR_print_errors_fp
    I/Vitamio[5.0.2][Player]: LOAD FFMPEG END: libffmpeg.so
    I/Vitamio[5.0.2][Player]: LOAD VVO START: libvvo.9.so
    E/Vitamio[5.0.2][Player]: FIND_NAME_SYM vvo, render_yuv
    I/Vitamio[5.0.2][Player]: LOAD VVO END: libvvo.9.so
    I/Vitamio[5.0.2][Player]: LOAD VAO START: libvao.0.so
    I/Vitamio[5.0.2][Player]: LOAD VAO END: libvao.0.so
    I/Vitamio[5.0.2][Player]: VPLAYER INIT BEGIN
    I/Vitamio[5.0.2][Player]: Application package name: **.*******.******************.*********

                             --------- beginning of crash
    A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 3334 (ez.**********
    Application terminated.