
Recherche avancée
Autres articles (72)
-
Organiser par catégorie
17 mai 2013, parDans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...) -
Récupération d’informations sur le site maître à l’installation d’une instance
26 novembre 2010, parUtilité
Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...) -
Le plugin : Podcasts.
14 juillet 2010, parLe problème du podcasting est à nouveau un problème révélateur de la normalisation des transports de données sur Internet.
Deux formats intéressants existent : Celui développé par Apple, très axé sur l’utilisation d’iTunes dont la SPEC est ici ; Le format "Media RSS Module" qui est plus "libre" notamment soutenu par Yahoo et le logiciel Miro ;
Types de fichiers supportés dans les flux
Le format d’Apple n’autorise que les formats suivants dans ses flux : .mp3 audio/mpeg .m4a audio/x-m4a .mp4 (...)
Sur d’autres sites (2829)
-
How to configure FFMPEG to generate position independent code on IOS
8 juillet 2013, par madadiI am developing an app on iOS which makes use of FFMPEG for video decoding. I want to get 'position independent code' of FFMPEG working on my app.
--enable-pic
option in the FFMPEG configuration generates position independent code only if I set--disable-asm
. I concluded this when I ran the otool on my app(otool -hv 'appname'
). Below are the details :If I set
--enable-pic
alone, below is the output with otool :magic cputype cpusubtype caps filetype ncmds sizeofcmds flags
MH_MAGIC ARM V7 0x00 EXECUTE 29 3724 NOUNDEFS DYLDLINK TWOLEVEL WEAK_DEFINES BINDS_TO_WEAKIf I set
--enable-pic
and--disable-asm
below is the output with otool,magic cputype cpusubtype caps filetype ncmds sizeofcmds flags
MH_MAGIC ARM V7 0x00 EXECUTE 51 5520 NOUNDEFS DYLDLINK TWOLEVEL WEAK_DEFINES BINDS_TO_WEAK **PIE**Below are my configuration settings for FFMPEG(build-ffmpeg-ios.sh) :
if [ `uname` = "Darwin" ]; then
SEDCMD="sed -i '' "
else
SEDCMD="sed -i "
fi
make clean
./configure \
--prefix=$PREFIX \
--enable-version3 \
--enable-static \
--disable-shared \
--disable-doc \
--disable-ffmpeg \
--disable-ffplay \
--disable-ffprobe \
--disable-ffserver \
--disable-avdevice \
--disable-avfilter \
--disable-postproc \
--enable-small \
--cross-prefix="$DEVROOT/usr/bin/" \
--enable-cross-compile \
--target-os=darwin \
--arch=$ARCH \
--cpu=$CPU \
--cc="$CC" \
--as="$AS" \
--extra-cflags="$CFLAGS" \
--extra-ldflags="$CFLAGS" \
--disable-symver \
--disable-debug \
--disable-indevs \
--disable-encoders \
--disable-bsfs \
--enable-pic \
--disable-filters \
$CONFIGURE_FLAGS || exit 1;
$SEDCMD 's/HAVE_INLINE_ASM 1/HAVE_INLINE_ASM 0/g' config.h
make install || exit 1;And below is the make file I use(iOS.mk) :
FFMPEG_LIBS := libavcodec.a libavformat.a libavutil.a libswscale.a
IOS_ARMV7_FFMPEG_LIB := $(addprefix build/ios/armv7/lib/, $(FFMPEG_LIBS))
IOS_UNI_FFMPEG_LIB := $(addprefix build/ios/universal/lib/, $(FFMPEG_LIBS))
IPHONE_SDK_VERSION := "5.0"
IPHONE_DEPLOY_SDK := "3.2"
ALL_IOS_LIBS := $(IOS_UNI_FFMPEG_LIB)
build/ios/universal/lib/%.a : build/ios/armv7/lib/%.a
mkdir -p build/ios/universal/lib
lipo -create -output $@ $^
$(IOS_ARMV7_FFMPEG_LIB):
export PREFIX="`$(ABSPATH) build/ios/armv7`" && \
export ARCH="arm" && \
export CPU="cortex-a8" && \
export IOS_BASE_SDK="$(IPHONE_SDK_VERSION)" && \
export IOS_DEPLOY_TGT="$(IPHONE_DEPLOY_SDK)" && \
export CONFIGURE_FLAGS="--enable-neon" && \
export PATH="`$(ABSPATH) venders`:$$PATH" && \
cd venders/ffmpeg && bash ../iphone-compile.sh arm7 ../build-ffmpeg-ios.shCan someone please help me with getting the FFMPEG up and running with both 'pic' and assembly optimization enabled. Without assembly optimizastion, FFMPEG would not be helpful to me as the video decoding is extremely slow.
-
Why does fluent-ffmpeg only work when it throws the error Output stream closed
29 mars 2024, par volume oneI am using fluent-ffmpeg to process a video file (and then upload that to Amazon S3). The code is very straightforward but it only works if :


- 

- pipe option
{end: true}
is set in.output()
- which has a side-effect that causes the following console log output








Processing : 19.261847354642416% done Processing :
32.365144874807335% done Processing : 48.80978326261429% done Processing : 78.35771917058617%
Processing : 91.49377493455148% done Processing :
99.91264359125745% done An error occurred : Output stream closed




Despite that error, it seems the file is generated correctly and it gets uploaded to Amazon S3 fine.


This is the fluent-ffmpeg code :


import {PassThrough} from 'node:stream';
import FFMpeg from 'fluent-ffmpeg';

let PassThroughStream = new PassThrough();

 FFMpeg('/testvideo.mp4')
 .videoCodec('libx264')
 .audioCodec('libmp3lame')
 .size(`640x480`)
 // Stream output requires manually specifying output formats
 .format('mp4')
 .outputOptions('-movflags dash')
 .on('progress', function (progress) {
 console.log('Processing: ' + progress.percent + '% done');
 })
 .on('error', function (err) {
 console.log('An error occurred: ' + err.message);
 })
 .on('end', function () {
 console.log('FFMpeg Processing finished!');
 })
 .output(PassThroughStream, {end: true})
 .run();

 // Now upload to S3
 try {
 await s3Upload({
 AWSS3Client: 'mys3client',
 Bucket: 'publicbucket,
 ACL: "public-read",
 ContentType: 'video/mp4',
 Key: 'whoever/whatever.mp4',
 Body: PassThroughStream
 });
 } catch (error) {
 console.log(`s3Upload error`, error)
 }



If I set the pipe
output()
option to{end: false}
then there is no error from fluent-ffmpeg and I get"Processing: 100% done FFMpeg Processing finished!"
as the final console log.

BUT the problem is that the
s3Upload()
does not do anything. There are no errors. Just no activity.

I feel very uncomfortable letting
fluent-ffmpeg
end in an error even if the code itself does the job intended. It will also cause testing to fail. What could be the issue ?

The command line code is :
ffmpeg -i https:/xxxbucket.s3.amazonaws.com/14555/file-example.mp4 -acodec libmp3lame -vcodec libx264 -filter:v scale=w=trunc(oh*a/2)*2:h=480 -f mp4 -movflags dash pipe:1


- pipe option
-
Continously running a PHP script waiting for videos to trancode
12 mai 2017, par IanI’m making a transcoding server which uses FFMPEG to convert videos to flv. After user uploads a video it’s queued for processing in amazon Simple Queue Service. System is linux ubuntu.
Instead of running CRON each 1min I wonder if it would be possible to continously run several PHP scripts (dowload queued files, process downloaded etc). Each of them would have its own queue which would be read every 10s or so looking for new tasks.
My question is :
How to detect if the script is already running ? I’d run CRON each 1min and if one of the programs would not be running I’d load it again. How stuff like that is done on linux ? PID files ?
thanks for help,
ian