
Recherche avancée
Autres articles (80)
-
Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs
12 avril 2011, parLa manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras. -
Personnaliser les catégories
21 juin 2013, parFormulaire de création d’une catégorie
Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
On peut modifier ce formulaire dans la partie :
Administration > Configuration des masques de formulaire.
Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...) -
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 (11157)
-
Compiling FFmpeg on OSX - "speex not found using pkg-config"
19 septembre 2016, par n4zArhI recently had few problems with FFmpeg and compiling it to get library. I managed to get through all of them, however recently I found out I need to add Speex decoder (and possibly encoder) to my project. I got Speex by sources,
./configure
andmake;make install
(later - as I had problems - I also used Brew to download Speex). I added--enable-libspeex
to my configure script and every time I try to use it I get "Speex not found using pkg-config
" error.I am sure that there’s Speex files at
/usr/local/include
andlib
directories, I also added those two as CFLAGS and LDFLAGS, I tried building Speex with or without using--prefix
(both pointing to/usr/
and/usr/local/
), I tried modifying FFmpeg’s configure file (require_pkg_config
with Speex call), but no matter what I try to do I fail to build it - every time with same error.Long story short - how to build FFmpeg with Speex decoder on OSX ? I read somewhere that libspeex-dev might be needed, but it’s available through apt-get and not Brew (unless I screwed something up).
My build script :
#!/bin/bash
if [ "$NDK" = "" ]; then
echo NDK variable not set, assuming ${HOME}/android-ndk
export NDK=${HOME}/Library/Android/sdk/ndk-bundle
fi
SYSROOT=$NDK/platforms/android-16/arch-arm
# Expand the prebuilt/* path into the correct one
TOOLCHAIN=`echo $NDK/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64`
export PATH=$TOOLCHAIN/bin:$PATH
rm -rf build/ffmpeg
mkdir -p build/ffmpeg
cd ffmpeg
# Don't build any neon version for now
for version in armv5te armv7a; do
DEST=../build/ffmpeg
FLAGS="--target-os=linux --cross-prefix=arm-linux-androideabi- --arch=arm"
FLAGS="$FLAGS --sysroot=$SYSROOT"
FLAGS="$FLAGS --enable-shared --disable-symver"
FLAGS="$FLAGS --enable-small"
FLAGS="$FLAGS --disable-everything"
FLAGS="$FLAGS --enable-decoder=h264 --enable-decoder=adpcm_ima_oki --enable-decoder=adpcm_ima_ws"
FLAGS="$FLAGS --enable-encoder=adpcm_ima_qt --enable-encoder=adpcm_ima_wav --enable-encoder=adpcm_g726"
FLAGS="$FLAGS --enable-encoder=adpcm_g722 --enable-libspeex"
case "$version" in
neon)
EXTRA_CFLAGS="-march=armv7-a -mfloat-abi=softfp -mfpu=neon"
EXTRA_LDFLAGS="-Wl,--fix-cortex-a8"
# Runtime choosing neon vs non-neon requires
# renamed files
ABI="armeabi-v7a"
;;
armv7a)
EXTRA_CFLAGS="-march=armv7-a -mfloat-abi=softfp"
EXTRA_LDFLAGS=""
ABI="armeabi-v7a"
;;
*)
EXTRA_CFLAGS=""
EXTRA_LDFLAGS=""
ABI="armeabi"
;;
esac
DEST="$DEST/$ABI"
FLAGS="$FLAGS --prefix=$DEST"
EXTRA_CFLAGS="$EXTRA_CFLAGS -I/usr/local/include/"
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -L/usr/local/lib"
PKT_CONFIG_PATH="/usr/lib/pkgconfig/"
mkdir -p $DEST
echo $FLAGS --extra-cflags="$EXTRA_CFLAGS" --extra-ldflags="$EXTRA_LDFLAGS" > $DEST/info.txt
./configure $FLAGS --extra-cflags="$EXTRA_CFLAGS" --extra-ldflags="$EXTRA_LDFLAGS" | tee $DEST/configuration.txt
[ $PIPESTATUS == 0 ] || exit 1
rm compat/strtod.o
rm compat/strtod.d
make clean
make -j4 || exit 1
make install || exit 1
doneTail of config.log :
BEGIN /tmp/ffconf.QcYgKHFW.c
1 #include
2 #include
3 float foo(complex float f, complex float g) { return cabs(f * I); }
4 int main(void){ return (int) foo; }
END /tmp/ffconf.QcYgKHFW.c
arm-linux-androideabi-gcc --sysroot=/Users/mgriszbacher/Library/Android/sdk/ndk-bundle/platforms/android-16/arch-arm -isysroot /Users/mgriszbacher/Library/Android/sdk/ndk-bundle/platforms/android-16/arch-arm -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Dstrtod=avpriv_strtod -DPIC -I/usr/local/include/ -march=armv5te -std=c99 -fomit-frame-pointer -fPIC -marm -pthread -c -o /tmp/ffconf.vfjjuG7b.o /tmp/ffconf.QcYgKHFW.c
/tmp/ffconf.QcYgKHFW.c:1:21: fatal error: complex.h: No such file or directory
#include
^
compilation terminated.
check_complexfunc cexp 1
check_ld cc
check_cc
BEGIN /tmp/ffconf.QcYgKHFW.c
1 #include
2 #include
3 float foo(complex float f, complex float g) { return cexp(f * I); }
4 int main(void){ return (int) foo; }
END /tmp/ffconf.QcYgKHFW.c
arm-linux-androideabi-gcc --sysroot=/Users/mgriszbacher/Library/Android/sdk/ndk-bundle/platforms/android-16/arch-arm -isysroot /Users/mgriszbacher/Library/Android/sdk/ndk-bundle/platforms/android-16/arch-arm -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Dstrtod=avpriv_strtod -DPIC -I/usr/local/include/ -march=armv5te -std=c99 -fomit-frame-pointer -fPIC -marm -pthread -c -o /tmp/ffconf.vfjjuG7b.o /tmp/ffconf.QcYgKHFW.c
/tmp/ffconf.QcYgKHFW.c:1:21: fatal error: complex.h: No such file or directory
#include
^
compilation terminated.
check_pkg_config speex speex/speex.h speex_decoder_init -lspeex
false --exists --print-errors speex
ERROR: speex not found using pkg-config -
Compile ffmpeg and x264 with —enable-shared
20 août 2016, par John AllardI am trying to compile ffmpeg with shared-library support, because when I compiled it statically it ended up making huge libraries, like
libavcodec.a
with 75MB in size. Any programs that I compiled againstlibavcodec
was at least 50MB in size. This only happens on my RaspberryPi though, if I dols -lsth $(which ffmpeg)
on my RPI3 I get
15M -rwxr-xr-x 1 pi pi 15M Jul 29 21:49 /home/pi/camiocam/cam/binaries/bin//ffmpeg
While if I do the same on my macbook I get this output
488 -r-xr-xr-x 1 john admin 242K Jul 26 19:34 /usr/local/Cellar/ffmpeg/3.1.1/bin/ffmpeg
To get shared library support I did the following
# download and install libx264
cd ~/ffmpeg_build
git clone git://git.videolan.org/x264.git
cd x264
PATH="$HOME/bin:$PATH" ./configure --host=arm-unknown-linux-gnueabi --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" --enable-shared --disable-opencl
# PATH="$HOME/bin:$PATH" make -j 8
# PATH="$HOME/bin:$PATH" make install
# ldconfigand ...
# to install ffmpeg
cd ~/ffmpeg_sources
wget http://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2
tar xjvf ffmpeg-snapshot.tar.bz2
cd ffmpeg
PATH="$HOME/bin:$PATH" PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure --prefix="$HOME/ffmpeg_build" --arch=armel --target-os=linux --extra-cflags="-I$HOME/ffmpeg_build/include" --enable-pic --extra-ldflags="-L$HOME/ffmpeg_build/lib" --bindir="$HOME/bin" --enable-gpl --enable-libx264 --enable-nonfree --enable-shared
PATH="$HOME/bin:$PATH" make -j 8Which gives this output
License: nonfree and unredistributable
Creating config.mak, config.h, and doc/config.texi...
config.h is unchanged
libavutil/avconfig.h is unchanged
libavcodec/bsf_list.c is unchanged
libavformat/protocol_list.c is unchanged
CC libavcodec/libx264.o
POD doc/ffprobe.pod
POD doc/ffmpeg-all.pod
POD doc/ffserver-all.pod
POD doc/ffmpeg.pod
POD doc/ffprobe-all.pod
POD doc/ffserver.pod
MAN doc/ffprobe.1
MAN doc/ffmpeg.1
MAN doc/ffserver.1
MAN doc/ffmpeg-all.1
MAN doc/ffprobe-all.1
MAN doc/ffserver-all.1
GEN libavcodec/libavcodec.ver
LD libavcodec/libavcodec.so.57
AR libavcodec/libavcodec.a
LD libavformat/libavformat.so.57
LD libavfilter/libavfilter.so.6
LD libavdevice/libavdevice.so.57
library.mak:102: recipe for target 'libavdevice/libavdevice.so.57' failed
make: *** [libavdevice/libavdevice.so.57] Killed
make: *** Deleting file 'libavdevice/libavdevice.so.57'I’ve tried to add the
--enable-pic
flag to the ffmpeg configure command but that made no difference. -
FFMPEG : Video file to YUV conversion by binary ffmpeg and by code C++ give different results
30 juin 2016, par Anny GDisclaimer : I have looked at the following question,
FFMPEG : RGB to YUV conversion by binary ffmpeg and by code C++ give different results
but it didn’t help and it is not applicable to me because I am not using SwsContext or anything.Following first few tutorials by http://dranger.com/ffmpeg/, I have created a simple program that reads a video, decodes it and then when the frame is decoded, it writes the raw yuv values to a file (no padding), using the data provided by AVFrame after we successfully decoded a frame. To be more specific, I write out arrays
AVFrame->data[0]
,AVFrame->data[1]
andAVFrame->data[2]
to a file, i.e. I simply append Y values, then U values, then V values to a file. The file turns out to be of yuv422p format.When I convert the same original video to a raw yuv format using the ffmpeg(same version of ffmpeg) command line tool, the two yuv files are the same in size, but differ in content.
FYI, I am able to play both of the yuv files using the yuv player, and they look identical as well.
Here is the exact command I run to convert the original video to a yuv video using ffmpeg command line tool
~/bin/ffmpeg -i super-short-video.h264 -c:v rawvideo -pix_fmt yuv422p "super-short-video-yuv422p.yuv"
What causes this difference in bytes and can it be fixed ? Is there perhaps another way of converting the original video to a yuv using the ffmpeg tool but maybe I need to use different settings ?
Ffmpeg output when I convert to a yuv format :
ffmpeg version N-80002-g5afecff Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.1)
configuration: --prefix=/home/me/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/home/me/ffmpeg_build/include --extra-ldflags=-L/home/me/ffmpeg_build/lib --bindir=/home/me/bin --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree --extra-cflags=-pg --extra-ldflags=-pg --disable-stripping
libavutil 55. 24.100 / 55. 24.100
libavcodec 57. 42.100 / 57. 42.100
libavformat 57. 36.100 / 57. 36.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 45.100 / 6. 45.100
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
Input #0, h264, from 'super-short-video.h264':
Duration: N/A, bitrate: N/A
Stream #0:0: Video: h264 (High), yuv420p, 1280x720, 25 fps, 25 tbr, 1200k tbn
[rawvideo @ 0x24f6fc0] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
Output #0, rawvideo, to 'super-short-video-yuv422p.yuv':
Metadata:
encoder : Lavf57.36.100
Stream #0:0: Video: rawvideo (Y42B / 0x42323459), yuv422p, 1280x720, q=2-31, 200 kb/s, 25 fps, 25 tbn
Metadata:
encoder : Lavc57.42.100 rawvideo
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> rawvideo (native))
Press [q] to stop, [?] for help
frame= 50 fps=0.0 q=-0.0 Lsize= 90000kB time=00:00:02.00 bitrate=368640.0kbits/s speed=11.3x
video:90000kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000000%