Recherche avancée

Médias (91)

Autres articles (34)

  • Emballe Médias : Mettre en ligne simplement des documents

    29 octobre 2010, par

    Le plugin emballe médias a été développé principalement pour la distribution mediaSPIP mais est également utilisé dans d’autres projets proches comme géodiversité par exemple. Plugins nécessaires et compatibles
    Pour fonctionner ce plugin nécessite que d’autres plugins soient installés : CFG Saisies SPIP Bonux Diogène swfupload jqueryui
    D’autres plugins peuvent être utilisés en complément afin d’améliorer ses capacités : Ancres douces Légendes photo_infos spipmotion (...)

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

  • Le plugin : Podcasts.

    14 juillet 2010, par

    Le problème du podcasting est à nouveau un problème révélateur de la normalisation des transports de données sur Internet.
    Deux formats intéressants existent : Celui développé par Apple, très axé sur l’utilisation d’iTunes dont la SPEC est ici ; Le format "Media RSS Module" qui est plus "libre" notamment soutenu par Yahoo et le logiciel Miro ;
    Types de fichiers supportés dans les flux
    Le format d’Apple n’autorise que les formats suivants dans ses flux : .mp3 audio/mpeg .m4a audio/x-m4a .mp4 (...)

Sur d’autres sites (2814)

  • Revision 36037 : s’assurer que la class ffmpeg_movie est disponible sinon cela ne sert pas ...

    9 mars 2010, par kent1@… — Log

    s’assurer que la class ffmpeg_movie est disponible sinon cela ne sert pas à grand chose

  • How do I use native C libraries in Android Studio

    11 mars 2015, par Nicholas

    I created a problem some years back based on https://ikaruga2.wordpress.com/2011/06/15/video-live-wallpaper-part-1/. My project was built in the version of Eclipse provided directly by Google at the time and worked fine with a copy of the compiled ffmpeg libraries created with my app name.

    Now I’m trying to create a new app based on my old app. As Google no longer supports Eclipse I downloaded Android Studio and imported my project. With a few tweaks, I was able to successfully compile the old version of the project. So I modified the name, copied a new set of ".so" files into app\src\main\jniLibs\armeabi (where I assumed they should go) and tried running the application on my phone again with absolutely no other changes.

    The NDK throws no errors. Gradle compiles the file without errors and installs it on my phone. The app appears in my live wallpapers list and I can click it to bring up the preview. But instead of a video appearing I receive and error and logCat reports :

    02-26 21:50:31.164  18757-18757/? E/AndroidRuntime﹕ FATAL EXCEPTION: main
    java.lang.ExceptionInInitializerError
           at com.nightscapecreations.anim3free.VideoLiveWallpaper.onSharedPreferenceChanged(VideoLiveWallpaper.java:165)
           at com.nightscapecreations.anim3free.VideoLiveWallpaper.onCreate(VideoLiveWallpaper.java:81)
           at android.app.ActivityThread.handleCreateService(ActivityThread.java:2273)
           at android.app.ActivityThread.access$1600(ActivityThread.java:127)
           at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1212)
           at android.os.Handler.dispatchMessage(Handler.java:99)
           at android.os.Looper.loop(Looper.java:137)
           at android.app.ActivityThread.main(ActivityThread.java:4441)
           at java.lang.reflect.Method.invokeNative(Native Method)
           at java.lang.reflect.Method.invoke(Method.java:511)
           at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:823)
           at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:590)
           at dalvik.system.NativeStart.main(Native Method)
    Caused by: java.lang.UnsatisfiedLinkError: Cannot load library: link_image[1936]:   144 could not load needed library '/data/data/com.nightscapecreations.anim1free/lib/libavutil.so' for 'libavcore.so' (load_library[1091]: Library '/data/data/com.nightscapecreations.anim1free/lib/libavutil.so' not found)
           at java.lang.Runtime.loadLibrary(Runtime.java:370)
           at java.lang.System.loadLibrary(System.java:535)
           at com.nightscapecreations.anim3free.NativeCalls.<clinit>(NativeCalls.java:64)
           at com.nightscapecreations.anim3free.VideoLiveWallpaper.onSharedPreferenceChanged(VideoLiveWallpaper.java:165)
           at com.nightscapecreations.anim3free.VideoLiveWallpaper.onCreate(VideoLiveWallpaper.java:81)
           at android.app.ActivityThread.handleCreateService(ActivityThread.java:2273)
           at android.app.ActivityThread.access$1600(ActivityThread.java:127)
           at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1212)
           at android.os.Handler.dispatchMessage(Handler.java:99)
           at android.os.Looper.loop(Looper.java:137)
           at android.app.ActivityThread.main(ActivityThread.java:4441)
           at java.lang.reflect.Method.invokeNative(Native Method)
           at java.lang.reflect.Method.invoke(Method.java:511)
    </clinit>

    I’m a novice Android/Java/C++ developer and am not sure what this error means, but Google leads me to believe that my new libraries are not being found. In my Eclipse project I had this set of libraries in "libs\armeabi", and another copy of them in a more complicated folder structure at "jni\ffmpeg-android\build\ffmpeg\armeabi\lib". Android Studio appears to have kept everything the same, other than renaming "libs" to "jniLibs", but I’m hitting a brick wall with this error and am unsure how to proceed.

    How can I compile this new app with the new name using Android Studio ?

    In case it helps here is my Android.mk file :

       LOCAL_PATH := $(call my-dir)

       include $(CLEAR_VARS)
       MY_LIB_PATH := ffmpeg-android/build/ffmpeg/armeabi/lib
       LOCAL_MODULE := bambuser-libavcore
       LOCAL_SRC_FILES := $(MY_LIB_PATH)/libavcore.so
       include $(PREBUILT_SHARED_LIBRARY)

       include $(CLEAR_VARS)
       LOCAL_MODULE := bambuser-libavformat
       LOCAL_SRC_FILES := $(MY_LIB_PATH)/libavformat.so
       include $(PREBUILT_SHARED_LIBRARY)

       include $(CLEAR_VARS)
       LOCAL_MODULE := bambuser-libavcodec
       LOCAL_SRC_FILES := $(MY_LIB_PATH)/libavcodec.so
       include $(PREBUILT_SHARED_LIBRARY)

       include $(CLEAR_VARS)
       LOCAL_MODULE := bambuser-libavfilter
       LOCAL_SRC_FILES := $(MY_LIB_PATH)/libavfilter.so
       include $(PREBUILT_SHARED_LIBRARY)

       include $(CLEAR_VARS)
       LOCAL_MODULE := bambuser-libavutil
       LOCAL_SRC_FILES := $(MY_LIB_PATH)/libavutil.so
       include $(PREBUILT_SHARED_LIBRARY)

       include $(CLEAR_VARS)
       LOCAL_MODULE := bambuser-libswscale
       LOCAL_SRC_FILES := $(MY_LIB_PATH)/libswscale.so
       include $(PREBUILT_SHARED_LIBRARY)

       #local_PATH := $(call my-dir)

       include $(CLEAR_VARS)

       LOCAL_CFLAGS := -DANDROID_NDK \
                       -DDISABLE_IMPORTGL

       LOCAL_MODULE    := video
       LOCAL_SRC_FILES := video.c

       LOCAL_C_INCLUDES := \
           $(LOCAL_PATH)/include \
           $(LOCAL_PATH)/ffmpeg-android/ffmpeg \
           $(LOCAL_PATH)/freetype/include/freetype2 \
           $(LOCAL_PATH)/freetype/include \
           $(LOCAL_PATH)/ftgl/src \
           $(LOCAL_PATH)/ftgl
       LOCAL_LDLIBS := -L$(NDK_PLATFORMS_ROOT)/$(TARGET_PLATFORM)/arch-arm/usr/lib -L$(LOCAL_PATH) -L$(LOCAL_PATH)/ffmpeg-android/build/ffmpeg/armeabi/lib/ -lGLESv1_CM -ldl -lavformat -lavcodec -lavfilter -lavutil -lswscale -llog -lz -lm

       include $(BUILD_SHARED_LIBRARY)

    And here is my NativeCalls.java :

       package com.nightscapecreations.anim3free;

       public class NativeCalls {
           //ffmpeg
           public static native void initVideo();
           public static native void loadVideo(String fileName); //
           public static native void prepareStorageFrame();
           public static native void getFrame(); //
           public static native void freeConversionStorage();
           public static native void closeVideo();//
           public static native void freeVideo();//
           //opengl
           public static native void initPreOpenGL(); //
           public static native void initOpenGL(); //
           public static native void drawFrame(); //
           public static native void closeOpenGL(); //
           public static native void closePostOpenGL();//
           //wallpaper
           public static native void updateVideoPosition();
           public static native void setSpanVideo(boolean b);
           //getters
           public static native int getVideoHeight();
           public static native int getVideoWidth();
           //setters
           public static native void setWallVideoDimensions(int w,int h);
           public static native void setWallDimensions(int w,int h);
           public static native void setScreenPadding(int w,int h);
           public static native void setVideoMargins(int w,int h);
           public static native void setDrawDimensions(int drawWidth,int drawHeight);
           public static native void setOffsets(int x,int y);
           public static native void setSteps(int xs,int ys);
           public static native void setScreenDimensions(int w, int h);
           public static native void setTextureDimensions(int tx,
                                  int ty );
           public static native void setOrientation(boolean b);
           public static native void setPreviewMode(boolean b);
           public static native void setTonality(int t);
           public static native void toggleGetFrame(boolean b);
           //fps
           public static native void setLoopVideo(boolean b);

           static {
           System.loadLibrary("avcore");
           System.loadLibrary("avformat");
           System.loadLibrary("avcodec");
           //System.loadLibrary("avdevice");
           System.loadLibrary("avfilter");
           System.loadLibrary("avutil");
           System.loadLibrary("swscale");
           System.loadLibrary("video");
           }

       }

    EDIT

    This is the first part of my video.c file :

       #include <gles></gles>gl.h>
       #include <gles></gles>glext.h>

       #include <gles2></gles2>gl2.h>
       #include <gles2></gles2>gl2ext.h>

       #include
       #include

       #include <libavcodec></libavcodec>avcodec.h>
       #include <libavformat></libavformat>avformat.h>
       #include <libswscale></libswscale>swscale.h>

       #include  
       #include  
       #include
       #include <android></android>log.h>

       //#include <ftgl></ftgl>ftgl.h>

       //ffmpeg video variables
       int      initializedVideo=0;
       int      initializedFrame=0;
       AVFormatContext *pFormatCtx=NULL;
       int             videoStream;
       AVCodecContext  *pCodecCtx=NULL;
       AVCodec         *pCodec=NULL;
       AVFrame         *pFrame=NULL;
       AVPacket        packet;
       int             frameFinished;
       float           aspect_ratio;

       //ffmpeg video conversion variables
       AVFrame         *pFrameConverted=NULL;
       int             numBytes;
       uint8_t         *bufferConverted=NULL;

       //opengl
       int textureFormat=PIX_FMT_RGBA; // PIX_FMT_RGBA   PIX_FMT_RGB24
       int GL_colorFormat=GL_RGBA; // Must match the colorspace specified for textureFormat
       int textureWidth=256;
       int textureHeight=256;
       int nTextureHeight=-256;
       int textureL=0, textureR=0, textureW=0;
       int frameTonality;

       //GLuint textureConverted=0;
       GLuint texturesConverted[2] = { 0,1 };
       GLuint dummyTex = 2;
       static int len=0;


       static const char* BWVertexSrc =
                "attribute vec4 InVertex;\n"
                "attribute vec2 InTexCoord0;\n"
                "attribute vec2 InTexCoord1;\n"
                "uniform mat4 ProjectionModelviewMatrix;\n"
                "varying vec2 TexCoord0;\n"
                "varying vec2 TexCoord1;\n"

                "void main()\n"
                "{\n"
                "  gl_Position = ProjectionModelviewMatrix * InVertex;\n"
                "  TexCoord0 = InTexCoord0;\n"
                "  TexCoord1 = InTexCoord1;\n"
                "}\n";
       static const char* BWFragmentSrc  =

                "#version 110\n"
                "uniform sampler2D Texture0;\n"
                "uniform sampler2D Texture1;\n"

                "varying vec2 TexCoord0;\n"
                "varying vec2 TexCoord1;\n"

                "void main()\n"
                "{\n"
               "   vec3 color = texture2D(m_Texture, texCoord).rgb;\n"
               "   float gray = (color.r + color.g + color.b) / 3.0;\n"
               "   vec3 grayscale = vec3(gray);\n"

               "   gl_FragColor = vec4(grayscale, 1.0);\n"
                "}";
       static GLuint shaderProgram;


       //// Create a pixmap font from a TrueType file.
       //FTGLPixmapFont font("/home/user/Arial.ttf");
       //// Set the font size and render a small text.
       //font.FaceSize(72);
       //font.Render("Hello World!");

       //screen dimensions
       int screenWidth = 50;
       int screenHeight= 50;
       int screenL=0, screenR=0, screenW=0;
       int dPaddingX=0,dPaddingY=0;
       int drawWidth=50,drawHeight=50;

       //wallpaper
       int wallWidth = 50;
       int wallHeight = 50;
       int xOffSet, yOffSet;
       int xStep, yStep;
       jboolean spanVideo = JNI_TRUE;

       //video dimensions
       int wallVideoWidth = 0;
       int wallVideoHeight = 0;
       int marginX, marginY;
       jboolean isScreenPortrait = JNI_TRUE;
       jboolean isPreview = JNI_TRUE;
       jboolean loopVideo = JNI_TRUE;
       jboolean isGetFrame = JNI_TRUE;

       //file
       const char * szFileName;

       #define max( a, b ) ( ((a) > (b)) ? (a) : (b) )
       #define min( a, b ) ( ((a) &lt; (b)) ? (a) : (b) )

       //test variables
       #define RGBA8(r, g, b)  (((r) &lt;&lt; (24)) | ((g) &lt;&lt; (16)) | ((b) &lt;&lt; (8)) | 255)
       int sPixelsInited=JNI_FALSE;
       uint32_t *s_pixels=NULL;

       int s_pixels_size() {
         return (sizeof(uint32_t) * textureWidth * textureHeight * 5);
       }

       void render_pixels1(uint32_t *pixels, uint32_t c) {
           int x, y;
           /* fill in a square of 5 x 5 at s_x, s_y */
           for (y = 0; y &lt; textureHeight; y++) {
               for (x = 0; x &lt; textureWidth; x++) {
                   int idx = x + y * textureWidth;
                   pixels[idx++] = RGBA8(255, 255, 0);
               }
           }
       }

       void render_pixels2(uint32_t *pixels, uint32_t c) {
           int x, y;
           /* fill in a square of 5 x 5 at s_x, s_y */
           for (y = 0; y &lt; textureHeight; y++) {
               for (x = 0; x &lt; textureWidth; x++) {
                   int idx = x + y * textureWidth;
                   pixels[idx++] = RGBA8(0, 0, 255);
               }
           }
       }

       void Java_com_nightscapecreations_anim3free_NativeCalls_initVideo (JNIEnv * env, jobject this) {
           initializedVideo = 0;
           initializedFrame = 0;
       }

       /* list of things that get loaded: */
       /* buffer */
       /* pFrameConverted */
       /* pFrame */
       /* pCodecCtx */
       /* pFormatCtx */
       void Java_com_nightscapecreations_anim3free_NativeCalls_loadVideo (JNIEnv * env, jobject this, jstring fileName)  {
           jboolean isCopy;
           szFileName = (*env)->GetStringUTFChars(env, fileName, &amp;isCopy);
           //debug
           __android_log_print(ANDROID_LOG_DEBUG, "NDK: ", "NDK:LC: [%s]", szFileName);
           // Register all formats and codecs
           av_register_all();
           // Open video file
           if(av_open_input_file(&amp;pFormatCtx, szFileName, NULL, 0, NULL)!=0) {
           __android_log_print(ANDROID_LOG_DEBUG, "video.c", "NDK: Couldn't open file");
           return;
           }
           __android_log_print(ANDROID_LOG_DEBUG, "video.c", "NDK: Succesfully loaded file");
           // Retrieve stream information */
           if(av_find_stream_info(pFormatCtx)&lt;0) {
           __android_log_print(ANDROID_LOG_DEBUG, "video.c", "NDK: Couldn't find stream information");
           return;
           }
           __android_log_print(ANDROID_LOG_DEBUG, "video.c", "NDK: Found stream info");
           // Find the first video stream
           videoStream=-1;
           int i;
           for(i=0; inb_streams; i++)
               if(pFormatCtx->streams[i]->codec->codec_type==CODEC_TYPE_VIDEO) {
                   videoStream=i;
                   break;
               }
           if(videoStream==-1) {
               __android_log_print(ANDROID_LOG_DEBUG, "video.c", "NDK: Didn't find a video stream");
               return;
           }
           __android_log_print(ANDROID_LOG_DEBUG, "video.c", "NDK: Found video stream");
           // Get a pointer to the codec contetx for the video stream
           pCodecCtx=pFormatCtx->streams[videoStream]->codec;
           // Find the decoder for the video stream
           pCodec=avcodec_find_decoder(pCodecCtx->codec_id);
           if(pCodec==NULL) {
               __android_log_print(ANDROID_LOG_DEBUG, "video.c", "NDK: Unsupported codec");
               return;
           }
           // Open codec
           if(avcodec_open(pCodecCtx, pCodec)&lt;0) {
               __android_log_print(ANDROID_LOG_DEBUG, "video.c", "NDK: Could not open codec");
               return;
           }
           // Allocate video frame (decoded pre-conversion frame)
           pFrame=avcodec_alloc_frame();
           // keep track of initialization
           initializedVideo = 1;
           __android_log_print(ANDROID_LOG_DEBUG, "video.c", "NDK: Finished loading video");
       }

       //for this to work, you need to set the scaled video dimensions first
       void Java_com_nightscapecreations_anim3free_NativeCalls_prepareStorageFrame (JNIEnv * env, jobject this)  {
           // Allocate an AVFrame structure
           pFrameConverted=avcodec_alloc_frame();
           // Determine required buffer size and allocate buffer
           numBytes=avpicture_get_size(textureFormat, textureWidth, textureHeight);
           bufferConverted=(uint8_t *)av_malloc(numBytes*sizeof(uint8_t));
           if ( pFrameConverted == NULL || bufferConverted == NULL )
               __android_log_print(ANDROID_LOG_DEBUG, "prepareStorage>>>>", "Out of memory");
           // Assign appropriate parts of buffer to image planes in pFrameRGB
           // Note that pFrameRGB is an AVFrame, but AVFrame is a superset
           // of AVPicture
           avpicture_fill((AVPicture *)pFrameConverted, bufferConverted, textureFormat, textureWidth, textureHeight);
           __android_log_print(ANDROID_LOG_DEBUG, "prepareStorage>>>>", "Created frame");
           __android_log_print(ANDROID_LOG_DEBUG, "prepareStorage>>>>", "texture dimensions: %dx%d", textureWidth, textureHeight);
           initializedFrame = 1;
       }

       jint Java_com_nightscapecreations_anim3free_NativeCalls_getVideoWidth (JNIEnv * env, jobject this)  {
           return pCodecCtx->width;
       }

       jint Java_com_nightscapecreations_anim3free_NativeCalls_getVideoHeight (JNIEnv * env, jobject this)  {
           return pCodecCtx->height;
       }

       void Java_com_nightscapecreations_anim3free_NativeCalls_getFrame (JNIEnv * env, jobject this)  {
           // keep reading packets until we hit the end or find a video packet
           while(av_read_frame(pFormatCtx, &amp;packet)>=0) {
               static struct SwsContext *img_convert_ctx;
               // Is this a packet from the video stream?
               if(packet.stream_index==videoStream) {
                   // Decode video frame
                   /* __android_log_print(ANDROID_LOG_DEBUG,  */
                   /*            "video.c",  */
                   /*            "getFrame: Try to decode frame" */
                   /*            ); */
                   avcodec_decode_video(pCodecCtx, pFrame, &amp;frameFinished, packet.data, packet.size);
                   // Did we get a video frame?
                   if(frameFinished) {
                       if(img_convert_ctx == NULL) {
                           /* get/set the scaling context */
                           int w = pCodecCtx->width;
                           int h = pCodecCtx->height;
                           img_convert_ctx = sws_getContext(w, h, pCodecCtx->pix_fmt, textureWidth,textureHeight, textureFormat, SWS_FAST_BILINEAR, NULL, NULL, NULL);
                           if(img_convert_ctx == NULL) {
                               return;
                           }
                       }
                       /* if img convert null */
                       /* finally scale the image */
                       /* __android_log_print(ANDROID_LOG_DEBUG,  */
                       /*          "video.c",  */
                       /*          "getFrame: Try to scale the image" */
                       /*          ); */

                       //pFrameConverted = pFrame;
                       sws_scale(img_convert_ctx, pFrame->data, pFrame->linesize, 0, pCodecCtx->height, pFrameConverted->data, pFrameConverted->linesize);
                       //av_picture_crop(pFrameConverted->data, pFrame->data, 1, pCodecCtx->height, pCodecCtx->width);
                       //av_picture_crop();
                       //avfilter_vf_crop();

                       /* do something with pFrameConverted */
                       /* ... see drawFrame() */
                       /* We found a video frame, did something with it, now free up
                          packet and return */
                       av_free_packet(&amp;packet);
       //              __android_log_print(ANDROID_LOG_INFO, "Droid Debug", "pFrame.age: %d", pFrame->age);
       //              __android_log_print(ANDROID_LOG_INFO, "Droid Debug", "pFrame.buffer_hints: %d", pFrame->buffer_hints);
       //              __android_log_print(ANDROID_LOG_INFO, "Droid Debug", "pFrame.display_picture_number: %d", pFrame->display_picture_number);
       //              __android_log_print(ANDROID_LOG_INFO, "Droid Debug", "pFrame.hwaccel_picture_private: %d", pFrame->hwaccel_picture_private);
       //              __android_log_print(ANDROID_LOG_INFO, "Droid Debug", "pFrame.key_frame: %d", pFrame->key_frame);
       //              __android_log_print(ANDROID_LOG_INFO, "Droid Debug", "pFrame.palette_has_changed: %d", pFrame->palette_has_changed);
       //              __android_log_print(ANDROID_LOG_INFO, "Droid Debug", "pFrame.pict_type: %d", pFrame->pict_type);
       //              __android_log_print(ANDROID_LOG_INFO, "Droid Debug", "pFrame.qscale_type: %d", pFrame->qscale_type);
       //              __android_log_print(ANDROID_LOG_INFO, "Droid Debug", "pFrameConverted.age: %d", pFrameConverted->age);
       //              __android_log_print(ANDROID_LOG_INFO, "Droid Debug", "pFrameConverted.buffer_hints: %d", pFrameConverted->buffer_hints);
       //              __android_log_print(ANDROID_LOG_INFO, "Droid Debug", "pFrameConverted.display_picture_number: %d", pFrameConverted->display_picture_number);
       //              __android_log_print(ANDROID_LOG_INFO, "Droid Debug", "pFrameConverted.hwaccel_picture_private: %d", pFrameConverted->hwaccel_picture_private);
       //              __android_log_print(ANDROID_LOG_INFO, "Droid Debug", "pFrameConverted.key_frame: %d", pFrameConverted->key_frame);
       //              __android_log_print(ANDROID_LOG_INFO, "Droid Debug", "pFrameConverted.palette_has_changed: %d", pFrameConverted->palette_has_changed);
       //              __android_log_print(ANDROID_LOG_INFO, "Droid Debug", "pFrameConverted.pict_type: %d", pFrameConverted->pict_type);
       //              __android_log_print(ANDROID_LOG_INFO, "Droid Debug", "pFrameConverted.qscale_type: %d", pFrameConverted->qscale_type);
                       return;
                   } /* if frame finished */
               } /* if packet video stream */
               // Free the packet that was allocated by av_read_frame
               av_free_packet(&amp;packet);
           } /* while */
           //reload video when you get to the end
           av_seek_frame(pFormatCtx,videoStream,0,AVSEEK_FLAG_ANY);
       }

       void Java_com_nightscapecreations_anim3free_NativeCalls_setLoopVideo (JNIEnv * env, jobject this, jboolean b) {
           loopVideo = b;
       }

       void Java_com_nightscapecreations_anim3free_NativeCalls_closeVideo (JNIEnv * env, jobject this) {
           if ( initializedFrame == 1 ) {
               // Free the converted image
               av_free(bufferConverted);
               av_free(pFrameConverted);
               initializedFrame = 0;
               __android_log_print(ANDROID_LOG_DEBUG, "closeVideo>>>>", "Freed converted image");
           }
           if ( initializedVideo == 1 ) {
               /* // Free the YUV frame */
               av_free(pFrame);
               /* // Close the codec */
               avcodec_close(pCodecCtx);
               // Close the video file
               av_close_input_file(pFormatCtx);
               initializedVideo = 0;
               __android_log_print(ANDROID_LOG_DEBUG, "closeVideo>>>>", "Freed video structures");
           }
       }

       void Java_com_nightscapecreations_anim3free_NativeCalls_freeVideo (JNIEnv * env, jobject this) {
           if ( initializedVideo == 1 ) {
               /* // Free the YUV frame */
               av_free(pFrame);
               /* // Close the codec */
               avcodec_close(pCodecCtx);
               // Close the video file
               av_close_input_file(pFormatCtx);
               __android_log_print(ANDROID_LOG_DEBUG, "closeVideo>>>>", "Freed video structures");
               initializedVideo = 0;
           }
       }

       void Java_com_nightscapecreations_anim3free_NativeCalls_freeConversionStorage (JNIEnv * env, jobject this) {
           if ( initializedFrame == 1 ) {
               // Free the converted image
               av_free(bufferConverted);
               av_freep(pFrameConverted);
               initializedFrame = 0;
           }
       }

       /*--- END OF VIDEO ----*/

       /* disable these capabilities. */
       static GLuint s_disable_options[] = {
           GL_FOG,
           GL_LIGHTING,
           GL_CULL_FACE,
           GL_ALPHA_TEST,
           GL_BLEND,
           GL_COLOR_LOGIC_OP,
           GL_DITHER,
           GL_STENCIL_TEST,
           GL_DEPTH_TEST,
           GL_COLOR_MATERIAL,
           0
       };

       // For stuff that opengl needs to work with,
       // like the bitmap containing the texture
       void Java_com_nightscapecreations_anim3free_NativeCalls_initPreOpenGL (JNIEnv * env, jobject this)  {

       }
       ...
  • Fintech Content Marketing : 10 Best Practices & Growth Strategies

    24 juillet 2024, par Erin

    Content marketing is an effective strategy for growth and building trust. This is especially true in the fintech industry, where competition is intense and trust is crucial. Content marketing helps you strengthen customer relationships, engage your audience, and differentiate yourself from competitors.

    To get the most out of your fintech content marketing, you need to develop the right strategy.

    In this guide, we’ll cover everything you need to know about content marketing for fintech companies so you can expand your reach and grow your business.

    What is fintech content marketing ?

    Fintech content marketing is creating content around financial topics on the internet to attract, engage, and convert audiences.

    Fintech companies can use a content strategy to drive leads by creating educational content.

    Definition of fintech content marketing.

    While financial content is important, it’s easy for it to feel boring, unrelatable, or confusing. But, when done right, fintech companies can educate their audiences with great content marketing that helps their audience understand financial topics in-depth.

    Fintech companies can create written, audio, or video content to inform their audiences about financial topics they’re interested in.

    From there, each piece of content can then be distributed to different mediums :

    • Blogs
    • Website
    • Facebook
    • YouTube
    • Instagram
    • Other websites
    • Apps
    • And more

    Once content is distributed, fintech companies can then analyse how effective the content is by tracking web analytics data like search engine traffic, social media engagement, and new customers.

    7 reasons fintech companies need content marketing

    Before we dive into fintech content marketing best practices, let’s recap why fintech companies need to lean into content to grow their business.

    Here are seven reasons your financial company needs to deploy a robust content strategy :

    Marketing fintech content to a wider audience

    1. Reach new audiences

    If you want to grow your fintech company, you need to find new customers. Creating content is a proven path to marketing yourself online and attracting a larger audience.

    By using search engine optimisation (SEO), social media marketing, and YouTube, you can expand your audience and grow your customer base.

    With content marketing, you can find new audiences without needing a massive budget, making scaling easier.

    2. Engage current audience

    While content can be a powerful method to reach new customers, it isn’t the only thing it’s good for.

    If you want to grow your business, another way to leverage your content is to keep your current audience engaged.

    You can create financial content to educate, inform, and add value to your current audience who already knows you. Repurposing content between the different platforms your audience is on keeps them engaged with you and your brand.

    It’s a simple way to capture and keep the attention of your audience, build trust, and convert more prospects into customers.

    3. Build relationships with customers

    You should leverage content marketing in various spaces, such as social media, your website, a blog, or even YouTube. Creating content on different channels allows you to build relationships with your customers on autopilot.

    The general rule in marketing is that the more touch points you have with your customers, the more you’ll sell. Creating more content means you always have new opportunities to increase those touchpoints, build deeper relationships, and sell more.

    4. Grow authority in a space

    If you want people to trust you and your financial tech, you need to be seen as an authority. How can someone trust that your app or web platform will help them with their finances if they don’t trust you’re a financial expert ?

    You should use informative content to become a thought leader in your space. You can post content on social media or your own platforms.

    You can also spread your authority by leveraging other brands’ or influencers’ audiences through guest blog posting and guest podcasting.

    5. Drive new leads

    Content marketing isn’t just a fun hobby for businesses. It’s one of the smartest ways to drive new leads.

    You should be crafting content for your top-of-funnel marketing strategy to attract potential customers.

    Creating content consistently is a great way to bring in new audience members into your funnel.

    Once you grow your top-of-funnel audience, you can convert them into leads by getting them to join your email list or trial your financial software.

    One tip to get more out of your content strategy is creating evergreen content to continually drive leads. For example, create “set-it-and-forget it” blog posts or YouTube videos that will continue working for you daily to attract new audience members searching for helpful financial information. Then, provide a call to action on that content to join your email list (by leveraging a lead magnet).

    6. Convert prospects to customers

    When you have a continual flow of new top-of-funnel prospects, you always have a fresh cycle of prospects you can convert into customers.

    Content is primarily used to attract new audience members and engage your current audience at the top of your funnel. But it can also be used to convert your audience into customers.

    Try mixing up your content types to drive conversions :

    • Educational
    • Entertaining
    • Promotional

    Don’t just show off educational content.

    You should also mix in “authority” content by displaying case studies of user success stories and calling to action to sign up for a free trial or request a demo.

    7. Lower Customer Acquisition Cost (CAC)

    On the business side, if you want a marketing strategy that will keep expenses low long term, you’ll want to invest more in content.

    Content marketing has a great return on investment (ROI) for your time and effort.

    Why ?

    Because the customer acquisition costs (CAC) are so low.

    You can create content that can bring in leads for months if not years.

    If you only use Google or Facebook ads to drive new leads, you always have to “pay-to-play.” When you turn the advertising tap off, your leads dry up.

    But, with blogs and videos, you can create content that can bring in organic customers on repeat. It’s like a snowball effect that keeps going long after you’ve completed the initial work.

    10 fintech content marketing best practices

    Here are ten best practices to establish a strong content marketing strategy as a fintech company :

    Fintech content marketing with a laptop, dollar, and bank.

    1. Set SMART goals

    A good content strategy starts with goal-setting. You’ll never get there if you don’t know where you’re going.

    To make sure your fintech content marketing strategy is a success, you need to set SMART goals :

    • Specific
    • Measurable
    • Achievable
    • Relevant
    • Time-bound

    For example, you might set a goal to reach 20,000 blog visits in one year and convert blog visits at a rate of 3%.

    Setting clear content goals will streamline operations, so you stay consistent and get the most out of your efforts.

    3. Be transparent

    Transparency is crucial for fintech companies, as they handle sensitive financial data and, in many cases, monetary transactions.

    It’s essential for you to be open and clear about your products, services, and data practices. By being honest about privacy and security measures, fintechs can build and maintain trust with their customers.

    This transparency not only helps in establishing credibility but also ensures customers feel confident about how their financial information is managed and protected.

    Graphic displaying blog posts, videos, and audio content.

    4. Take an education-first approach

    Content isn’t just about “hooking” or entertaining your audience. That’s just one aspect of a content strategy.

    The best approach to building authority and converting leads from your content is to take an education-first approach.

    Remember above, when we touched on understanding your ICP ? You need to know your ICP’s interests and pain points inside and out and then map your product’s strengths to those that are relevant.

    Always start with your ICP, then build the content strategy around them based on your product.

    Find connections and identify how your product can address the ICP’s interests and pain points.

    For example, let’s say your ICPs are Gen Z consumers. They’re interested in independence and saving for future goals. Their pain points might include lack of investment knowledge and managing student debts and other loans.

    Let’s say your product is a personal finance app. Some of your benefits might be budget tracking and beginner-friendly investment options. You could create a content strategy around budgeting in your 20s and investing for beginners.

    Content strategies will vary widely based on your ICP. For instance, content for a fintech company targeting those approaching retirement will need a different focus compared to that aimed at younger consumers.

    Remember : practical, step-by-step, value-driven content performs best regarding conversions.

    5. Leverage the right tools

    If you’re going to succeed with content, you need to lean on the right tools.

    Here are a few types of tools you should consider (and recommendations) :

    Try Matomo for Free

    Get the web insights you need, without compromising data accuracy.

    No credit card required

    6. Promote your content on different platforms

    You’ll want to promote your fintech content marketing strategy on different channels and platforms to get the most out of your fintech content marketing strategy.

    Start with one core platform before you pick a few platforms to promote your content. You should leverage at least one social media platform.

    Then, create a blog and an email newsletter to ensure you create multiple touchpoints.

    Here are some tips on how to pick the right platform :

    • Consider age range (i.e. TikTok for a younger audience, Facebook for an older audience)
    • Consider your preferred content type (YouTube for long-form video, X for short-form written content
    • Consider your competition (i.e. go where competitive fintech companies already are)

    7. Track results 

    How do you know if you’re on pace to reach the SMART goals you set earlier ?

    By tracking your results. 

    You should dive into your data regularly to ensure your content is working. Make sure to track social media, email marketing, and web results.

    Keep a close eye on your website KPIs and track your conversions to ensure a return on investment (ROI). For more detailed guidance on monitoring your website’s performance, check out our blog on how to check website traffic as accurately as possible.

    Remember, a data-driven approach is the best way to stay on track with your content goals.

    8. Establish a content leader

    Your content marketing needs a leader. You should establish someone on your marketing team to oversee your content plan. 

    They should ensure they collaborate well with different teams, understand social media and SEO, and know how to manage projects.

    Most of all, don’t forget that they’re in charge of tracking your data and reporting to higher-ups, so they should be comfortable with web analytics and know how to track performance well.

    9. Optimise for SEO

    It’s not enough to create a weekly blog post. You could craft the most valuable content on your website, but nobody will find it online if it isn’t optimised for SEO.

    Your content leader should analyse SEO data using a tool like Ahrefs or SEMrush to analyse different keywords to target in your content. 

    A web analytics tool like Matomo can then be used to track results. Matomo offers traditional web analytics, including pageviews, bounce rate, and sources of traffic, alongside features like heatmaps, session recordings, and A/B testing.

    These advanced features provide deeper insights into how users interact with your site and content, helping you pinpoint areas for improvement. Improving the user experience based on these insights can then positively impact your Google rankings.

    Try Matomo for Free

    Get the web insights you need, without compromising data accuracy.

    No credit card required

    10. Stay compliant

    Fintech is a highly regulated industry. Keeping this in mind, you need to ensure you take the necessary steps to ensure you remain compliant with all applicable laws and regulations.

    Non-compliance can result in severe penalties.

    Given these high standards, it’s crucial to ensure that user data remains private and secure. Matomo helps with this by providing a compliant web analytics solution that respects user privacy. With Matomo, you can confidently manage compliance and build trust with your customers while also reliably tracking the performance of your content marketing.

    a screenshot of Matomo's location reporting

    Drive your content marketing strategy with Matomo

    Leaning into content marketing can be one of the best ways your fintech company can attract, engage, convert, and retain your audience.

    By creating high-quality content for your audience on social media, YouTube, and your website, you can establish your brand as an authority to grow your business for years to come.

    But remember, you need to make sure you’re only using privacy-friendly, compliant tools to protect your audience’s data.

    Thankfully, Matomo has you covered.

    As a privacy-friendly web analytics tool, Matomo ensures that your website data is tracked and stored in compliance with privacy laws.

    Trusted by over 1 million websites, it offers reliable data without sampling, guaranteeing accuracy. Matomo is designed to be fully compliant with privacy regulations such as GDPR and CCPA, while also providing advanced features like heatmaps, session recordings, and A/B testing to help you track and enhance your website’s performance.

    Request a demo to see how Matomo can benefit your fintech business now.