
Recherche avancée
Autres articles (75)
-
L’espace de configuration de MediaSPIP
29 novembre 2010, parL’espace de configuration de MediaSPIP est réservé aux administrateurs. Un lien de menu "administrer" est généralement affiché en haut de la page [1].
Il permet de configurer finement votre site.
La navigation de cet espace de configuration est divisé en trois parties : la configuration générale du site qui permet notamment de modifier : les informations principales concernant le site (...) -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...) -
Support audio et vidéo HTML5
10 avril 2011MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)
Sur d’autres sites (7433)
-
Unable to port FFmpeg C library into android
13 décembre 2017, par Navjot BediWhat I exactly want to-do : Access the ffmpeg.c file to modify the int main(int argc, char **argv) function to JNI and passing the command of ffmpeg as string.
I have tried to port ffmpeg C library to android(ARM processor). I followed following different ways to do this.
1st Try : using official ffmpeg installation documentation. Steps as follows
a) git clone git ://source.ffmpeg.org/ffmpeg.git ffmpeg
b) Read the INSTALL file.
c) Download x264 library and build by using build_x264.sh which build successfully.
NDK=/home/nav/Work/android/ndk
PREBUILT=$NDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt
PLATFORM=$NDK/platforms/android-8/arch-arm
PREFIX=/home/nav/28ffmpeg/android-ffmpeg
./configure --prefix=$PREFIX --enable-static --enable-pic --disable-asm --disable-cli --host=arm-linux --cross-prefix=$PREBUILT/linux-x86/bin/arm-linux-androideabi- --sysroot=$PLATFORM
make
sudo make install
sudo ldconfigd) Then I download ffmpeg library from (http://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2) build it by using build_android.sh
#!/bin/bash
NDK=/home/nav/Work/android/ndk
PLATFORM=$NDK/platforms/android-8/arch-arm
PREBUILT=$NDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86
PREFIX=/home/nav/28ffmpeg/android-ffmpeg
function build_one
{
./configure --target-os=linux --prefix=$PREFIX \
--enable-cross-compile \
--enable-runtime-cpudetect \
--disable-asm \
--arch=arm \
--cc=$PREBUILT/bin/arm-linux-androideabi-gcc \
--cross-prefix=$PREBUILT/bin/arm-linux-androideabi- \
--disable-stripping \
--nm=$PREBUILT/bin/arm-linux-androideabi-nm \
--sysroot=$PLATFORM \
--enable-nonfree \
--enable-version3 \
--disable-everything \
--enable-gpl \
--disable-doc \
--enable-avresample \
--enable-demuxer=rtsp \
--enable-muxer=rtsp \
--disable-ffplay \
--disable-ffserver \
--enable-ffmpeg \
--disable-ffprobe \
--enable-libx264 \
--enable-encoder=libx264 \
--enable-decoder=h264 \
--enable-protocol=rtp \
--enable-hwaccels \
--enable-zlib \
--disable-devices \
--disable-avdevice \
--extra-cflags="-I/home/android-ffmpeg/include -fPIC -DANDROID -D__thumb__ -mthumb -Wfatal-errors -Wno-deprecated -mfloat-abi=softfp -mfpu=vfpv3-d16 -marm -march=armv7-a" \
--extra-ldflags="-L/home/android-ffmpeg/lib"
make -j4 install
$PREBUILT/bin/arm-linux-androideabi-ar d libavcodec/libavcodec.a inverse.o
$PREBUILT/bin/arm-linux-androideabi-ld -rpath-link=$PLATFORM/usr/lib -L$PLATFORM/usr/lib -L$PREFIX/lib -soname libffmpeg.so -shared -nostdlib -z,noexecstack -Bsymbolic --whole-archive --no-undefined -o $PREFIX/libffmpeg.so libavcodec/libavcodec.a libavfilter/libavfilter.a libavresample/libavresample.a libavformat/libavformat.a libavutil/libavutil.a libswscale/libswscale.a -lc -lm -lz -ldl -llog -lx264 --warn-once --dynamic-linker=/system/bin/linker $PREBUILT/lib/gcc/arm-linux-androideabi/4.4.3/libgcc.a
}
build_onee) Initially it works perfectly. But after that error comes :
libavformat/libavformat.a(log2_tab.o):(.rodata+0x0): multiple definition of `ff_log2_tab'
libavcodec/libavcodec.a(log2_tab.o):(.rodata+0x0): first defined here
libavutil/libavutil.a(log2_tab.o):(.rodata+0x0): multiple definition of `ff_log2_tab'
libavcodec/libavcodec.a(log2_tab.o):(.rodata+0x0): first defined here
build_android.sh: 48: build_one: not foundResult : libffmpeg.so not found.
2nd Try : Then I follow steps in http://dl.dropbox.com/u/22605641/ffmpeg_android/main.html-> Builds
a) I downloaded Pre-Build libffmpeg.so from above link.
b) Add libffmpeg.so to libs/armeabi/ .
c) Make Android.mk
include $(CLEAR_VARS)
LOCAL_MODULE := ffmpeg
LOCAL_SRC_FILES := libffmpeg.so
include $(PREBUILT_SHARED_LIBRARY)
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := main
LOCAL_STATIC_LIBRARIES += ffmpeg
LOCAL_SRC_FILES := ffmpeg-test.c
include $(BUILD_SHARED_LIBRARY)d) Then I do all ndk set up and all.Copy ffmpeg.c from library to ffmpeg-test.c by changing its int main function to my JNI functin and include all necessary include files.
Error :
Console :
/home/nav/Work/android/ndk/ndk-build all
Prebuilt : libffmpeg.so <= jni/
Install : libffmpeg.so => libs/armeabi/libffmpeg.so
Compile thumb : main <= ffmpeg-test.c
jni/ffmpeg-test.c: In function 'print_report':
jni/ffmpeg-test.c:1139:94: warning: incompatible implicit declaration of built-in function 'log2' [enabled by default]
SharedLibrary : libmain.so
/home/nav/Work/android/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi/objs/main/ffmpeg-test.o: in function check_keyboard_interaction:jni/ffmpeg-test.c:2496: error: undefined reference to 'qp_hist'and many other undefined references.
-
ffmpeg for android, out of memory on encoding h264
15 juin 2018, par Rafael LimaI’m getting an weird error when enconding a video with ffmpeg on android
Failed to inject frame into filter network: Out of memory
Althoug is a pretty objective error, I do believe this is some "generic message" for another problem, because the video I used for testing is 17MB and less than 11 seconds length and I’ve sucessfully tested with videos bigger than 200MB and longer than 5min
This problem happens to
any videovertical videos recorded on my phone (the videos were recorded and play fine on my phone but i cant reencode them... other video h264 were encoded fine on same phone)this is ffmpeg output
ffmpeg version 4.0 Copyright (c) 2000-2018 the FFmpeg developers
built with Android (4691093 based on r316199) clang version 6.0.2 (https://android.googlesource.com/toolchain/clang 183abd29fc496f55536e7d904e0abae47888fc7f) (https://android.googlesource.com/toolchain/llvm 34361f192e41ed6e4e8f9aca80a4ea7e9856f327) (based on LLVM 6.0.2svn)
configuration: --prefix=/home/rafa/Desktop/m4/build --target-os=android --arch=i686 --cpu=i686 --cross-prefix=/home/rafa/Desktop/m4/ndk/toolchain/i686/bin/i686-linux-android- --enable-cross-compile --cc=/home/rafa/Desktop/m4/ndk/toolchain/i686/bin/clang --cxx=/home/rafa/Desktop/m4/ndk/toolchain/i686/bin/clang++ --pkg-config=/usr/bin/pkg-config --pkg-config-flags=--static --enable-pic --enable-gpl --enable-nonfree --enable-static --disable-shared --enable-ffmpeg --disable-ffplay --disable-ffprobe --disable-doc --disable-devices --enable-libx264 --enable-libfdk-aac --enable-bsf=aac_adtstoasc --disable-asm
libavutil 56. 14.100 / 56. 14.100
libavcodec 58. 18.100 / 58. 18.100
libavformat 58. 12.100 / 58. 12.100
libavdevice 58. 3.100 / 58. 3.100
libavfilter 7. 16.100 / 7. 16.100
libswscale 5. 1.100 / 5. 1.100
libswresample 3. 1.100 / 3. 1.100
libpostproc 55. 1.100 / 55. 1.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/data/data/com.tomatedigital.toolsforinstagram/qqq.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: isommp42
creation_time : 2018-06-09T04:28:55.000000Z
location : -08.0638-034.8723/
location-eng : -08.0638-034.8723/
com.android.version: 7.0
Duration: 00:00:09.06, start: 0.000000, bitrate: 17349 kb/s
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080, 17088 kb/s, SAR 1:1 DAR 16:9, 30.04 fps, 30 tbr, 90k tbn, 180k tbc (default)
Metadata:
rotate : 90
creation_time : 2018-06-09T04:28:55.000000Z
handler_name : VideoHandle
Side data:
displaymatrix: rotation of -90.00 degrees
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 255 kb/s (default)
Metadata:
creation_time : 2018-06-09T04:28:55.000000Z
handler_name : SoundHandle
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
Error reinitializing filters!
Failed to inject frame into filter network: Out of memory
Error while processing the decoded data for stream #0:0
Conversion failed!=====================UPDATE===================
I re-run the command with
-v 9 -loglevel 99
and got paste the log file at :If someone have real good expertise at ffmpeg i would apreciate very much the help
=====================UPDATE 2=================
I made more tests and the problem happens only when i record the video with my phone at vertical (other videos in vertical work and videos from my phone in horizontal also work)
==================UPDATE 3====================
I detected the problem happens to ANY video with theMetadata:
rotate : 90 (or any value)It was suggested to use
-noautorotate
as workaround and it WORKDED, but this implies in tons of other complications ex :-if i decide to apply any filter to the video, it will be applied to the horizontal version but the video will be played at vertical producing a totally different effect
ex : https://i.stack.imgur.com/R3jXJ.jpg (at this photo the drawtext filter should be placed at bottom line with horizontal text, but as ffmpeg can’t handle the orientation it is missplaced and rotated at runtime producing this vertical message)
-I checked and if I set
-metadata:s:v:0 rotate=
while enconding it has no effect ex :ffmpeg -i input.mp4 -c copy -metadata:s:v:0 rotate= output.mp4
will remove the rotate metadata and produce a non rotated videoBUT
ffmpeg -i input.mp4 -c:v libx264 -metadata:s:v:0 rotate= output.mp4
will keep the metadata and the produced video will be played rotated (this behavior was also noticed on the official ffmpeg 4.0 binaries for windows available at ffmpeg website)I’M STILL LOOKING FOR A BETTER SOLUTION, THANKS FOR THE HELP
-
ffmpeg for android, out of memory on encoding h264
15 juin 2018, par Rafael LimaI’m getting an weird error when enconding a video with ffmpeg on android
Failed to inject frame into filter network: Out of memory
Althoug is a pretty objective error, I do believe this is some "generic message" for another problem, because the video I used for testing is 17MB and less than 11 seconds length and I’ve sucessfully tested with videos bigger than 200MB and longer than 5min
This problem happens to
any videovertical videos recorded on my phone (the videos were recorded and play fine on my phone but i cant reencode them... other video h264 were encoded fine on same phone)this is ffmpeg output
ffmpeg version 4.0 Copyright (c) 2000-2018 the FFmpeg developers
built with Android (4691093 based on r316199) clang version 6.0.2 (https://android.googlesource.com/toolchain/clang 183abd29fc496f55536e7d904e0abae47888fc7f) (https://android.googlesource.com/toolchain/llvm 34361f192e41ed6e4e8f9aca80a4ea7e9856f327) (based on LLVM 6.0.2svn)
configuration: --prefix=/home/rafa/Desktop/m4/build --target-os=android --arch=i686 --cpu=i686 --cross-prefix=/home/rafa/Desktop/m4/ndk/toolchain/i686/bin/i686-linux-android- --enable-cross-compile --cc=/home/rafa/Desktop/m4/ndk/toolchain/i686/bin/clang --cxx=/home/rafa/Desktop/m4/ndk/toolchain/i686/bin/clang++ --pkg-config=/usr/bin/pkg-config --pkg-config-flags=--static --enable-pic --enable-gpl --enable-nonfree --enable-static --disable-shared --enable-ffmpeg --disable-ffplay --disable-ffprobe --disable-doc --disable-devices --enable-libx264 --enable-libfdk-aac --enable-bsf=aac_adtstoasc --disable-asm
libavutil 56. 14.100 / 56. 14.100
libavcodec 58. 18.100 / 58. 18.100
libavformat 58. 12.100 / 58. 12.100
libavdevice 58. 3.100 / 58. 3.100
libavfilter 7. 16.100 / 7. 16.100
libswscale 5. 1.100 / 5. 1.100
libswresample 3. 1.100 / 3. 1.100
libpostproc 55. 1.100 / 55. 1.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/data/data/com.tomatedigital.toolsforinstagram/qqq.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: isommp42
creation_time : 2018-06-09T04:28:55.000000Z
location : -08.0638-034.8723/
location-eng : -08.0638-034.8723/
com.android.version: 7.0
Duration: 00:00:09.06, start: 0.000000, bitrate: 17349 kb/s
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080, 17088 kb/s, SAR 1:1 DAR 16:9, 30.04 fps, 30 tbr, 90k tbn, 180k tbc (default)
Metadata:
rotate : 90
creation_time : 2018-06-09T04:28:55.000000Z
handler_name : VideoHandle
Side data:
displaymatrix: rotation of -90.00 degrees
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 255 kb/s (default)
Metadata:
creation_time : 2018-06-09T04:28:55.000000Z
handler_name : SoundHandle
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
Error reinitializing filters!
Failed to inject frame into filter network: Out of memory
Error while processing the decoded data for stream #0:0
Conversion failed!=====================UPDATE===================
I re-run the command with
-v 9 -loglevel 99
and got paste the log file at :If someone have real good expertise at ffmpeg i would apreciate very much the help
=====================UPDATE 2=================
I made more tests and the problem happens only when i record the video with my phone at vertical (other videos in vertical work and videos from my phone in horizontal also work)
==================UPDATE 3====================
I detected the problem happens to ANY video with theMetadata:
rotate : 90 (or any value)It was suggested to use
-noautorotate
as workaround and it WORKDED, but this implies in tons of other complications ex :-if i decide to apply any filter to the video, it will be applied to the horizontal version but the video will be played at vertical producing a totally different effect
ex : https://i.stack.imgur.com/R3jXJ.jpg (at this photo the drawtext filter should be placed at bottom line with horizontal text, but as ffmpeg can’t handle the orientation it is missplaced and rotated at runtime producing this vertical message)
-I checked and if I set
-metadata:s:v:0 rotate=
while enconding it has no effect ex :ffmpeg -i input.mp4 -c copy -metadata:s:v:0 rotate= output.mp4
will remove the rotate metadata and produce a non rotated videoBUT
ffmpeg -i input.mp4 -c:v libx264 -metadata:s:v:0 rotate= output.mp4
will keep the metadata and the produced video will be played rotated (this behavior was also noticed on the official ffmpeg 4.0 binaries for windows available at ffmpeg website)I’M STILL LOOKING FOR A BETTER SOLUTION, THANKS FOR THE HELP