Recherche avancée

Médias (2)

Mot : - Tags -/documentation

Autres articles (28)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • Submit bugs and patches

    13 avril 2011

    Unfortunately a software is never perfect.
    If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
    If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
    You may also (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

Sur d’autres sites (3809)

  • wait for node server to start up in php

    22 février 2015, par Ortix92

    I have a php script which does the following :

    1. Start peerflix (node server)
    2. Get PID
    3. FFProbe* the server (http://127.0.0.1:8888)

    All of this is done in PHP but there is a slight issue. It seems that after having received the PID, the server is not fully initialized yet, or so it seems. The problem is that FFProbe cannot probe the server. In other words, it’s not accessible at the time of probing.

    What are some possibilities to probe the server when it is actually initialized ? I don’t want to use the arbitrary sleep() method because waiting for 2 seconds on a slow vagrant machine is now the same as waiting for 2 seconds on a blazing vast server.

    FFProbe throws an exception when it can’t probe the server. Perhaps use a try-catch and return back to the try if an exception is thrown ? How would I implement that ?

    *FFProbe is a companion of FFMpeg to get the information of a video file such as duration and codec.

  • FFMPEG mosaic/side-by-side-compositing from simultaneous DirectShow input devices

    9 juin 2013, par timlukins

    This is what I'm trying to do :

    ffmpeg.exe -y \
    -f dshow -i video="Microsoft LifeCam Cinema" \
    -f dshow -i video="Microsoft LifeCam VX-2000" \
    -filter_complex "[0:v]pad=iw*2:ih:0[left];[left][1:v]overlay=W/2.0[fileout]" \
    -map "[fileout]" -vcodec libx264 -f flv out.flv

    Basically, I have 2 webcams and I would like to combine them into a single video file in which the frames are 2x1 in size with the frame from one camera in the left and the other on the right.

    In other words, what might be termed "mosaic-ing" or "side-by-side compositing". This is not concatenation - i.e. one file after the other (so not using the concat filter).

    I've gleamed that this use of -filter_complex to pad and then position the frames appears the prescribed way. Indeed, when I test this with files like so :

    ffmpeg.exe -y -i test1.flv -i test2.flv -filter_complex "[0:v]pad=iw*2:ih:0[left];[left][1:v]overlay=W/2.0[fileout]" -map "[fileout]" -vcodec libx264 -f flv testout.flv

    It works fine !

    With the "live" version however, both cameras seem to start (their lights come on) but the capture stalls.

    (Suspiciously like there is some DirectShow deadlock on the separate input device threads...)

    And so, I wonder is there some way to overcome this and force the two input stream's data to merge ?

    I have also tried the extended format of the dshow filter option like so as well :

    -f dshow -i video="Microsoft LifeCam Cinema":video="Microsoft LifeCam VX-2000"

    But only one camera is then selected (I suspect this option is really only to enable separate video and audio streams to be combined).

    I've also tried explicitly setting each input device to have the exact same frame size and rate with -f dshow -video_size 640x480 -framerate 30. No joy though. It still stalls once the camera is listed.

    Here is the tail end of the output (with -v debug on) :

    Finished splitting the commandline.
    Parsing a group of options: global .
    Applying option y (overwrite output files) with argument 1.
    Applying option v (set libav* logging level) with argument debug.
    Applying option filter_complex (create a complex filtergraph) with argument [0:v]pad=iw*2:ih:0[left];[left][1:v]overlay=W/2.0[fileout].
    Successfully parsed a group of options.
    Parsing a group of options: input file video=Microsoft LifeCam Cinema.
    Applying option f (force format) with argument dshow.
    Successfully parsed a group of options.
    Opening an input file: video=Microsoft LifeCam Cinema.
    [dshow @ 00000000016e79a0] All info found
    [dshow @ 00000000016e79a0] Estimating duration from bitrate, this may be inaccurate
    Input #0, dshow, from 'video=Microsoft LifeCam Cinema':
     Duration: N/A, start: 1130406.072000, bitrate: N/A
       Stream #0:0, 1, 1/10000000: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 640x480, 333333/10000000, 30 tbr, 10000k tbn, 30 tbc
    Successfully opened the file.
    Parsing a group of options: input file video=Microsoft LifeCam VX-2000.
    Applying option f (force format) with argument dshow.
    Successfully parsed a group of options.
    Opening an input file: video=Microsoft LifeCam VX-2000.
    [dshow @ 00000000016e79a0] real-time buffer 101% full! frame dropped!

    EDIT Further details trying to fix within the code...*

    I've always understood from past Windows DirectShow work that multiple calls to CoInitialize() on the same thread is bad. See here. Perhaps I've misunderstood how FFMPEG is multi-threaded (i.e. if each input device is on it's own thread) but I thought to just try regulating the call with a guard variable (a static int com_init = 0; - this should probably be mutex-ed...).

    e.g. in libavdevice/dshow.c method dshow_read_header

    889    if (com_init==0)
    890     CoInitialize(0);
    891    com_init++

    And similar for dshow_read_close

    170    com_init--;
    171    if (com_init==0)
    172     CoUninitialize()

    Sadly, this doesn't work. The first camera starts but the second doesn't and the error is :

    [dshow @ 0000000000301760] Could not set video options
    video=Microsoft LifeCam VX-2000: Input/output error

    (Worth a shot. Looks like each input device is indeed on the same thread...)

  • How To Install FFMPEG on Elastic Beanstalk

    26 mars 2020, par Nick Lynch

    This is not a duplicate, I have found one thread, and it is outdated and does not work :
    Install ffmpeg on elastic beanstalk using ebextensions config.

    I have been trying to install this for some time, nothing seems to work.
    Please share the config.yml that will make this work.

    I am using 64bit Amazon Linux 2016.03 v2.1.6 running PHP 7.0 on Elastic Beanstalk


    My current file is

    branch-defaults:
     default:
       environment: Default-Environment
     master:
       environment: Default-Environment
    global:
     application_name: "My First Elastic Beanstalk Application"
     default_ec2_keyname: ~
     default_platform: "64bit Amazon Linux 2016.03 v2.1.6 running PHP 7.0"
     default_region: us-east-1
     profile: eb-cli
     sc: git
    packages: ~
    yum:
     ImageMagick: []
     ImageMagick-devel: []
     commands:
       01-wget:
         command: "wget -O /tmp/ffmpeg.tar.gz http://ffmpeg.gusari.org/static/64bit/ffmpeg.static.64bit.2014-03-05.tar.gz"
       02-mkdir:
         command: "if [ ! -d /opt/ffmpeg ] ; then mkdir -p /opt/ffmpeg; fi"
       03-tar:
         command: "tar -xzf ffmpeg.tar.gz -C /opt/ffmpeg"
         cwd: /tmp
       04-ln:
         command: "if [[ ! -f /usr/bin/ffmpeg ]] ; then ln -s /opt/ffmpeg/ffmpeg /usr/bin/ffmpeg; fi"
       05-ln:
         command: "if [[ ! -f /usr/bin/ffprobe ]] ; then ln -s /opt/ffmpeg/ffprobe /usr/bin/ffprobe; fi"
       06-pecl:
         command: "if [ `pecl list | grep imagick` ] ; then pecl install -f imagick; fi"