Recherche avancée

Médias (91)

Autres articles (48)

  • Qu’est ce qu’un masque de formulaire

    13 juin 2013, par

    Un masque de formulaire consiste en la personnalisation du formulaire de mise en ligne des médias, rubriques, actualités, éditoriaux et liens vers des sites.
    Chaque formulaire de publication d’objet peut donc être personnalisé.
    Pour accéder à la personnalisation des champs de formulaires, il est nécessaire d’aller dans l’administration de votre MediaSPIP puis de sélectionner "Configuration des masques de formulaires".
    Sélectionnez ensuite le formulaire à modifier en cliquant sur sont type d’objet. (...)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 is the first MediaSPIP stable release.
    Its official release date is June 21, 2013 and is announced here.
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

Sur d’autres sites (4026)

  • Recording a webpage stream with multiple requests using PhantomJS & ffmpeg to /dev/stdout leads to ffmpeg error

    2 septembre 2016, par Allisson Ferreira

    First 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 hasanghaforian

    I use this code in a bash script to create GIF 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".gif

    But 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 Kontsevich

    This 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)