Recherche avancée

Médias (1)

Mot : - Tags -/censure

Autres articles (95)

  • Les sons

    15 mai 2013, par
  • 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

  • Pas question de marché, de cloud etc...

    10 avril 2011

    Le vocabulaire utilisé sur ce site essaie d’éviter toute référence à la mode qui fleurit allègrement
    sur le web 2.0 et dans les entreprises qui en vivent.
    Vous êtes donc invité à bannir l’utilisation des termes "Brand", "Cloud", "Marché" etc...
    Notre motivation est avant tout de créer un outil simple, accessible à pour tout le monde, favorisant
    le partage de créations sur Internet et permettant aux auteurs de garder une autonomie optimale.
    Aucun "contrat Gold ou Premium" n’est donc prévu, aucun (...)

Sur d’autres sites (8097)

  • How to build ffmpeg executable binary for Android ?

    22 février 2016, par Én Xinh Lung Linh

    I’m struggling how to build an executable binary of ffmpeg for Android command.
    I am very new to ffmpeg which I need to extract audio from video files such as mp4.

    I followed a tutorial here to build ffmpeg binary : http://www.roman10.net/how-to-build-ffmpeg-for-android/

    I dont need *.so file to use in NDK but only an executable binary.

    I tried to enable : --enable-ffmpeg in shell script build. It yielded a ffmpeg file too. Especially, the file size is small with around 2M. However, I am unable to use it in android execution as following :

    p = Runtime.getRuntime().exec("/data/data/example/ffmpeg -i /sdcard/test.mp4  -vn -acodec copy /sdcard/test.aac");

    The above executed very quickly and of course it didn’t give any result.

    I continued searching and found an example here : https://github.com/guardianproject/android-ffmpeg-java

    The ffmpeg binary in the project is nice, I can run some command with desired output. However, some conversions to mp3 format gets failed because probably it lacked libmp3lame when building. Specially, ffmpeg is heavier than mine quite much, it is about 15M. I don’t know how they build the binayr.

    I’m looking for is a proper guide which I can build with arbitrary options such as libmp3lame, libshine. I get stuck at m4a to mp3 conversion.

    Everybody who has experience in ffmpeg, please guide me. Thank you !

  • FFMPEG avformat_open_input returned error

    12 janvier 2019, par ProgrammingGivesMeHeadaches

    Sorry I have to ask this question, but I couldn’t find a reference to the return codes of avformat_open_input, and I couldn’t find anyone asking/answering about mine.

    After this call to the function

    err = avformat_open_input(&pFormatCtx, is->filename, NULL, NULL);

    I get err = -13. What does it mean, and if anybody answers, please also share how you know which code corresponds to which error.

    UPDATE :
    OK, I finally figured out how to turn the code into a message, and the message is "Permission denied". Does anyone have an idea where the problem with this might be ?

  • Unable to integrate ffmpeg as a native dependency for an Android NDK project

    28 février 2019, par mmark

    I have an Android NDK project which consists entirely of C/C++ code, and it basically processes images without using any external libraries.

    I’m using Android Studio + Gradle NDK Experimental plugin (0.7.0-alpha1).

    Now, I need to integrate ffmpeg as a native library to use it from the C/C++ code in order to decode a H.264 video frame.

    These are the questions I’ve found here regarding this issue :

    Android - Integrating ffmpeg and android-ndk-r9c

    Android NDK w/ ffmpeg library - error running project

    Using FFmpeg native libraries with Android-NDK

    Can not build with prebuilt static libraries using gradle-experimental

    Here is my build.gradle file :

    apply plugin: 'com.android.model.application'

    def ffmpeg_path = file(project(':ffmpeg').projectDir).absolutePath + "/ffmpeg-android"

    model {

       repositories {
           libs(PrebuiltLibraries) {
               libavcodec {
                   headers.srcDir "${ffmpeg_path}/include"
                   binaries.withType(StaticLibraryBinary) {
                       staticLibraryFile = file("${ffmpeg_path}/${targetPlatform.getName()}/lib/libavcodec.a")
                   }
               }
               libavutil {
                   headers.srcDir "${ffmpeg_path}/include"
                   binaries.withType(StaticLibraryBinary) {
                       staticLibraryFile = file("${ffmpeg_path}/${targetPlatform.getName()}/lib/libavutil.a")
                   }
               }
               libswresample {
                   headers.srcDir "${ffmpeg_path}/include"
                   binaries.withType(StaticLibraryBinary) {
                       staticLibraryFile = file("${ffmpeg_path}/${targetPlatform.getName()}/lib/libswresample.a")
                   }
               }
               libswscale {
                   headers.srcDir "${ffmpeg_path}/include"
                   binaries.withType(StaticLibraryBinary) {
                       staticLibraryFile = file("${ffmpeg_path}/${targetPlatform.getName()}/lib/libswscale.a")
                   }
               }
               libavformat {
                   headers.srcDir "${ffmpeg_path}/include"
                   binaries.withType(StaticLibraryBinary) {
                       staticLibraryFile = file("${ffmpeg_path}/${targetPlatform.getName()}/lib/libavformat.a")
                   }
               }
               libavdevice {
                   headers.srcDir "${ffmpeg_path}/include"
                   binaries.withType(StaticLibraryBinary) {
                       staticLibraryFile = file("${ffmpeg_path}/${targetPlatform.getName()}/lib/libavdevice.a")
                   }
               }
               libavfilter {
                   headers.srcDir "${ffmpeg_path}/include"
                   binaries.withType(StaticLibraryBinary) {
                       staticLibraryFile = file("${ffmpeg_path}/${targetPlatform.getName()}/lib/libavfilter.a")
                   }
               }
               libpostproc {
                   headers.srcDir "${ffmpeg_path}/include"
                   binaries.withType(StaticLibraryBinary) {
                       staticLibraryFile = file("${ffmpeg_path}/${targetPlatform.getName()}/lib/libpostproc.a")
                   }
               }
           }
       }

       android {
           compileSdkVersion = 23
           buildToolsVersion = "23.0.2"

           defaultConfig.with {
               applicationId = "com.example.hellojni"
               minSdkVersion.apiLevel = 4
               targetSdkVersion.apiLevel = 23
           }
       }

       /*
        * native build settings
        */
       android.ndk {
           moduleName = "hello-jni"
           platformVersion = 9 //same as minSdkVersion.apiLevel for better compatibility
           stl    = "c++_static"
           abiFilters.addAll(["armeabi", "armeabi-v7a", "x86"]) //filtering ABIs on the ones Google Play Games library is compatible with.
       }
       android.buildTypes {
           release {
               minifyEnabled = false
               proguardFiles.add(file('proguard-rules.txt'))
           }
       }

       android.sources {
           main {
               jni {
                   dependencies {
                       library "libavcodec" linkage "static"
                       library "libavutil" linkage "static"
                       library "libswresample" linkage "static"
                       library "libswscale" linkage "static"
                       library "libavformat" linkage "static"
                       library "libavdevice" linkage "static"
                       library "libavfilter" linkage "static"
                       library "libpostproc" linkage "static"
                   }
               }
           }
       }

    }

    I based on this sample from Google which integrates an external native library.

    This is the ffmpeg project I compiled before importing it into mine :
    https://github.com/WritingMinds/ffmpeg-android

    I’ve added all the .a and .h files and I’m able to import the headers in my C/C++ code, but when I try to compile it I get the following error :

    /Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(utils.o):utils.c:function try_decode_frame: error: undefined reference to 'avpriv_h264_has_num_reorder_frames'
    /Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(utils.o):utils.c:function compute_pkt_fields: error: undefined reference to 'avpriv_h264_has_num_reorder_frames'
    /Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(utils.o):utils.c:function parse_packet: error: undefined reference to 'av_parser_parse2'
    /Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(utils.o):utils.c:function parse_packet: error: undefined reference to 'av_parser_close'
    /Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(utils.o):utils.c:function read_frame_internal: error: undefined reference to 'av_parser_init'
    /Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(utils.o):utils.c:function avformat_find_stream_info: error: undefined reference to 'av_parser_init'
    /Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(utils.o):utils.c:function avformat_find_stream_info: error: undefined reference to 'avcodec_pix_fmt_to_codec_tag'
    /Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(utils.o):utils.c:function avformat_find_stream_info: error: undefined reference to 'avpriv_get_raw_pix_fmt_tags'
    /Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(utils.o):utils.c:function ff_stream_add_bitstream_filter: error: undefined reference to 'av_bitstream_filter_init'
    /Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(utils.o):utils.c:function ff_stream_add_bitstream_filter: error: undefined reference to 'av_bitstream_filter_close'
    /Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(utils.o):utils.c:function av_apply_bitstream_filters: error: undefined reference to 'av_bitstream_filter_filter'
    /Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(aadec.o):aadec.c:function aa_read_packet: error: undefined reference to 'av_tea_init'
    /Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(aadec.o):aadec.c:function aa_read_packet: error: undefined reference to 'av_tea_crypt'
    /Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(aadec.o):aadec.c:function aa_read_header: error: undefined reference to 'av_tea_alloc'
    /Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(aadec.o):aadec.c:function aa_read_header: error: undefined reference to 'av_tea_init'
    /Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(aadec.o):aadec.c:function aa_read_header: error: undefined reference to 'av_tea_crypt'
    /Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(ac3dec.o):ac3dec.c:function ac3_eac3_probe.isra.0: error: undefined reference to 'avpriv_ac3_parse_header'
    /Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(adtsenc.o):adtsenc.c:function adts_write_header: error: undefined reference to 'avpriv_mpeg4audio_get_config'
    /Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(adtsenc.o):adtsenc.c:function adts_write_header: error: undefined reference to 'avpriv_copy_pce_data'
    /Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(asfcrypt.o):asfcrypt.c:function ff_asfcrypt_dec: error: undefined reference to 'av_rc4_alloc'
    /Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(asfcrypt.o):asfcrypt.c:function ff_asfcrypt_dec: error: undefined reference to 'av_rc4_init'
    /Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(asfcrypt.o):asfcrypt.c:function ff_asfcrypt_dec: error: undefined reference to 'av_rc4_crypt'
    /Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(asfcrypt.o):asfcrypt.c:function ff_asfcrypt_dec: error: undefined reference to 'av_rc4_init'
    /Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(asfcrypt.o):asfcrypt.c:function ff_asfcrypt_dec: error: undefined reference to 'av_rc4_crypt'
    /Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(matroska.o):matroska.c:function ff_mkv_stereo3d_conv: error: undefined reference to 'av_stereo3d_alloc'
    /Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(nut.o):nut.c:function ff_nut_add_sp: error: undefined reference to 'av_tree_node_alloc'
    /Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(nut.o):nut.c:function ff_nut_add_sp: error: undefined reference to 'av_tree_insert'
    /Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(nut.o):nut.c:function ff_nut_free_sp: error: undefined reference to 'av_tree_enumerate'
    /Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(nut.o):nut.c:function ff_nut_free_sp: error: undefined reference to 'av_tree_destroy'
    Error:error: ld returned 1 exit status
    Error:Execution failed for task ':app:linkHello-jniArmeabi-v7aDebugSharedLibrary'.
    > A build operation failed.
         Linker failed while linking libhello-jni.so.
     See the complete log at: file:///Users/marcos/Documents/Android/fdecoder/app/build/tmp/linkHello-jniArmeabi-v7aDebugSharedLibrary/output.txt
    Information:BUILD FAILED
    Information:Total time: 14.993 secs
    Information:2 errors
    Information:0 warnings
    Information:See complete output in console

    There’s obviously something I’m not importing properly, but can’t figure exactly what’s missing.