Recherche avancée

Médias (91)

Autres articles (80)

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

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

Sur d’autres sites (11573)

  • Premium Plugins now available on the Piwik Analytics Marketplace

    2 novembre 2016, par Piwik Core Team — Community, Press Releases

    We are super excited to announce the launch of three new premium plugins which are now available on the Piwik Marketplace : A/B Testing, Media Analytics, and Activity Log.

    All three plugins are easy to use and come with 100% data ownership, documentation, integration with Piwik, powerful data exports and no data limits.

    These first premium plugins and the new Marketplace capabilities have been designed and built with love by InnoCraft – the new company brought to you by the makers of Piwik.

    1. A/B Testing

    A/B Testing helps you grow your business by comparing different versions of your website or app to detect the most successful version that increases your sales, revenue, conversions, pageviews, and more.

    A/B tests are also known as experiments or split tests. In an A/B test you show two or more different variations to your users (visitors) and the variation that performs better wins. When a user enters the experiment, a variation will be randomly chosen and the user will see this variation for all subsequent visits. Piwik A/B testing uses advanced statistical analysis to detect which variation performs better for your conversion goals and success metrics. Even small tests can increase your sales and conversions massively !

    Learn more here :

    2. Media Analytics

    Do you have videos or audio on your website, or in an app ? Media Analytics gives you powerful insights into how your audience watches your videos and listens to your audio, to ultimately maximize your success.

    Learn all about your audience. Which media your users are playing, for how long, how often, and where they dropped off ? Where are your users located around the world ? Who your audience are and what did people do before and after watching a video or listening to audio ? Many of the reports are also available in Real time, so you can gain insights and react quickly.

    Learn more here :

    3. Activity log

    Keep an eye on everything that is happening on your Piwik platform with the Activity Log plugin.

    The activity log, also known as audit log or audit trail, improves your Piwik’s security and diagnostic by showing a chronological set of entries that provides documentary evidence of activities that happened in your Piwik. It allows Piwik Super Users to quickly review the actions performed by members of your organization or clients, and also lets every user review details of their own actions.

    Learn more in the Activity Log FAQ or see a list of all the features on the Marketplace : Activity Log plugin.

    The Piwik Marketplace guarantees

    Purchasing on the Piwik Marketplace is easy and safe. Check out our guarantees :

    Why premium plugins ?

    Researching, building, documenting, testing and maintaining quality products take years of experience and months of work. When you purchase a premium plugin from the Marketplace, you get a fully working product, with free updates for the duration of the license and you stay in full control of your analytics data. When purchasing premium plugins you also directly help the Piwik core engineers to continue to grow and innovate ! That’s because a % of earnings on premium plugin license sales directly fund new Piwik versions and more amazing features. Learn more in the FAQ : What are premium plugins ?.

    About InnoCraft

    These first three premium plugins have been designed and built with love by InnoCraft. InnoCraft is a new company founded by the creator of Piwik along with the lead engineers of Piwik based in Wellington, New Zealand. At InnoCraft, product experts, designers and engineers are passionate about crafting high quality and innovative products to help grow your business and to maximize your success.

    Learn more on the company website : www.innocraft.com

    To stay updated on their releases, follow InnoCraftHQ on Twitter or Like InnoCraft on Facebook.

    Is the Piwik Marketplace open to all ?

    Yes, our marketplace allows other companies and developers to sell their plugins to all Piwik Analytics users. If you are a developer or a company interested in selling your plugin(s) on our Marketplace please contact us. As a developer selling plugins, you will get paid every month for your earnings, and you will be able to see detailed reports about your sales, upload new plugin updates, respond to pre-sales enquiries, etc.

    Resources

    Learn more :

    We are looking forward to your continued support with the Piwik project as we expand and offer you more ways to maximize your success.

    Please contact the Marketplace team with any questions or feedback.

    Wishing you a warm : Happy Analytics !

  • Change AVI creation date with ffmpeg ?

    1er novembre 2016, par brock

    As far as I can tell the following ffmpeg command should copy all existing metadata in the input file to the output file and modify the specified field in the output file :

    ffmpeg -i VID_20130502_220104.avi -metadata creation_time="2013-05-02 22:01:04" -codec copy VID_20130502_220104-2.avi

    Instead, it seems to strip all metadata from the output file. Here is the output of a few commands. I am going nuts. I think this should work, but why is it not ?

    Command to edit the creation time :

    ffmpeg -i VID_20130502_220104.avi -metadata creation_time="2013-05-02 22:01:04" -codec copy VID_20130502_220104-2.avi

    ffmpeg version 3.1.5 Copyright (c) 2000-2016 the FFmpeg developers
     built with gcc 5.4.0 (GCC)
     configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-libebur128 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
     libavutil      55. 28.100 / 55. 28.100
     libavcodec     57. 48.101 / 57. 48.101
     libavformat    57. 41.100 / 57. 41.100
     libavdevice    57.  0.101 / 57.  0.101
     libavfilter     6. 47.100 /  6. 47.100
     libswscale      4.  1.100 /  4.  1.100
     libswresample   2.  1.100 /  2.  1.100
     libpostproc    54.  0.100 / 54.  0.100
    Guessed Channel Layout for Input Stream #0.1 : mono
    Input #0, avi, from 'VID_20130502_220104.avi':
     Metadata:
       encoder         :
       maker           : NIKON
       model           : COOLPIX S4300
       creation_time   : 2011-01-01 00:00:00
     Duration: 00:01:30.50, start: 0.000000, bitrate: 32135 kb/s
       Stream #0:0: Video: mjpeg (MJPG / 0x47504A4D), yuvj422p(pc, bt470bg/unknown/unknown), 1280x720, 31782 kb/s, 30 fps, 30 tbr, 30 tbn, 30 tbc
       Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 22050 Hz, 1 channels, s16, 352 kb/s
    [avi @ 000000000032ad40] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
       Last message repeated 1 times
    Output #0, avi, to 'VID_20130502_220104-2.avi':
     Metadata:
       creation_time   : 2013-05-02 22:01:04
       maker           : NIKON
       model           : COOLPIX S4300
       ISFT            : Lavf57.41.100
       Stream #0:0: Video: mjpeg (MJPG / 0x47504A4D), yuvj422p(pc, bt470bg/unknown/unknown), 1280x720, q=2-31, 31782 kb/s, 30 fps, 30 tbr, 30 tbn, 30 tbc
       Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 22050 Hz, mono, 352 kb/s
    Stream mapping:
     Stream #0:0 -> #0:0 (copy)
     Stream #0:1 -> #0:1 (copy)
    Press [q] to stop, [?] for help
    frame=  891 fps=0.0 q=-1.0 size=  116171kB time=00:00:29.69 bitrate=32043.1kbits/s speed=59.4x    
    frame= 1739 fps=1739 q=-1.0 size=  227191kB time=00:00:57.96 bitrate=32107.5kbits/s speed=  58x    
    frame= 2609 fps=1739 q=-1.0 size=  340940kB time=00:01:26.96 bitrate=32115.9kbits/s speed=  58x    
    frame= 2715 fps=1734 q=-1.0 Lsize=  355018kB time=00:01:30.49 bitrate=32136.3kbits/s speed=57.8x    
    video:350984kB audio:3897kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.038597%

    Command to inspect the output file metadata with ffmpeg :

    ffmpeg -i VID_20130502_220104-2.avi

    ffmpeg version 3.1.5 Copyright (c) 2000-2016 the FFmpeg developers
     built with gcc 5.4.0 (GCC)
     configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-libebur128 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
     libavutil      55. 28.100 / 55. 28.100
     libavcodec     57. 48.101 / 57. 48.101
     libavformat    57. 41.100 / 57. 41.100
     libavdevice    57.  0.101 / 57.  0.101
     libavfilter     6. 47.100 /  6. 47.100
     libswscale      4.  1.100 /  4.  1.100
     libswresample   2.  1.100 /  2.  1.100
     libpostproc    54.  0.100 / 54.  0.100
    Guessed Channel Layout for Input Stream #0.1 : mono
    Input #0, avi, from 'VID_20130502_220104-2.avi':
     Metadata:
       encoder         : Lavf57.41.100
     Duration: 00:01:30.50, start: 0.000000, bitrate: 32136 kb/s
       Stream #0:0: Video: mjpeg (MJPG / 0x47504A4D), yuvj422p(pc, bt470bg/unknown/unknown), 1280x720, 31782 kb/s, 30 fps, 30 tbr, 30 tbn, 30 tbc
       Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 22050 Hz, 1 channels, s16, 352 kb/s
    At least one output file must be specified

    Command to inspect the input file metadata with exiftool :

    exiftool.exe VID_20130502_220104.avi

    ExifTool Version Number         : 10.30
    File Name                       : VID_20130502_220104.avi
    Directory                       : .
    File Size                       : 347 MB
    File Modification Date/Time     : 2013:05:13 16:33:52-04:00
    File Access Date/Time           : 2015:11:10 23:08:25-05:00
    File Creation Date/Time         : 2015:11:10 23:08:25-05:00
    File Permissions                : rw-rw-rw-
    File Type                       : AVI
    File Type Extension             : avi
    MIME Type                       : video/x-msvideo
    Frame Rate                      : 30
    Max Data Rate                   : 488.3 kB/s
    Frame Count                     : 2715
    Stream Count                    : 2
    Stream Type                     : Video
    Video Codec                     : mjpg
    Video Frame Rate                : 30
    Video Frame Count               : 2715
    Quality                         : 10000
    Sample Size                     : Variable
    Image Width                     : 1280
    Image Height                    : 720
    Planes                          : 1
    Bit Depth                       : 24
    Compression                     : MJPG
    Image Length                    : 2764800
    Pixels Per Meter X              : 0
    Pixels Per Meter Y              : 0
    Num Colors                      : Use BitDepth
    Num Important Colors            : All
    Audio Codec                     :
    Audio Sample Rate               : 22050
    Audio Sample Count              : 1995256
    Encoding                        : Microsoft PCM
    Num Channels                    : 1
    Sample Rate                     : 22050
    Avg Bytes Per Sec               : 44100
    Bits Per Sample                 : 16
    Maker Note Type                 : NIKON
    Maker Note Version              : 0.1.0.0
    Make                            : NIKON
    Model                           : COOLPIX S4300
    Software                        : V1.0
    Equipment                       : NIKON DIGITAL CAMERA
    Orientation                     : Horizontal (normal)
    Exposure Time                   : 1/15
    F Number                        : 3.5
    Exposure Compensation           : 0
    Max Aperture Value              : 3.2
    Metering Mode                   : Multi-segment
    Focal Length                    : 4.6 mm
    X Resolution                    : 72
    Y Resolution                    : 72
    Resolution Unit                 : inches
    Date/Time Original              : 2011:01:01 00:00:00
    Create Date                     : 2011:01:01 00:00:00
    Focus Mode                      : AF-S
    Digital Zoom                    : 1
    Color Mode                      : COLOR
    Sharpness                       : AUTO
    White Balance                   : NORMAL
    Noise Reduction                 : OFF
    Thumbnail Image                 : (Binary data 3082 bytes, use -b option to extract)
    Aperture                        : 3.5
    Duration                        : 0:01:30
    Image Size                      : 1280x720
    Megapixels                      : 0.922
    Shutter Speed                   : 1/15
    Focal Length                    : 4.6 mm

    Command to inspect the output file metadata with exiftool :

    exiftool.exe VID_20130502_220104-2.avi

    ExifTool Version Number         : 10.30
    File Name                       : VID_20130502_220104-2.avi
    Directory                       : .
    File Size                       : 347 MB
    File Modification Date/Time     : 2016:11:01 00:17:38-04:00
    File Access Date/Time           : 2016:11:01 00:17:36-04:00
    File Creation Date/Time         : 2016:11:01 00:15:18-04:00
    File Permissions                : rw-rw-rw-
    File Type                       : AVI
    File Type Extension             : avi
    MIME Type                       : video/x-msvideo
    Frame Rate                      : 30
    Max Data Rate                   : 3923 kB/s
    Frame Count                     : 2715
    Stream Count                    : 2
    Stream Type                     : Video
    Video Codec                     : MJPG
    Video Frame Rate                : 30
    Video Frame Count               : 2715
    Quality                         : Default
    Sample Size                     : Variable
    Image Width                     : 1280
    Image Height                    : 720
    Planes                          : 1
    Bit Depth                       : 24
    Compression                     : MJPG
    Image Length                    : 2764800
    Pixels Per Meter X              : 0
    Pixels Per Meter Y              : 0
    Num Colors                      : Use BitDepth
    Num Important Colors            : All
    Audio Codec                     : .
    Audio Sample Rate               : 22050
    Audio Sample Count              : 1995256
    Encoding                        : Microsoft PCM
    Num Channels                    : 1
    Sample Rate                     : 22050
    Avg Bytes Per Sec               : 44100
    Bits Per Sample                 : 16
    Software                        : Lavf57.41.100
    Duration                        : 0:01:30
    Image Size                      : 1280x720
    Megapixels                      : 0.922
  • undefined reference to ffmpeg functions in native code using Android Studio 2.2

    12 octobre 2016, par Krzysztof Kansy

    I have a problem with using ffmpeg in Android Studio 2.2 using NDK 13 and new Cmake building system. FFmpeg version is 3.1.4.
    The system I’m working on is Linux Mint 18 64-bit.
    At the build time I’m getting undefined reference error each time I use ffpeg functions.

    My MainActivity.java :

    public class MainActivity extends AppCompatActivity {

       @Override
       protected void onCreate(Bundle savedInstanceState) {
           super.onCreate(savedInstanceState);
           setContentView(R.layout.activity_main);

       // Example of a call to a native method
       TextView tv = (TextView) findViewById(R.id.sample_text);
       tv.setText(stringFromJNI());
       }

       /**
        * A native method that is implemented by the 'native-lib' native library,
        * which is packaged with this application.
        */
       public native String stringFromJNI();

       // Used to load the 'native-lib' library on application startup.
       static {
           System.loadLibrary("native-lib");
       }
    }

    My native class (undefined reference is pointing to av_init_packet(&avPacket)) :

    #include
    #include <string>
    #include <android></android>log.h>
    #include <libavcodec></libavcodec>avcodec.h>


    extern "C"
    jstring
    Java_com_example_tito_jnitest_MainActivity_stringFromJNI(
           JNIEnv* env,
           jobject /* this */) {

       std::string hello = "Hello from C++";

       __android_log_print(ANDROID_LOG_INFO, "JNItest", "Hello from JNI!");

       AVPacket avPacket;
       av_init_packet(&amp;avPacket);

       return env->NewStringUTF(hello.c_str());
    }
    </string>

    build.gradle script

    apply plugin: 'com.android.application'

    android {
       compileSdkVersion 24
       buildToolsVersion "24.0.3"
       defaultConfig {
           applicationId "com.example.tito.jnitest"
           minSdkVersion 19
           targetSdkVersion 24
           versionCode 1
           versionName "1.0"
           testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
           externalNativeBuild {
               cmake {
                   // Passes optional arguments to CMake.
                   cppFlags "-frtti -fexceptions"
                   abiFilters 'armeabi'
               }
           }
       }

       sourceSets {
           main {
               jniLibs.srcDirs = ['/home/tito/AndroidStudioProjects/JNItest/app/src/main/jniLibs']
           }
       }

       buildTypes {
           release {
               minifyEnabled false
               proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
           }
       }
       externalNativeBuild {
           cmake {
               path "CMakeLists.txt"
           }
       }
    }

    dependencies {
       compile fileTree(dir: 'libs', include: ['*.jar'])
       androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
           exclude group: 'com.android.support', module: 'support-annotations'
       })
       compile 'com.android.support:appcompat-v7:24.2.1'
       testCompile 'junit:junit:4.12'
    }

    CMakeLists.txt

    cmake_minimum_required(VERSION 3.4.1)

    include_directories(/home/tito/Android/Sdk/ndk-bundle/sources/ffmpeg-3.1.4/android/${ANDROID_ABI}/include)

    #set(CMAKE_VERBOSE_MAKEFILE on)
    #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")

    add_library( avutil
                SHARED
                IMPORTED )

    set_target_properties(
                   avutil
                   PROPERTIES IMPORTED_LOCATION
                   /home/tito/AndroidStudioProjects/JNItest/app/src/main/jniLibs/${ANDROID_ABI}/libavutil-55.so )

    add_library( swscale
                SHARED
                IMPORTED )

    set_target_properties(
                   swscale
                   PROPERTIES IMPORTED_LOCATION
                   /home/tito/AndroidStudioProjects/JNItest/app/src/main/jniLibs/${ANDROID_ABI}/libswscale-4.so )

    add_library( swresample
                SHARED
                IMPORTED )

    set_target_properties(
                   swresample
                   PROPERTIES IMPORTED_LOCATION
                   /home/tito/AndroidStudioProjects/JNItest/app/src/main/jniLibs/${ANDROID_ABI}/libswresample-2.so )

    add_library( avcodec
                SHARED
                IMPORTED )

    set_target_properties(
                   avcodec
                   PROPERTIES IMPORTED_LOCATION
                   /home/tito/AndroidStudioProjects/JNItest/app/src/main/jniLibs/${ANDROID_ABI}/libavcodec-57.so )

    add_library( avfilter
                SHARED
                IMPORTED )

    set_target_properties(
                   avfilter
                   PROPERTIES IMPORTED_LOCATION
                   /home/tito/AndroidStudioProjects/JNItest/app/src/main/jniLibs/${ANDROID_ABI}/libavfilter-6.so )

    add_library( avformat
                SHARED
                IMPORTED )

    set_target_properties(
                   avformat
                   PROPERTIES IMPORTED_LOCATION
                   /home/tito/AndroidStudioProjects/JNItest/app/src/main/jniLibs/${ANDROID_ABI}/libavformat-57.so )

    add_library( avdevice
                SHARED
                IMPORTED )

    set_target_properties(
                   avdevice
                   PROPERTIES IMPORTED_LOCATION
                   /home/tito/AndroidStudioProjects/JNItest/app/src/main/jniLibs/${ANDROID_ABI}/libavdevice-57.so )

    add_library( native-lib
                SHARED
                src/main/cpp/native-lib.cpp )

    find_library( log-lib
                 log )

    target_link_libraries(native-lib ${log-lib} avutil swscale swresample avcodec avfilter avformat avdevice)

    Build process of ffmpeg seemed to be successful. Here’s my build script :

    #!/bin/bash
    NDK=/home/tito/Android/Sdk/ndk-bundle
    SYSROOT=$NDK/platforms/android-19/arch-arm/
    TOOLCHAIN=$NDK/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64
    function build_one
    {
    ./configure \
    --prefix=$PREFIX \
    --disable-static \
    --enable-shared \
    --disable-doc \
    --disable-ffmpeg \
    --disable-ffplay \
    --disable-ffprobe \
    --disable-ffserver \
    --disable-doc \
    --cross-prefix=$TOOLCHAIN/bin/arm-linux-androideabi- \
    --target-os=linux \
    --arch=arm \
    --enable-cross-compile \
    --sysroot=$SYSROOT \
    --extra-cflags="-Os -fpic -marm" \
    --extra-ldflags="-marm" \
    $ADDITIONAL_CONFIGURE_FLAG
    make clean
    make
    make install
    }
    CPU=armeabi
    PREFIX=$(pwd)/android/$CPU
    build_one

    One thing I noticed that could indicate that something is wrong with ffmpeg build is warning WARNING: /home/tito/Android/Sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-pkg-config not found, library detection may fail. during building. I’m not sure if this may be cause of problems.

    I was trying to build for all of the ABIs, but for now I decided to focus on making just armeabi working. I’m having exact same failure after using e.g. arm64-v8a.

    Finally, here is the gradle console’s content with error :

    Executing tasks: [:app:assembleDebug]

    Configuration on demand is an incubating feature.
    Incremental java compilation is an incubating feature.
    :app:preBuild UP-TO-DATE
    :app:preDebugBuild UP-TO-DATE
    :app:checkDebugManifest
    :app:preReleaseBuild UP-TO-DATE
    :app:prepareComAndroidSupportAnimatedVectorDrawable2421Library UP-TO-DATE
    :app:prepareComAndroidSupportAppcompatV72421Library UP-TO-DATE
    :app:prepareComAndroidSupportSupportCompat2421Library UP-TO-DATE
    :app:prepareComAndroidSupportSupportCoreUi2421Library UP-TO-DATE
    :app:prepareComAndroidSupportSupportCoreUtils2421Library UP-TO-DATE
    :app:prepareComAndroidSupportSupportFragment2421Library UP-TO-DATE
    :app:prepareComAndroidSupportSupportMediaCompat2421Library UP-TO-DATE
    :app:prepareComAndroidSupportSupportV42421Library UP-TO-DATE
    :app:prepareComAndroidSupportSupportVectorDrawable2421Library UP-TO-DATE
    :app:prepareDebugDependencies
    :app:compileDebugAidl UP-TO-DATE
    :app:compileDebugRenderscript UP-TO-DATE
    :app:generateDebugBuildConfig UP-TO-DATE
    :app:generateDebugResValues UP-TO-DATE
    :app:generateDebugResources UP-TO-DATE
    :app:mergeDebugResources UP-TO-DATE
    :app:processDebugManifest UP-TO-DATE
    :app:processDebugResources
    :app:generateDebugSources
    :app:incrementalDebugJavaCompilationSafeguard UP-TO-DATE
    :app:compileDebugJavaWithJavac UP-TO-DATE
    :app:generateJsonModelDebug UP-TO-DATE
    :app:externalNativeBuildDebug
     building /home/tito/AndroidStudioProjects/JNItest/app/build/intermediates/cmake/debug/obj/armeabi/libnative-lib.so
    :app:externalNativeBuildDebug FAILED

    FAILURE: Build failed with an exception.

    * What went wrong:
    Execution failed for task ':app:externalNativeBuildDebug'.
    > Build command failed.
     Error while executing '/home/tito/Android/Sdk/cmake/3.6.3155560/bin/cmake' with arguments {--build /home/tito/AndroidStudioProjects/JNItest/app/.externalNativeBuild/cmake/debug/armeabi --target native-lib}
     [1/2] Building CXX object CMakeFiles/native-lib.dir/src/main/cpp/native-lib.cpp.o
     [2/2] Linking CXX shared library ../../../../build/intermediates/cmake/debug/obj/armeabi/libnative-lib.so
     FAILED: : &amp;&amp; /home/tito/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++  -target armv5te-none-linux-androideabi -gcc-toolchain /home/tito/Android/Sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64 --sysroot=/home/tito/Android/Sdk/ndk-bundle/platforms/android-19/arch-arm -fPIC -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -march=armv5te -mtune=xscale -msoft-float -fno-integrated-as -mthumb -Wa,--noexecstack -Wformat -Werror=format-security -fno-exceptions -fno-rtti -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -march=armv5te -mtune=xscale -msoft-float -fno-integrated-as -mthumb -Wa,--noexecstack -Wformat -Werror=format-security -fno-exceptions -fno-rtti -frtti -fexceptions -O0 -fno-limit-debug-info -O0 -fno-limit-debug-info  -Wl,--build-id -Wl,--warn-shared-textrel -Wl,--fatal-warnings -Wl,--no-undefined -Wl,-z,noexecstack -Qunused-arguments -Wl,-z,relro -Wl,-z,now -Wl,--build-id -Wl,--warn-shared-textrel -Wl,--fatal-warnings -Wl,--no-undefined -Wl,-z,noexecstack -Qunused-arguments -Wl,-z,relro -Wl,-z,now -shared -Wl,-soname,libnative-lib.so -o ../../../../build/intermediates/cmake/debug/obj/armeabi/libnative-lib.so CMakeFiles/native-lib.dir/src/main/cpp/native-lib.cpp.o  /home/tito/Android/Sdk/ndk-bundle/platforms/android-19/arch-arm/usr/lib/liblog.so ../../../../src/main/jniLibs/armeabi/libavutil-55.so ../../../../src/main/jniLibs/armeabi/libswscale-4.so ../../../../src/main/jniLibs/armeabi/libswresample-2.so ../../../../src/main/jniLibs/armeabi/libavcodec-57.so ../../../../src/main/jniLibs/armeabi/libavfilter-6.so ../../../../src/main/jniLibs/armeabi/libavformat-57.so ../../../../src/main/jniLibs/armeabi/libavdevice-57.so -lm "/home/tito/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi/libgnustl_static.a" "-latomic" &amp;&amp; :
     /home/tito/AndroidStudioProjects/JNItest/app/src/main/cpp/native-lib.cpp:18: error: undefined reference to 'av_init_packet(AVPacket*)'
     clang++: error: linker command failed with exit code 1 (use -v to see invocation)
     ninja: build stopped: subcommand failed.


    * Try:
    Run with --info or --debug option to get more log output.

    * Exception is:
    org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:externalNativeBuildDebug'.
       at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
       at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
       at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
       at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:66)
       at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
       at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:52)
       at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
       at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
       at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
       at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:203)
       at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:185)
       at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:66)
       at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:50)
       at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:25)
       at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:110)
       at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:37)
       at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
       at org.gradle.execution.DefaultBuildExecuter.access$000(DefaultBuildExecuter.java:23)
       at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.java:43)
       at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
       at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
       at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:30)
       at org.gradle.initialization.DefaultGradleLauncher$4.run(DefaultGradleLauncher.java:153)
       at org.gradle.internal.Factories$1.create(Factories.java:22)
       at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:91)
       at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:53)
       at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:150)
       at org.gradle.initialization.DefaultGradleLauncher.access$200(DefaultGradleLauncher.java:32)
       at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:98)
       at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:92)
       at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:91)
       at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:63)
       at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:92)
       at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:83)
       at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:99)
       at org.gradle.tooling.internal.provider.runner.BuildModelActionRunner.run(BuildModelActionRunner.java:46)
       at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
       at org.gradle.tooling.internal.provider.runner.SubscribableBuildActionRunner.run(SubscribableBuildActionRunner.java:58)
       at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
       at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:48)
       at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:30)
       at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:81)
       at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:46)
       at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:52)
       at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
       at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
       at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:37)
       at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
       at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:26)
       at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
       at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:34)
       at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
       at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:74)
       at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:72)
       at org.gradle.util.Swapper.swap(Swapper.java:38)
       at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:72)
       at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
       at org.gradle.launcher.daemon.server.health.DaemonHealthTracker.execute(DaemonHealthTracker.java:47)
       at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
       at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:60)
       at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
       at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
       at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:72)
       at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
       at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
       at org.gradle.launcher.daemon.server.health.HintGCAfterBuild.execute(HintGCAfterBuild.java:41)
       at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
       at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:50)
       at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:237)
       at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
       at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
    Caused by: org.gradle.internal.UncheckedException: Build command failed.
    Error while executing '/home/tito/Android/Sdk/cmake/3.6.3155560/bin/cmake' with arguments {--build /home/tito/AndroidStudioProjects/JNItest/app/.externalNativeBuild/cmake/debug/armeabi --target native-lib}
    [1/2] Building CXX object CMakeFiles/native-lib.dir/src/main/cpp/native-lib.cpp.o
    [2/2] Linking CXX shared library ../../../../build/intermediates/cmake/debug/obj/armeabi/libnative-lib.so
    FAILED: : &amp;&amp; /home/tito/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++  -target armv5te-none-linux-androideabi -gcc-toolchain /home/tito/Android/Sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64 --sysroot=/home/tito/Android/Sdk/ndk-bundle/platforms/android-19/arch-arm -fPIC -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -march=armv5te -mtune=xscale -msoft-float -fno-integrated-as -mthumb -Wa,--noexecstack -Wformat -Werror=format-security -fno-exceptions -fno-rtti -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -march=armv5te -mtune=xscale -msoft-float -fno-integrated-as -mthumb -Wa,--noexecstack -Wformat -Werror=format-security -fno-exceptions -fno-rtti -frtti -fexceptions -O0 -fno-limit-debug-info -O0 -fno-limit-debug-info  -Wl,--build-id -Wl,--warn-shared-textrel -Wl,--fatal-warnings -Wl,--no-undefined -Wl,-z,noexecstack -Qunused-arguments -Wl,-z,relro -Wl,-z,now -Wl,--build-id -Wl,--warn-shared-textrel -Wl,--fatal-warnings -Wl,--no-undefined -Wl,-z,noexecstack -Qunused-arguments -Wl,-z,relro -Wl,-z,now -shared -Wl,-soname,libnative-lib.so -o ../../../../build/intermediates/cmake/debug/obj/armeabi/libnative-lib.so CMakeFiles/native-lib.dir/src/main/cpp/native-lib.cpp.o  /home/tito/Android/Sdk/ndk-bundle/platforms/android-19/arch-arm/usr/lib/liblog.so ../../../../src/main/jniLibs/armeabi/libavutil-55.so ../../../../src/main/jniLibs/armeabi/libswscale-4.so ../../../../src/main/jniLibs/armeabi/libswresample-2.so ../../../../src/main/jniLibs/armeabi/libavcodec-57.so ../../../../src/main/jniLibs/armeabi/libavfilter-6.so ../../../../src/main/jniLibs/armeabi/libavformat-57.so ../../../../src/main/jniLibs/armeabi/libavdevice-57.so -lm "/home/tito/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi/libgnustl_static.a" "-latomic" &amp;&amp; :
    /home/tito/AndroidStudioProjects/JNItest/app/src/main/cpp/native-lib.cpp:18: error: undefined reference to 'av_init_packet(AVPacket*)'
    clang++: error: linker command failed with exit code 1 (use -v to see invocation)
    ninja: build stopped: subcommand failed.

       at org.gradle.internal.UncheckedException.throwAsUncheckedException(UncheckedException.java:45)
       at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:78)
       at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:228)
       at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:221)
       at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:210)
       at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:621)
       at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:604)
       at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
       at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
       ... 70 more
    Caused by: Build command failed.
    Error while executing '/home/tito/Android/Sdk/cmake/3.6.3155560/bin/cmake' with arguments {--build /home/tito/AndroidStudioProjects/JNItest/app/.externalNativeBuild/cmake/debug/armeabi --target native-lib}
    [1/2] Building CXX object CMakeFiles/native-lib.dir/src/main/cpp/native-lib.cpp.o
    [2/2] Linking CXX shared library ../../../../build/intermediates/cmake/debug/obj/armeabi/libnative-lib.so
    FAILED: : &amp;&amp; /home/tito/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++  -target armv5te-none-linux-androideabi -gcc-toolchain /home/tito/Android/Sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64 --sysroot=/home/tito/Android/Sdk/ndk-bundle/platforms/android-19/arch-arm -fPIC -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -march=armv5te -mtune=xscale -msoft-float -fno-integrated-as -mthumb -Wa,--noexecstack -Wformat -Werror=format-security -fno-exceptions -fno-rtti -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -march=armv5te -mtune=xscale -msoft-float -fno-integrated-as -mthumb -Wa,--noexecstack -Wformat -Werror=format-security -fno-exceptions -fno-rtti -frtti -fexceptions -O0 -fno-limit-debug-info -O0 -fno-limit-debug-info  -Wl,--build-id -Wl,--warn-shared-textrel -Wl,--fatal-warnings -Wl,--no-undefined -Wl,-z,noexecstack -Qunused-arguments -Wl,-z,relro -Wl,-z,now -Wl,--build-id -Wl,--warn-shared-textrel -Wl,--fatal-warnings -Wl,--no-undefined -Wl,-z,noexecstack -Qunused-arguments -Wl,-z,relro -Wl,-z,now -shared -Wl,-soname,libnative-lib.so -o ../../../../build/intermediates/cmake/debug/obj/armeabi/libnative-lib.so CMakeFiles/native-lib.dir/src/main/cpp/native-lib.cpp.o  /home/tito/Android/Sdk/ndk-bundle/platforms/android-19/arch-arm/usr/lib/liblog.so ../../../../src/main/jniLibs/armeabi/libavutil-55.so ../../../../src/main/jniLibs/armeabi/libswscale-4.so ../../../../src/main/jniLibs/armeabi/libswresample-2.so ../../../../src/main/jniLibs/armeabi/libavcodec-57.so ../../../../src/main/jniLibs/armeabi/libavfilter-6.so ../../../../src/main/jniLibs/armeabi/libavformat-57.so ../../../../src/main/jniLibs/armeabi/libavdevice-57.so -lm "/home/tito/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi/libgnustl_static.a" "-latomic" &amp;&amp; :
    /home/tito/AndroidStudioProjects/JNItest/app/src/main/cpp/native-lib.cpp:18: error: undefined reference to 'av_init_packet(AVPacket*)'
    clang++: error: linker command failed with exit code 1 (use -v to see invocation)
    ninja: build stopped: subcommand failed.

       at com.android.build.gradle.tasks.ExternalNativeBuildTaskUtils.executeBuildProcessAndLogError(ExternalNativeBuildTaskUtils.java:233)
       at com.android.build.gradle.tasks.ExternalNativeBuildTask.executeProcessBatch(ExternalNativeBuildTask.java:231)
       at com.android.build.gradle.tasks.ExternalNativeBuildTask.build(ExternalNativeBuildTask.java:163)
       at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75)
       ... 77 more


    BUILD FAILED

    Total time: 0.723 secs

    Can anyone tell me what I’m doing wrong here ?