Recherche avancée

Médias (0)

Mot : - Tags -/auteurs

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (105)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

Sur d’autres sites (8870)

  • How to detect anamorphic video with FFProbe ?

    29 mai 2015, par FlavorScape

    This is the output I get using FFProbe for a video I’m certain is anamorphic. I’ve converted it as a test with ffmpeg and the results are consistent with the video having a different PAR and DAR (video is squished). I ran some command line params to fix anamorphic video and it worked. Possibly my diagnosis is incorrect, the PAR and DAR are just plain wrong ?

    The code I used to "correct" the anamamorphic is

    --custom-anamorphic --display-width 1280 --keep-display-aspect --modulus 8 --crop 0:0:0:0

    Is there an additional command with FFProbe to detect for anamorphic ? So far I’m just seeing if the sample_aspect_ratio and display_aspect_ratio are the same or not.

    Additionally, a ratio of 0:1 seems incorrect. My video is not infinitely wide. Is there a bug with FFProbe output ?

    This is the command

    -print_format json -show_format -show_streams {originalFilePath}

    FFProbe version N-54233-g86190af built on Jun 27 2013 outputs the following :

    "Output{
       \"streams\": [
           {
               \"index\": 0,
               \"codec_name\": \"h264\",
               \"codec_long_name\": \"H.264/AVC/MPEG-4AVC/MPEG-4part10\",
               \"profile\": \"Main\",
               \"codec_type\": \"video\",
               \"codec_time_base\": \"1/5994\",
               \"codec_tag_string\": \"avc1\",
               \"codec_tag\": \"0x31637661\",
               \"width\": 1280,
               \"height\": 720,
               \"has_b_frames\": 0,
               \"sample_aspect_ratio\": \"0: 1\",
               \"display_aspect_ratio\": \"0: 1\",
               \"pix_fmt\": \"yuv420p\",
               \"level\": 31,
               \"r_frame_rate\": \"2997/100\",
               \"avg_frame_rate\": \"2997/100\",
               \"time_base\": \"1/2997\",
               \"start_pts\": 0,
               \"start_time\": \"0.000000\",
               \"duration_ts\": 204100,
               \"duration\": \"68.101435\",
               \"bit_rate\": \"3894381\",
               \"nb_frames\": \"2041\",
               \"disposition\": {
                   \"default\": 0,
                   \"dub\": 0,
                   \"original\": 0,
                   \"comment\": 0,
                   \"lyrics\": 0,
                   \"karaoke\": 0,
                   \"forced\": 0,
                   \"hearing_impaired\": 0,
                   \"visual_impaired\": 0,
                   \"clean_effects\": 0,
                   \"attached_pic\": 0
               },
               \"tags\": {
                   \"creation_time\": \"2013-05-0318: 33: 37\",
                   \"language\": \"eng\",
                   \"handler_name\": \"AppleAliasDataHandler\"
               }
           },
           {
               \"index\": 1,
               \"codec_name\": \"aac\",
               \"codec_long_name\": \"AAC(AdvancedAudioCoding)\",
               \"codec_type\": \"audio\",
               \"codec_time_base\": \"1/44100\",
               \"codec_tag_string\": \"mp4a\",
               \"codec_tag\": \"0x6134706d\",
               \"sample_fmt\": \"fltp\",
               \"sample_rate\": \"44100\",
               \"channels\": 2,
               \"bits_per_sample\": 0,
               \"r_frame_rate\": \"0/0\",
               \"avg_frame_rate\": \"0/0\",
               \"time_base\": \"1/44100\",
               \"start_pts\": 0,
               \"start_time\": \"0.000000\",
               \"duration_ts\": 3003392,
               \"duration\": \"68.104127\",
               \"bit_rate\": \"125304\",
               \"nb_frames\": \"2933\",
               \"disposition\": {
                   \"default\": 0,
                   \"dub\": 0,
                   \"original\": 0,
                   \"comment\": 0,
                   \"lyrics\": 0,
                   \"karaoke\": 0,
                   \"forced\": 0,
                   \"hearing_impaired\": 0,
                   \"visual_impaired\": 0,
                   \"clean_effects\": 0,
                   \"attached_pic\": 0
               },
               \"tags\": {
                   \"creation_time\": \"2013-05-0318: 33: 37\",
                   \"language\": \"eng\",
                   \"handler_name\": \"AppleAliasDataHandler\"
               }
           }
       ],
       \"format\": {
           \"filename\": \"\\\\\\\\dell690\\\\vsf\\\\_asset_intake\\\\v2\\\\ed69c939-4fe1-40dd-a045-db72ed2e0009\\\\original\\\\USTC_Overview2.mov\",
           \"nb_streams\": 2,
           \"format_name\": \"mov,
           mp4,
           m4a,
           3gp,
           3g2,
           mj2\",
           \"format_long_name\": \"QuickTime/MOV\",
           \"start_time\": \"0.000000\",
           \"duration\": \"68.100000\",
           \"size\": \"34267583\",
           \"bit_rate\": \"4025560\",
           \"tags\": {
               \"major_brand\": \"qt\",
               \"minor_version\": \"537199360\",
               \"compatible_brands\": \"qt\",
               \"creation_time\": \"2013-05-0318: 33: 37\"
           }
       }
    }"
  • convert ffprobe -show_streams audio stream bitrate to kbps

    10 juillet 2014, par SethjBack

    For the purpose of converting a video, I am getting some basic information about the audio stream of the video file using ffprobe :

    ffprobe -v quiet -show_streams -select_streams a -of json ../intro.m4v

    This gives me a nice json output :

    "streams": [
           {
               "index": 1,
               "codec_name": "mp3",
               "codec_long_name": "MP3 (MPEG audio layer 3)",
               "codec_type": "audio",
               "codec_time_base": "1/44100",
               "codec_tag_string": "mp4a",
               "codec_tag": "0x6134706d",
               "sample_fmt": "s16p",
               "sample_rate": "44100",
               "channels": 2,
               "channel_layout": "stereo",
               "bits_per_sample": 0,
               "r_frame_rate": "0/0",
               "avg_frame_rate": "0/0",
               "time_base": "1/44100",
               "start_pts": 0,
               "start_time": "0.000000",
               "duration_ts": 8637696,
               "duration": "195.866122",
               "bit_rate": "302869",
               "nb_frames": "7498",
               "disposition": {
                   "default": 1,
                   "dub": 0,
                   "original": 0,
                   "comment": 0,
                   "lyrics": 0,
                   "karaoke": 0,
                   "forced": 0,
                   "hearing_impaired": 0,
                   "visual_impaired": 0,
                   "clean_effects": 0,
                   "attached_pic": 0
               }

    When converting the video, I only want to convert the audio stream if the bitrate is higher than my target (e.g. 96kbps).

    Given the output above, how do I make the audio bitrate comparison ? Can I convert the bit_rate number above into kbps ? Do I need more information to do the conversion ?

    Thank you for the help,

  • Integrating FFMPEG using cmake : undefined reference when linking libraries

    21 novembre 2018, par Hamed Momeni

    I’ve been trying to cross-compile ffmpeg for different Android cpu archs for couple of days now and I have finally succeeded in the task. But now that I need to integrate these pre-built .so files in my project I’m facing errors which have me baffled.

    This is the CMakeLists.txt which I’m using :

    cmake_minimum_required(VERSION 3.4.1)

    # convert SDK path to forward slashes on Windows
    file(TO_CMAKE_PATH ${PATH_TO_SUPERPOWERED} PATH_TO_SUPERPOWERED)

    set(CMAKE_VERBOSE_MAKEFILE on)

    include_directories(src/main/cpp)
    include_directories(${PATH_TO_SUPERPOWERED})
    include_directories(${PATH_TO_FFMPEG}/${ANDROID_ABI}/include)

    add_library(
           avutil
           SHARED
           ${PATH_TO_FFMPEG}/${ANDROID_ABI}/lib/libavutil.so
    )
    set_target_properties(avutil PROPERTIES LINKER_LANGUAGE CXX)

    add_library(
           avformat
           SHARED
           ${PATH_TO_FFMPEG}/${ANDROID_ABI}/lib/libavformat.so
    )
    set_target_properties(avformat PROPERTIES LINKER_LANGUAGE CXX)

    add_library(
           avcodec
           SHARED
           ${PATH_TO_FFMPEG}/${ANDROID_ABI}/lib/libavcodec.so
    )
    set_target_properties(avcodec PROPERTIES LINKER_LANGUAGE CXX)



    add_library(
           Canto
           SHARED
           src/main/cpp/Dubsmash.cpp
           src/main/cpp/Karaoke.cpp
           src/main/cpp/Singing.cpp
           src/main/cpp/EditDubsmash.cpp
           ${PATH_TO_SUPERPOWERED}/AndroidIO/SuperpoweredAndroidAudioIO.cpp
    )

    # link the native library against the following libraries
    target_link_libraries(
           Canto
           avutil
           avformat
           avcodec
           ${PATH_TO_SUPERPOWERED}/libSuperpoweredAndroid${ANDROID_ABI}.a
           OpenSLES
           log
           android
    )

    And this is the source of the file I’m getting errors on :

    #include
    #include <android></android>log.h>
    #include <string>
    // unrelated includes
    #include <libavformat></libavformat>avformat.h>
    #include <libavutil></libavutil>dict.h>

    #define log_write __android_log_write
    #define log_print __android_log_print

    // unrelated code parts

    int print_file_data(const char *filePath) {
       AVFormatContext *fmt_ctx = NULL;
       AVDictionaryEntry *tag = NULL;
       int ret;

       if ((ret = avformat_open_input(&amp;fmt_ctx, filePath, NULL, NULL)))
           return ret;

       while ((tag = av_dict_get(fmt_ctx->metadata, "", tag, AV_DICT_IGNORE_SUFFIX)))
           log_print(ANDROID_LOG_DEBUG, "%s=%s\n", tag->key, tag->value);

       avformat_close_input(&amp;fmt_ctx);
       return 0;
    }
    </string>

    And finally the errors themselves :

    FAILURE: Build failed with an exception.

    * What went wrong:
    Execution failed for task ':app:externalNativeBuildDebug'.
    > Build command failed.
     Error while executing process /home/hamed/dev/android-tools/android-sdk-linux/cmake/3.6.4111459/bin/cmake with arguments {--build /home/hamed/dev/projects/canto/Canto/app/.externalNativeBuild/cmake/debug/x86 --target Canto}
     [1/1] Linking CXX shared library ../../../../build/intermediates/cmake/debug/obj/x86/libCanto.so
     FAILED: : &amp;&amp; /home/hamed/dev/android-tools/android-sdk-linux/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++  --target=i686-none-linux-android16 --gcc-toolchain=/home/hamed/dev/android-tools/android-sdk-linux/ndk-bundle/toolchains/x86-4.9/prebuilt/linux-x86_64 --sysroot=/home/hamed/dev/android-tools/android-sdk-linux/ndk-bundle/sysroot -fPIC -isystem /home/hamed/dev/android-tools/android-sdk-linux/ndk-bundle/sysroot/usr/include/i686-linux-android -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -mstackrealign -Wa,--noexecstack -Wformat -Werror=format-security -std=c++11 -fsigned-char -I/home/hamed/dev/projects/canto/Canto/app/../Superpowered -I/home/hamed/dev/projects/canto/Canto/app/../ffmpeg -O0 -fno-limit-debug-info  -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libatomic.a -nostdlib++ --sysroot /home/hamed/dev/android-tools/android-sdk-linux/ndk-bundle/platforms/android-16/arch-x86 -Wl,--build-id -Wl,--warn-shared-textrel -Wl,--fatal-warnings -L/home/hamed/dev/android-tools/android-sdk-linux/ndk-bundle/sources/cxx-stl/llvm-libc++/libs/x86 -Wl,--no-undefined -Wl,-z,noexecstack -Qunused-arguments -Wl,-z,relro -Wl,-z,now -shared -Wl,-soname,libCanto.so -o ../../../../build/intermediates/cmake/debug/obj/x86/libCanto.so CMakeFiles/Canto.dir/src/main/cpp/Dubsmash.cpp.o CMakeFiles/Canto.dir/src/main/cpp/Karaoke.cpp.o CMakeFiles/Canto.dir/src/main/cpp/Singing.cpp.o CMakeFiles/Canto.dir/src/main/cpp/EditDubsmash.cpp.o CMakeFiles/Canto.dir/home/hamed/dev/projects/canto/Canto/Superpowered/AndroidIO/SuperpoweredAndroidAudioIO.cpp.o  ../../../../build/intermediates/cmake/debug/obj/x86/libavutil.so ../../../../build/intermediates/cmake/debug/obj/x86/libavformat.so ../../../../../Superpowered/libSuperpoweredAndroidx86.a -lOpenSLES -llog -landroid -latomic -lm "/home/hamed/dev/android-tools/android-sdk-linux/ndk-bundle/sources/cxx-stl/llvm-libc++/libs/x86/libc++_static.a" "/home/hamed/dev/android-tools/android-sdk-linux/ndk-bundle/sources/cxx-stl/llvm-libc++/libs/x86/libc++abi.a" "/home/hamed/dev/android-tools/android-sdk-linux/ndk-bundle/sources/cxx-stl/llvm-libc++/libs/x86/libandroid_support.a" &amp;&amp; :
     /home/hamed/dev/projects/canto/Canto/app/src/main/cpp/Dubsmash.cpp:295: error: undefined reference to 'avformat_open_input(AVFormatContext**, char const*, AVInputFormat*, AVDictionary**)'
     /home/hamed/dev/projects/canto/Canto/app/src/main/cpp/Dubsmash.cpp:298: error: undefined reference to 'av_dict_get(AVDictionary const*, char const*, AVDictionaryEntry const*, int)'
     /home/hamed/dev/projects/canto/Canto/app/src/main/cpp/Dubsmash.cpp:301: error: undefined reference to 'avformat_close_input(AVFormatContext**)'
     clang++: error: linker command failed with exit code 1 (use -v to see invocation)
     ninja: build stopped: subcommand failed.

    Obviously the linker can not find the needed libraries, but why ?!

    UPDATE
    This is the result of running nm on libavutil.so :

    0000000000000510 t atexit
    0000000000000500 t __atexit_handler_wrapper
    0000000000002008 A __bss_start
                    U __cxa_atexit
                    U __cxa_finalize
    0000000000002000 d __dso_handle
    0000000000001dd8 d _DYNAMIC
    0000000000002008 A _edata
    00000000000004e0 t __emutls_unregister_key
    0000000000002008 A _end
    00000000000005e8 r __FRAME_END__
    0000000000001fd8 d _GLOBAL_OFFSET_TABLE_
    0000000000000258 r ndk_build_number
    0000000000000218 r ndk_version
    0000000000000200 r note_android_ident
    0000000000000214 r note_data
    0000000000000298 r note_end
    000000000000020c r note_name
    00000000000004d0 t __on_dlclose
    00000000000004f0 t __on_dlclose_late

    and on libavformat :

    0000000000000520 t atexit
    0000000000000510 t __atexit_handler_wrapper
    0000000000002008 A __bss_start
                    U __cxa_atexit
                    U __cxa_finalize
    0000000000002000 d __dso_handle
    0000000000001dd8 d _DYNAMIC
    0000000000002008 A _edata
    00000000000004f0 t __emutls_unregister_key
    0000000000002008 A _end
    00000000000005f8 r __FRAME_END__
    0000000000001fd8 d _GLOBAL_OFFSET_TABLE_
    0000000000000258 r ndk_build_number
    0000000000000218 r ndk_version
    0000000000000200 r note_android_ident
    0000000000000214 r note_data
    0000000000000298 r note_end
    000000000000020c r note_name
    00000000000004e0 t __on_dlclose
    0000000000000500 t __on_dlclose_late

    UPDATE 2
    I applied @szatmary suggestion and finally managed to to build the apk file but upon reaching the System.loadLibrary call an exception occurs indicating that the linker can not find libavutil.so.56. I tried changing the address of the library in the cmake file to actually contain the version numbered lib file to no avail :

    java.lang.UnsatisfiedLinkError: dlopen failed: library "libavutil.so.56" not found
           at java.lang.Runtime.loadLibrary0(Runtime.java:1016)
           at java.lang.System.loadLibrary(System.java:1657)
           at com.hmomeni.canto.activities.EditActivity.<init>(EditActivity.kt:26)
           at java.lang.Class.newInstance(Native Method)
           at android.app.Instrumentation.newActivity(Instrumentation.java:1174)
           at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2669)
           at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856)
           at android.app.ActivityThread.-wrap11(Unknown Source:0)
           at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
           at android.os.Handler.dispatchMessage(Handler.java:106)
           at android.os.Looper.loop(Looper.java:164)
           at android.app.ActivityThread.main(ActivityThread.java:6494)
           at java.lang.reflect.Method.invoke(Native Method)
           at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
           at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
    </init>