
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)
-
Recording a webpage stream with multiple requests using PhantomJS & ffmpeg to /dev/stdout leads to ffmpeg error
2 septembre 2016, par Allisson FerreiraFirst of all, sorry for my english.
I’m in a quest for days. I’ve researched everywhere and I couldn’t find an answer to my problem.
I’m using Nodejs, Phantomjs and ffmpeg in this scenary :
- An user enters the site, login with facebook and he can ask for a video with his name and some random photos (gathered by /me/ & sent via JSON POST) ;
- Node receive the user data, creates a child process (PhantomJS + ffmpeg) and awaits for a response to send the video URL to the user.
When I run a single instance of this request, everything is working fine. BUT, when two or more users make the request, only one video is sent and the others process end up in a ffmpeg stream error.
I think the reason is that all the ffmpeg processes are using the same place (/dev/stdout). Since one process is already using it, the others enters in a "can’t access" error. But it is a assumption, I don’t know how /dev/stdout really works.
Here are my codes. (I have removed some lines and renamed some variables for better understanding, sorry for any mistake)
index.js :
var generateVideo = 'phantomjs phantom.js '+videoID+' '+userID+' | ffmpeg -vcodec png -f image2pipe -r 30 -i - -pix_fmt yuv420p public/videos/'+userID+'/'+videoID+'.mp4 -y';
childProcess.exec(generateVideo, function(err, stdout, stderr) {
var json = {};
json.video = '/videos/'+userID+'/'+videoID+'.mp4';
res.send(json);
});phantom.js :
var page = require('webpage').create();
page.viewportSize = { width: 1366, height: 768 };
page.settings.resourceTimeout = 10000;
var args = require('system').args;
var videoID = args[1];
var userID = args[2];
page.open('http://localhost:3000/recordvideo/'+videoID, 'post', function(status){
var frame = 0;
var target_fps = 30;
var maxframes = page.evaluate(function () {
return getTotalDurationInSeconds();
}) * target_fps;
setInterval(function(){
page.render('/dev/stdout', { format: "png" });
if( frame >= maxframes ){
phantom.exit();
}
frame++;
}, (1000 / target_fps));
});And the error :
[Error: Command failed: /bin/sh -c phantomjs phantom.js XXXXXXXX XXXXXXXX | ffmpeg -vcodec png -f image2pipe -r 30 -i - -pix_fmt yuv420p public/videos/XXXXXXXX/XXXXXXXX.mp4 -y
www-0 ffmpeg version N-80901-gfebc862 Copyright (c) 2000-2016 the FFmpeg developers
www-0 built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.3)
www-0 configuration: --extra-libs=-ldl --prefix=/opt/ffmpeg --mandir=/usr/share/man --enable-avresample --disable-debug --enable-nonfree --enable-gpl --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --disable-decoder=amrnb --disable-decoder=amrwb --enable-libpulse --enable-libfreetype --enable-gnutls --enable-libx264 --enable-libx265 --enable-libfdk-aac --enable-libvorbis --enable-libmp3lame --enable-libopus --enable-libvpx --enable-libspeex --enable-libass --enable-avisynth --enable-libsoxr --enable-libxvid --enable-libvidstab
www-0 libavutil 55. 28.100 / 55. 28.100
www-0 libavcodec 57. 48.101 / 57. 48.101
www-0 libavformat 57. 41.100 / 57. 41.100
www-0 libavdevice 57. 0.102 / 57. 0.102
www-0 libavfilter 6. 47.100 / 6. 47.100
www-0 libavresample 3. 0. 0 / 3. 0. 0
www-0 libswscale 4. 1.100 / 4. 1.100
www-0 libswresample 2. 1.100 / 2. 1.100
www-0 libpostproc 54. 0.100 / 54. 0.100
www-0 [png @ 0x3d7c4a0] Invalid PNG signature 0x46726F6D20506861.
www-0 [image2pipe @ 0x3d72780] decoding for stream 0 failed
www-0 [image2pipe @ 0x3d72780] Could not find codec parameters for stream 0 (Video: png, none(pc)): unspecified size
www-0 Consider increasing the value for the 'analyzeduration' and 'probesize' options
www-0 Input #0, image2pipe, from 'pipe:':
www-0 Duration: N/A, bitrate: N/A
www-0 Stream #0:0: Video: png, none(pc), 30 tbr, 30 tbn, 30 tbc
www-0 [buffer @ 0x3d81540] Unable to parse option value "0x0" as image size
www-0 [buffer @ 0x3d81540] Unable to parse option value "-1" as pixel format
www-0 [buffer @ 0x3d81540] Unable to parse option value "0x0" as image size
www-0 [buffer @ 0x3d81540] Error setting option video_size to value 0x0.
www-0 [graph 0 input from stream 0:0 @ 0x3d72600] Error applying options to the filter.
www-0 Error opening filters!
www-0 ]I really hope that I can find an answer here !
And sorry if there already is an answer for this. But I researched for days.Thank you in advance !
-
Why ffmpeg rotates video ?
15 septembre 2016, par hasanghaforianI use this code in a
bash script
to createGIF
images from video files :ffmpeg -y -ss 3 -t 4 -i $vid \
-vf fps=10,scale=320:-1:flags=lanczos,palettegen palette.png
ffmpeg -ss 3 -t 4 -i $vid -i palette.png -filter_complex \
"fps=10,scale=320:-1:flags=lanczos[x];[x][1:v]paletteuse" ../gifs/"$i".gifBut some GIF images are rotated ! While their thumbnails which is created by OS is not rotated. How I can solve this problem ?
Update :
Here you can see outputs of commands :
Generating palette :
ffmpeg version N-79139-gde1a0d4 Copyright (c) 2000-2016 the FFmpeg developers
...
Input #0,
...
Metadata:
rotate : 90
creation_time : ...
handler_name : VideoHandle
encoder :
Side data:
displaymatrix: rotation of -90.00 degrees
...Creating GIF using the palette :
Input #0,
...
Metadata:
rotate : 90
creation_time : 2012-01-01 07:47:56
handler_name : VideoHandle
encoder :
Side data:
displaymatrix: rotation of -90.00 degrees
... -
Convert swf to mp4
28 septembre 2016, par Aleksey KontsevichThis answer had not helped : Convert compressed swf to mp4, trying to convert swf file.
ffmpeg output :
$ ffmpeg -i GTDS_demo_new.swf GTDS_demo_new.mp4
ffmpeg version 2.8.6-1ubuntu2 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 5.3.1 (Ubuntu 5.3.1-11ubuntu1) 20160311
configuration: --prefix=/usr --extra-version=1ubuntu2 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
WARNING: library configuration mismatch
avcodec configuration: --prefix=/usr --extra-version=1ubuntu2 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv --enable-version3 --disable-doc --disable-programs --disable-avdevice --disable-avfilter --disable-avformat --disable-avresample --disable-postproc --disable-swscale --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libvo_aacenc --enable-libvo_amrwbenc
libavutil 54. 31.100 / 54. 31.100
libavcodec 56. 60.100 / 56. 60.100
libavformat 56. 40.101 / 56. 40.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 40.101 / 5. 40.101
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 2.101 / 1. 2.101
libpostproc 53. 3.100 / 53. 3.100
[swf @ 0x21cd1e0] Could not find codec parameters for stream 1 (Video: none, none): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, swf, from 'GTDS_demo_new.swf':
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0: Audio: mp3, 44100 Hz, mono, s16p, 64 kb/s
Stream #0:1: Video: none, none, 12 fps, 12 tbr, 12 tbn
File 'GTDS_demo_new.mp4' already exists. Overwrite ? [y/N] y
No decoder for stream #0:1, filtering impossible
Error opening filters!Splitting with dump-gnash also does not help : get sound without video after ffmpeg (this answer : http://stackoverflow.com/a/21023110/630169)