Recherche avancée

Médias (91)

Autres articles (58)

  • Installation en mode ferme

    4 février 2011, par

    Le mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
    C’est la méthode que nous utilisons sur cette même plateforme.
    L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
    Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

  • Les statuts des instances de mutualisation

    13 mars 2010, par

    Pour des raisons de compatibilité générale du plugin de gestion de mutualisations avec les fonctions originales de SPIP, les statuts des instances sont les mêmes que pour tout autre objets (articles...), seuls leurs noms dans l’interface change quelque peu.
    Les différents statuts possibles sont : prepa (demandé) qui correspond à une instance demandée par un utilisateur. Si le site a déjà été créé par le passé, il est passé en mode désactivé. publie (validé) qui correspond à une instance validée par un (...)

Sur d’autres sites (4074)

  • Video cropping with FFMpeg on Android is very slow [duplicate]

    7 avril 2017, par Rami Jemli

    This question already has an answer here :

    What i tried :

    I am trying to implement video cropping on android using FFMpeg (ffmpeg-android).

    Here is the command I use :

    String[] complexCommand = {"-i", inputPath, "-strict", "experimental", "-vf", "crop=1080:1080:0:0", "-threads", "5", "-c:v", "libx264", "-preset", "ultrafast", filePath};

    The problem :

    Video cropping is working, but even though I am using all needed options to make the operation fast, it still takes a 1min long video the same duration to crop.

    How can I achieve better speeds ?
    Will I need to implement video cropping on server instead of device ?
    Is there another way to implement video cropping on Android instead of FFMpeg ?

    I understand that I can achieve better UX by letting the user edit a cropped TextureView/SurfaceView while doing the actual cropping in background, but I want to avoid this way as it takes more time.

    UPDATE

    Here is FFMpeg’s log output :

    SUCCESS with output : ffmpeg version n3.0.1 Copyright (c) 2000-2016 the FFmpeg developers
       built with gcc 4.8 (GCC)
       configuration: --target-os=linux --cross-prefix=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi- --arch=arm --cpu=cortex-a8 --enable-runtime-cpudetect --sysroot=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/sysroot --enable-pic --enable-libx264 --enable-libass --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-fontconfig --enable-pthreads --disable-debug --disable-ffserver --enable-version3 --enable-hardcoded-tables --disable-ffplay --disable-ffprobe --enable-gpl --enable-yasm --disable-doc --disable-shared --enable-static --pkg-config=/home/vagrant/SourceCode/ffmpeg-android/ffmpeg-pkg-config --prefix=/home/vagrant/SourceCode/ffmpeg-android/build/armeabi-v7a --extra-cflags='-I/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all' --extra-ldflags='-L/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/lib -Wl,-z,relro -Wl,-z,now -pie' --extra-libs='-lpng -lexpat -lm' --extra-cxxflags=
       libavutil      55. 17.103 / 55. 17.103
       libavcodec     57. 24.102 / 57. 24.102
       libavformat    57. 25.100 / 57. 25.100
       libavdevice    57.  0.101 / 57.  0.101
       libavfilter     6. 31.100 /  6. 31.100
       libswscale      4.  0.100 /  4.  0.100
       libswresample   2.  0.101 /  2.  0.101
       libpostproc    54.  0.100 / 54.  0.100
       Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/DCIM/100ANDRO/MOV_0066.mp4':
       Metadata:
       major_brand     : mp42
       minor_version   : 0
       compatible_brands: isommp42
       creation_time   : 2017-04-02 11:58:58
       com.android.version: 6.0.1
       Duration: 00:00:59.60, start: 0.000000, bitrate: 17759 kb/s
       Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080, 17498 kb/s, SAR 1:1 DAR 16:9, 29.90 fps, 29.92 tbr, 90k tbn, 180k tbc (default)
       Metadata:
       rotate          : 90
       creation_time   : 2017-04-02 11:58:58
       handler_name    : VideoHandle
       Side data:
       displaymatrix: rotation of -90.00 degrees
       Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 155 kb/s (default)
       Metadata:
       creation_time   : 2017-04-02 11:58:58
       handler_name    : SoundHandle
       [libx264 @ 0xb5bc4400] using SAR=1/1
       [libx264 @ 0xb5bc4400] using cpu capabilities: none!
       [libx264 @ 0xb5bc4400] profile High 4:4:4 Predictive, level 3.2, 4:2:0 8-bit
       [libx264 @ 0xb5bc4400] 64 - core 148 - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - http://www.videolan.org/x264.html - options: cabac=1 ref=1 deblock=1:0:0 analyse=0x1:0x1 me=dia subme=1 psy=0 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=0 chroma_qp_offset=0 threads=5 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=1 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc=cqp mbtree=0 qp=0
       Output #0, mp4, to '/storage/emulated/0/Download/compress_video1.mp4':
       Metadata:
       major_brand     : mp42
       minor_version   : 0
       compatible_brands: isommp42
       com.android.version: 6.0.1
       encoder         : Lavf57.25.100
       Stream #0:0(eng): Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 1080x1080 [SAR 1:1 DAR 1:1], q=-1--1, 29.92 fps, 11488 tbn, 29.92 tbc (default)
       Metadata:
       handler_name    : VideoHandle
       creation_time   : 2017-04-02 11:58:58
       encoder         : Lavc57.24.102 libx264
       Side data:
       unknown side data type 10 (24 bytes)
       Stream #0:1(eng): Audio: aac (LC) ([64][0][0][0] / 0x0040), 48000 Hz, stereo, fltp, 128 kb/s (default)
       Metadata:
       creation_time   : 2017-04-02 11:58:58
       handler_name    : SoundHandle
       encoder         : Lavc57.24.102 aac
       Stream mapping:
       Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
       Stream #0:1 -> #0:1 (aac (native) -> aac (native))
       Press [q] to stop, [?] for help
       frame=    6 fps=0.0 q

    Any help is greatly appreciated !

  • Android JNI x264 as a library give relocation R_ARM_MOVW_ABS_NC ; recompile with -fPIC

    25 juin 2014, par MoAdiB

    I’m trying to build x264 library to use it in a shared library that I load using jni on android. I’m able to build everything as an executable without any error but when I build as a shared library I get errors with dynamic relocation of R_ARM_MOVW_ABS_NC :

    [armeabi-v7a] SharedLibrary  : libx264.so
    /home/martin/bin/android-ndk/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld: error: /home/martin/Documents/Sources/ScreenSharingServer/app/src/main/obj/local/armeabi-v7a/objs/x264/common/arm/pixel-a.o: requires unsupported dynamic reloc R_ARM_MOVW_ABS_NC; recompile with -fPIC
    /home/martin/bin/android-ndk/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld: error: /home/martin/Documents/Sources/ScreenSharingServer/app/src/main/obj/local/armeabi-v7a/objs/x264/common/arm/mc-a.o: requires unsupported dynamic reloc R_ARM_MOVW_ABS_NC; recompile with -fPIC
    /home/martin/bin/android-ndk/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld: error: /home/martin/Documents/Sources/ScreenSharingServer/app/src/main/obj/local/armeabi-v7a/objs/x264/common/arm/dct-a.o: requires unsupported dynamic reloc R_ARM_MOVW_ABS_NC; recompile with -fPIC
    /home/martin/bin/android-ndk/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld: error: /home/martin/Documents/Sources/ScreenSharingServer/app/src/main/obj/local/armeabi-v7a/objs/x264/common/arm/quant-a.o: requires unsupported dynamic reloc R_ARM_MOVW_ABS_NC; recompile with -fPIC
    /home/martin/bin/android-ndk/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld: error: /home/martin/Documents/Sources/ScreenSharingServer/app/src/main/obj/local/armeabi-v7a/objs/x264/common/arm/predict-a.o: requires unsupported dynamic reloc R_ARM_MOVW_ABS_NC; recompile with -fPIC
    collect2: error: ld returned 1 exit status
    make: *** [/home/martin/Documents/Sources/ScreenSharingServer/app/src/main/obj/local/armeabi-v7a/libx264.so] Error 1

    Here is my android.mk :

    LOCAL_PATH := $(my-dir)

    include $(CLEAR_VARS)

    APP_ABI := armeabi armeabi-v7a
    TARGET_ARCH_ABI := armeabi-v7a
    LOCAL_ARM_NEON := true
    ARCH_ARM_HAVE_NEON := true

    AM_CFLAGS := -march=armv7-a -mfpu=neon
    AM_CCASFLAGS := -march=armv7-a -mfpu=neon

    LOCAL_SRC_FILES:= common/mc.c common/predict.c common/pixel.c common/macroblock.c \
          common/frame.c common/dct.c common/cpu.c common/cabac.c \
          common/common.c common/osdep.c common/rectangle.c \
          common/set.c common/quant.c common/deblock.c common/vlc.c \
          common/mvpred.c common/bitstream.c \
          encoder/analyse.c encoder/me.c encoder/ratecontrol.c \
          encoder/set.c encoder/macroblock.c encoder/cabac.c \
          encoder/cavlc.c encoder/encoder.c encoder/lookahead.c \
          common/threadpool.c \
          common/arm/mc-c.c common/arm/predict-c.c \
          x264.c \
          common/arm/cpu-a.S common/arm/pixel-a.S common/arm/mc-a.S \
          common/arm/dct-a.S common/arm/quant-a.S common/arm/deblock-a.S \
          common/arm/predict-a.S

    LOCAL_SHARED_LIBRARIES := libcutils
    LOCAL_STATIC_LIBRARIES := swscale

    LOCAL_C_INCLUDES := $(LOCAL_PATH) $(LOCAL_PATH)/..
    LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) $(LOCAL_PATH)/..

    LOCAL_CFLAGS := -fPIC -O3 -ffast-math -fstrict-aliasing -DANDROID -std=c99
    LOCAL_CPPFLAGS := -fPIC
    LOCAL_LDFLAGS := -lm
    LOCAL_MODULE := x264

    include $(BUILD_SHARED_LIBRARY)

    When I build with V=1 I see -fPIC option in every compilation line...

    I wonder if anybody can help me understand what I do wrong.

    Thanks for your time !

    Martin

  • Running several 'exec' in a ruby loop

    2 mars 2015, par Beertastic

    I’m scanning a folder for audio files and converting them to mp3.
    Works great in RUBY.
    However, once the first transcoding is done, it stops the whole loop

    Here’s a breakdown of my code process.

    def scanFolder
     # lots of code above to get folder list, check for incorrect files etc..
     audioFileList.each {
       |getFile|

       exec_command = "ffmpeg #{getFile} #{newFileName}"
       exec exec_command
     }
    end

    What’s happening is that it’s transcoding the first file it finds, then it stops the whole function. Is there a way to force it to continue ?

    The ffmpeg does run and finish correctly at the moment, so it’s not breaking anything