Recherche avancée

Médias (1)

Mot : - Tags -/publishing

Autres articles (85)

  • Use, discuss, criticize

    13 avril 2011, par

    Talk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
    The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
    A discussion list is available for all exchanges between users.

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

    8 février 2011, par

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

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

Sur d’autres sites (8753)

  • Open .avi with OpenCV 2.4 & Ubuntu 11.04

    25 juin 2012, par CTZStef

    I try to open and read video files in .avi format using OpenCV. Here is my code :

    void MainWindow::on_actionOuvrir_fichier_triggered()
    140    +   {
    141    +    //mettre a -1 streamId
    142    +    streamId = -1;
    143    +    //ouvrir fenetre navigation fichiers pour recuperer path vers .avi
    144    +    QString fileName = QFileDialog::getOpenFileName(this,tr("Ouvrir fichier video"),"/home",
    145    +    tr("Videos (*.avi)"));
    146    +    std::string utf8_text = fileName.toUtf8().constData();
    147    +    //ouvrir .avi
    148    +    capture = new VideoCapture(utf8_text);
    149    +    //check ouverture
    150    +    if(!capture->isOpened())
    151    +    cout << "probleme ouverture fichier video" << endl;
    152    +    //calculer delay between each frame in ms
    153    +    rate = capture->get(CV_CAP_PROP_FPS);
    154    +    delay = 1000 / rate;
    155    +    //demarrer timer recordId
    156    +    recordId = startTimer(delay);
    157    +    //capture premiere frame
    158    +    if(!capture->read(in))
    159    +    cout << "probleme lecture frame fichier video" << endl;
    160    +   }

    I get no problem at compilation time, but I can't open a video file. While in debug mode I saw that string utf8_text had the good absolute path to my video, so obviously the problem comes from the constructor of the VideoCapture object. Then, I tried to install every codec pack I could or thought was relevant. But the problem is still there, capture->isOpened() still returns false, and in debug mode I can see that capture contains nothing.

    I am lost here, don't know what to try next. Any idea ??

    Thanks !!!

    [EDIT]
    Just in case, here is the output of ffmpeg -i myFile.avi

    faraday@faraday-Compaq-Evo-D510-e-pc:~/QtProjects/visionDev$ ffmpeg -i 1.avi
    FFmpeg version 0.6.6-4:0.6.6-0ubuntu0.11.04.1, Copyright (c) 2000-2010 the Libav developers
     built on Jun 12 2012 16:28:21 with gcc 4.5.2
     configuration: --extra-version=4:0.6.6-0ubuntu0.11.04.1 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-vaapi --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --enable-shared --disable-static
     WARNING: library configuration mismatch
     libavutil   configuration: --extra-version=4:0.6.6-0ubuntu0.11.04.1 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-vaapi --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
     libavcodec  configuration: --extra-version=4:0.6.6-0ubuntu0.11.04.1 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-vaapi --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
     libavformat configuration: --extra-version=4:0.6.6-0ubuntu0.11.04.1 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-vaapi --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
     libavdevice configuration: --extra-version=4:0.6.6-0ubuntu0.11.04.1 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-vaapi --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
     libavfilter configuration: --extra-version=4:0.6.6-0ubuntu0.11.04.1 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-vaapi --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
     libswscale  configuration: --extra-version=4:0.6.6-0ubuntu0.11.04.1 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-vaapi --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
     libpostproc configuration: --extra-version=4:0.6.6-0ubuntu0.11.04.1 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-vaapi --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
     libavutil     50.15. 1 / 50.15. 1
     libavcodec    52.72. 2 / 52.72. 2
     libavformat   52.64. 2 / 52.64. 2
     libavdevice   52. 2. 0 / 52. 2. 0
     libavfilter    1.19. 0 /  1.19. 0
     libswscale     0.11. 0 /  0.11. 0
     libpostproc   51. 2. 0 / 51. 2. 0
    Input #0, avi, from '1.avi':
     Duration: 00:02:35.39, start: 0.000000, bitrate: 110595 kb/s
       Stream #0.0: Video: rawvideo, bgr24, 640x480, 15 tbr, 15 tbn, 15 tbc
    At least one output file must be specified

    I do not see anything wrong here, but I thought maybe someone will.

    I really need this to work soon, and right now it's a dead end...

    thanks

    [EDIT 2]

    I have just read this in the book OpenCV 2 Computer Vision Application Programming Cookbook by R. Laganiere :

    It is important to note that in order to open the specified video
    file, your computer must have the corresponding codec installed,
    otherwise cv::VideoCapture will not be able to understand the input
    file. Normally, if you are able to open your video file with a video
    player on your machine (such as the Windows Media Player), then OpenCV
    should also be able to read this file.

    Well, on my machine it is not that easy mister Laganiere... I hate this book.

  • fftools/ffmpeg : change video decoding timestamp generation

    9 avril 2023, par Anton Khirnov
    fftools/ffmpeg : change video decoding timestamp generation
    

    When no timestamps are available from the container, the video decoding
    code will currently use fake dts values - generated in
    process_input_packet() based on a combination of information from the
    decoder and the parser (obtained via the demuxer) - to generate
    timestamps during decoder flushing. This is fragile, hard to follow, and
    unnecessarily convoluted, since more reliable information can be
    obtained directly from post-decoding values.

    The new code keeps track of the last decoded frame pts and estimates its
    duration based on a number of heuristics. Timestamps generated when both
    pts and pkt_dts are missing are then simple pts+duration of the last frame.
    The heuristics are somewhat complicated by the fact that lavf insists on
    making up packet timestamps based on its highly incomplete information.
    That should be removed in the future, allowing to further simplify this
    code.

    The results of the following tests change :
    * h264-3386 now requires -fps_mode passthrough to avoid dropping frames
    at the end ; this is a pathology of the interaction of the new and old
    code, and the fact that the sample switches from field to frame coding
    in the last packet, and will be fixed in following commits
    * hevc-conformance-DELTAQP_A_BRCM_4 stops inventing an arbitrary
    timestamp gap at the end
    * hevc-small422chroma - the single frame output by this test now has a
    timestamp of 0, rather than an arbitrary 7

    • [DH] fftools/ffmpeg.c
    • [DH] fftools/ffmpeg.h
    • [DH] fftools/ffmpeg_demux.c
    • [DH] tests/fate/h264.mak
    • [DH] tests/ref/fate/h264-3386
    • [DH] tests/ref/fate/hevc-conformance-DELTAQP_A_BRCM_4
    • [DH] tests/ref/fate/hevc-small422chroma
  • Android plugin with .so lib's (UNITY)

    23 mars 2017, par Vladimir Ilianov

    So i need ffmpeg in android. (for muxing audio and video).
    I found this awesome project for android studio (link in the end of a post, in rar as ffmpeg4android_demo_studio2).
    I works perfect, does muxing and overall awesome project. So i decided to make plugin for anroid from that project, so i remade project like that : (link in the end of a post, in rar as ffmpeg4android_demo_studio ((p.S. the is no GeneralUtils code because its big, please download rar and open it.))

    package com.netcompss.ffmpeg4android;

    public class CommandValidationException extends Exception {
       private static final long serialVersionUID = 1L;
    }

    =============================================

    package com.netcompss.ffmpeg4android;

       import android.content.Context;
       import android.util.Log;
       import android.widget.Toast;    
       public class FFMpeg {
       private Context context;
       private static FFMpeg instance;
       public FFMpeg (){
           this.instance = this;
       }

       public static  FFMpeg instance(){
           if(instance == null){
               instance = new FFMpeg();
           }
           return instance;
       }

       public void setContext(Context context){
           this.context = context;
       }

       public void mux(String video,String audio,String out){
           //GeneralUtils.checkForPermissionsMAndAbove(currentActivity, true);
           LoadJNI vk = new LoadJNI();
           try {
               String workFolder = context.getFilesDir().getAbsolutePath()+ "/";
               String cmd = "ffmpeg -i "+video+" -i "+audio+" -c copy -map 0:v:0 -map 1:a:0 -shortest "+out;
               vk.run(GeneralUtils.utilConvertToComplex(cmd) , workFolder , context);
               Log.i("test", "ffmpeg4android finished successfully");
           } catch (Throwable e) {
               Log.e("test", "vk run exception.", e);
           }
       }

       public void showMessage(String message){
           Toast.makeText(this.context,message,Toast.LENGTH_SHORT).show();
       }

       }

    ==================

    package com.netcompss.ffmpeg4android ;

    import android.app.Activity;
    import android.content.Context;
    import android.widget.TextView;
    import android.os.Bundle;


    public class LicenseCheckJNI
    {

       public int licenseCheck(String path, Context ctx) {
          String rcStr = "-100";
             rcStr = licenseCheckComplexJNI(path);
          int rc =Integer.decode(rcStr);
          return rc;
       }


       public native String licenseCheckComplexJNI(String path);
       public native String licenseCheckSimpleJNI(String path);




       static {
           System.loadLibrary("license-jni");
       }
    }

    package com.netcompss.ffmpeg4android;

    import java.io.File;
    import android.content.Context;
    import android.nfc.Tag;
    import android.util.Log;

    public final class LoadJNI {

      static {
         System.loadLibrary("loader-jni");
         System.loadLibrary("license-jni");
         System.loadLibrary("videokit");

      }

      /**
       *
       * @param args ffmpeg command
       * @param workFolder working directory
       * @param ctx Android context
       * @param isValidate apply validation to the command
       * @throws CommandValidationException
       */
      public void run(String[] args, String workFolder, Context ctx, boolean isValidate) throws CommandValidationException {
         Log.i(Prefs.TAG, "running ffmpeg4android_lib: " + Prefs.version);
         // delete previous log: this is essential for correct progress calculation
         String vkLogPath = workFolder + "vk.log";
         GeneralUtils.deleteFileUtil(vkLogPath);
         GeneralUtils.printCommand(args);

         //printInternalDirStructure(ctx);

         if (isValidate) {
            if (GeneralUtils.isValidCommand(args)) {
               Log.d(Prefs.TAG, "=LOAD================");
               load(args, workFolder, getVideokitLibPath(ctx), true);
            }
            else
               throw new CommandValidationException();
         }
         else {
            Log.d(Prefs.TAG, "=LOAD================");
            load(args, workFolder, getVideokitLibPath(ctx), true);
         }

      }

      /**
       *
       * @param args ffmpeg command
       * @param workFolder working directory
       * @param ctx Android context
       * @throws CommandValidationException
       */
      public void run(String[] args, String workFolder, Context ctx) throws CommandValidationException {
         run(args, workFolder, ctx, true);
      }


      private static void printInternalDirStructure(Context ctx) {
         Log.d(Prefs.TAG, "=printInternalDirStructure=");
         Log.d(Prefs.TAG, "==============================");
         File file = new File(ctx.getFilesDir().getParent());
         analyzeDir(file);
         Log.d(Prefs.TAG, "==============================");
      }

      private static void analyzeDir(File path) {
         if (path.isDirectory()) {
            Log.d(Prefs.TAG,"Scanning dir: " + path.getAbsolutePath());
            File[] files1 = path.listFiles();
            for (int i = 0; i < files1.length; i++) {
               analyzeDir(files1[i]);
            }
            Log.d(Prefs.TAG, "==========");
         }
         else {
            Log.d(Prefs.TAG, path.getAbsolutePath());

         }
      }

      private static String getVideokitLibPath(Context ctx) {

         //File file = new File(ctx.getFilesDir().getParent() + "/lib/");
         //analyzeDir(file);

         String videokitLibPath = ctx.getFilesDir().getParent()  + "/lib/libvideokit.so";

         File file = new File(videokitLibPath);
         if(file.exists())  {    
           Log.i(Prefs.TAG, "videokitLibPath exits");
         }
         else {
            Log.w(Prefs.TAG, "videokitLibPath not exits: " + videokitLibPath);
            videokitLibPath = ctx.getFilesDir().getParent()  + "/lib/arm64/libvideokit.so";
            Log.i(Prefs.TAG, "trying videokitLibPath: " + videokitLibPath);
            file = new File(videokitLibPath);
            if(file.exists())  {
               Log.i(Prefs.TAG, "videokitLibPath exits: " + videokitLibPath);
            }
            else {
               Log.w(Prefs.TAG, "videokitLibPath not exits: " + videokitLibPath);
               videokitLibPath = "/data/app/com.examples.ffmpeg4android_demo-1/lib/arm64/libvideokit.so";
               Log.i(Prefs.TAG, "trying videokitLibPath: " + videokitLibPath);
               file = new File(videokitLibPath);
               if(file.exists())  {
                  Log.i(Prefs.TAG, "videokitLibPath exits: " + videokitLibPath);
               }
               else {
                  Log.w(Prefs.TAG, "videokitLibPath not exits: " + videokitLibPath);
                  videokitLibPath = "/data/app/com.examples.ffmpeg4android_demo-2/lib/arm64/libvideokit.so";
                  Log.i(Prefs.TAG, "trying videokitLibPath: " + videokitLibPath);
                  if(file.exists())  {
                     Log.i(Prefs.TAG, "videokitLibPath exits: " + videokitLibPath);
                  }
                  else {
                     Log.e(Prefs.TAG, "can't find path of lib");
                  }
               }
            }
         }





         //String videokitLibPath = ctx.getFilesDir().getParent()  + "/lib/arm64/libvideokit.so";

         // only this works on Android M, and the number changes (demo-2, demo-1)
         //String videokitLibPath = "/data/app/com.examples.ffmpeg4android_demo-1/lib/arm64/libvideokit.so";


         //Log.i(Prefs.TAG, "videokitLibPath: " + videokitLibPath);
         return videokitLibPath;

      }



      public void fExit( Context ctx) {
         fexit(getVideokitLibPath(ctx));
      }

      public native String fexit(String videokitLibPath);
      public native String unload();
      public native String load(String[] args, String videokitSdcardPath, String videokitLibPath, boolean isComplex);
    }

    ============================

    package com.netcompss.ffmpeg4android;

    public class Prefs {
      public static final String TAG = "ffmpeg4android";
      public static final String version = "322.00.00_LM322";
    }
    [/code]
    [code=JavaScript]
    package com.netcompss.ffmpeg4android;

    import java.text.ParseException;
    import java.text.SimpleDateFormat;
    import java.util.Date;
    import java.util.Locale;

    import android.util.Log;

    public class ProgressCalculator {

      private int _durationOfCurrentWaitIndex = 0;
      private final int DURATION_OF_CURRENT_WAIT_INDEX_LIMIT = 12;
      private String _durationOfCurrent;
      private long _lastVklogSize = -1;
      private int _vkLogNoChangeCounter = 0;
      private SimpleDateFormat _simpleDateFormat;
      long _timeRef = -1;
      int  _prevProgress = 0;
      private String vkLogPath = null;

      public ProgressCalculator(String vkLogPathIn) {
         vkLogPath = vkLogPathIn;
         _simpleDateFormat = new SimpleDateFormat("HH:mm:ss.SS");
         try {
            Date ref = _simpleDateFormat.parse("00:00:00.00");
            ref.setYear(112);
            _timeRef = ref.getTime();
         } catch (ParseException e) {
            Log.w(Prefs.TAG, "failed to set _timeRef");
         }
      }

      public void initCalcParamsForNextInter() {
         Log.i(Prefs.TAG, "initCalcParamsForNextInter");
         _lastVklogSize = -1;
         _vkLogNoChangeCounter = 0;
         _durationOfCurrent = null;

      }

      public int calcProgress() {
         return calcProgress(1);
      }


      public int calcProgress(int durationMultiplyer) {
         //Log.i(Prefs.TAG, "========calc progress======= " + durationMultiplyer);
         int progress  = 0;
         if (_durationOfCurrent == null) {
            String dur = GeneralUtils.getDutationFromVCLogRandomAccess(vkLogPath);
            Log.d(Prefs.TAG, "dur: " + dur);
            if (dur == null || dur.equals("") || dur.equals("null") ) {
               Log.i(Prefs.TAG, "dur is not good, not setting ");
               if (_durationOfCurrentWaitIndex < DURATION_OF_CURRENT_WAIT_INDEX_LIMIT) {
                  Log.i(Prefs.TAG, "waiting for real duration, going out of calcProgress with 0");
                  _durationOfCurrentWaitIndex ++;
                  return 0;
               }
               else {
                  Log.i(Prefs.TAG, "_durationOfCurrentWaitIndex is equal to: " + DURATION_OF_CURRENT_WAIT_INDEX_LIMIT + " reseting.");
                  _durationOfCurrentWaitIndex = 0;
                  Log.i(Prefs.TAG, "setting fake Prefs.durationOfCurrent");

                  _durationOfCurrent = "00:03:00.00";
                  Log.w(Prefs.TAG, "setting fake Prefs.durationOfCurrent (Cant get from file): " + _durationOfCurrent);

               }
            }
            else {
               _durationOfCurrent = GeneralUtils.getDutationFromVCLogRandomAccess(vkLogPath);
               Log.i(Prefs.TAG, "duration: " + _durationOfCurrent + " \nTranscoding...");
            }
         }


         if (_durationOfCurrent != null) {

            long currentVkLogSize = -1;
            currentVkLogSize = GeneralUtils.getVKLogSizeRandomAccess(vkLogPath);
            //Log.d(Prefs.TAG, "currentVkLogSize: " + currentVkLogSize + " _lastVklogSize: " + _lastVklogSize);

            if (currentVkLogSize > _lastVklogSize) {
               _lastVklogSize = currentVkLogSize;
               _vkLogNoChangeCounter = 0;
            }
            else {
               //Log.w(Prefs.TAG, "Looks like Vk log is not increasing in size");
               _vkLogNoChangeCounter++;
            }


            String currentTimeStr = GeneralUtils.readLastTimeFromVKLogUsingRandomAccess(vkLogPath);
            //Log.d(Prefs.TAG, "currentTimeStr: " + currentTimeStr);
            if (currentTimeStr.equals("exit")) {
               Log.d(Prefs.TAG, "============Found one of the exit tokens in the log============");
               return 100;
            }
            else if (currentTimeStr.equals("error") && _prevProgress == 0) {
               Log.d(Prefs.TAG, "============Found error in the log============");
               return 100;
            }
            else if (_vkLogNoChangeCounter > 16) {
               Log.e(Prefs.TAG, "VK log is not changing in size, and no exit token found");
               return 100;
            }
            try {
               Date durationDate = _simpleDateFormat.parse(_durationOfCurrent);
               Date currentTimeDate = _simpleDateFormat.parse(currentTimeStr);
               currentTimeDate.setYear(112);
               durationDate.setYear(112);
               //Log.d(Prefs.TAG, " durationDate: " + durationDate + " currentTimeDate: " + currentTimeDate);

               long durationLong = durationDate.getTime() - _timeRef;
               if (durationMultiplyer != 1) {
                  //Log.i(Prefs.TAG, "====durationMultiplyer is not 1, handling===");
                  //Log.i(Prefs.TAG, "durationLong before: " + durationLong);
                  durationLong = durationLong * durationMultiplyer;
                  //Log.i(Prefs.TAG, "durationLong after: " + durationLong);
               }
               long currentTimeLong = currentTimeDate.getTime() - _timeRef;
               //Log.d(Prefs.TAG, " durationLong: " + durationLong + " currentTimeLong: " + currentTimeLong + " diff: " + (durationLong - currentTimeLong));
               progress  = Math.round(((float)currentTimeLong / durationLong) * 100);
               if (progress >= 100) {
                  Log.w(Prefs.TAG, "progress is 100, but can't find exit in the log, probably fake progress, still running...");
                  progress = 99;
               }
               _prevProgress = progress;


            } catch (ParseException e) {
               Log.w(Prefs.TAG, e.getMessage());
            }
         }

         return progress;
      }


    }

    ==================================

    Then clicked build and copied ffmpeg4android_lib.aar in unity project under assets/Plugins/Android/libs/
    then made this wrap up

    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    using UnityEngine.UI;
    using System.IO;


    public class Test : MonoBehaviour {

       private AndroidJavaObject FFMpeg = null;
       private AndroidJavaObject activityContext = null;

       public string Path1;
       public string Path2;
       public string Out3;

       public string path;

       public Text File1;
       public Text File2;
       public Text Context;
       public Text End;

       public void Convert(){
           File1.text = File.Exists (path+Path1).ToString();
           File2.text = File.Exists (path+Path2).ToString();
           if (FFMpeg == null) {
               using(AndroidJavaClass activityclass = new AndroidJavaClass("com.unity3d.player.UnityPlayer")){
                   activityContext = activityclass.GetStatic<androidjavaobject> ("currentActivity");
               }
               Context.text = "Context =" + activityContext;
           }
           using (AndroidJavaClass pluginClass = new AndroidJavaClass ("com.netcompss.ffmpeg4android.FFMpeg")) {
               if (pluginClass != null) {
                   FFMpeg = pluginClass.CallStatic<androidjavaobject> ("instance");
                   FFMpeg.Call ("setContext", activityContext);
                   //activityContext.Call ("runOnUiThread", new AndroidJavaRunnable (() => {
                   FFMpeg.Call ("mux", path+Path1,path+Path2,path+Out3);
                   //}));
               }
           }
           End.text = "Done";

       }
    }
    </androidjavaobject></androidjavaobject>

    =============================================

    And the problem is :
    When i launch apk made from original project in AndroidStudio everything works fine.
    When i launch apk made in unity its works fine until this part :
    load(args, workFolder, getVideokitLibPath(ctx), true) ;

    IT does load all lib ok.
    Its throw this error in logcat when trying to do that code

    03-23 10:43:17.293 28263-28277/? W/dalvikvm: No implementation found for native Lcom/netcompss/ffmpeg4android/LoadJNI;.load:([Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Z)Ljava/lang/String;
    03-23 10:43:17.294 28263-28277/? E/test: vk run exception.
                                            java.lang.UnsatisfiedLinkError: Native method not found: com.netcompss.ffmpeg4android.LoadJNI.load:([Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Z)Ljava/lang/String;
                                                at com.netcompss.ffmpeg4android.LoadJNI.load(Native Method)
                                                at com.netcompss.ffmpeg4android.LoadJNI.run(LoadJNI.java:37)
                                                at com.netcompss.ffmpeg4android.LoadJNI.run(LoadJNI.java:57)
                                                at com.netcompss.ffmpeg4android.FFMpeg.mux(FFMpeg.java:36)
                                                at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
                                                at com.unity3d.player.UnityPlayer.a(Unknown Source)
                                                at com.unity3d.player.UnityPlayer$b$1.handleMessage(Unknown Source)
                                                at android.os.Handler.dispatchMessage(Handler.java:103)
                                                at android.os.Looper.loop(Looper.java:194)
                                                at com.unity3d.player.UnityPlayer$b.run(Unknown Source)

    Projects Dropbox link :
    https://www.dropbox.com/s/6vglcw7xk2n8lwu/AndroidStudioProjects.rar?dl=0