Recherche avancée

Médias (3)

Mot : - Tags -/spip

Autres articles (60)

  • 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 (...)

  • Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs

    12 avril 2011, par

    La 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.

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

Sur d’autres sites (7438)

  • How to take snapshot with multiple web cameras at the same time using PHP in Centos ?

    13 novembre 2014, par galengodis

    I’m trying to take still photos / snapshots with multiple web cameras at the same time through php / shell_execute.

    This is what I use so I can the cameras in the background.

    shell_exec('ffmpeg -f video4linux2 -s 1280x960 -i /dev/video0 -q:v 0 -b:v 10000k -vcodec mjpeg -vframes 1 /var/www/html/cam1.jpg -y > /dev/null 2>/dev/null &');

    shell_exec('ffmpeg -f video4linux2 -s 1280x960 -i /dev/video1 -q:v 0 -b:v 10000k -vcodec mjpeg -vframes 1 /var/www/html/cam2.jpg -y > /dev/null 2>/dev/null &');

    It outputs only one image from the cameras. If i run them one at a time with the same code everything works. Fyi the "&" at the end makes the php run in background. Read more here about shell_exec background process : Is there a way to use shell_exec without waiting for the command to complete ?

    > [root@localhost ~]# lsusb
    > Bus 001 Device 002: ID 8087:8000 Intel Corp.
    > Bus 002 Device 004: ID 1a40:0201 Terminus Technology Inc. FE 2.1
    > 7-port Hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root
    > hub Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus
    > 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 002
    > Device 006: ID 046d:0825 Logitech, Inc. Webcam C270 Bus 002 Device
    > 005: ID 0c45:6340 Microdia
    >
    > [root@localhost ~]# find /dev/bus/ /dev/bus/ /dev/bus/usb
    > /dev/bus/usb/003 /dev/bus/usb/003/001 /dev/bus/usb/002
    > /dev/bus/usb/002/006 /dev/bus/usb/002/005 /dev/bus/usb/002/004
    > /dev/bus/usb/002/001 /dev/bus/usb/001 /dev/bus/usb/001/002
    > /dev/bus/usb/001/001

    I’ve tried with altering applications between ffmpeg and streamer. So the problem seems to be USB-related. The both cameras are plugged into a USB-hub (with an external power supply). The cameras are of different brands.

    I’m on Centos 7, 64bit.

  • is this ffmpeg command optimized ?

    22 juin 2017, par Bob Ramsey

    I have a requirement to take a video, add some plain text, and then add some rotated text at different times, locations, and durations. I want to use processor power in the most efficient way this will run 20,000 times (yes, really, we’re personalizing a video for students at a U.)This is what I finally came up with :

    ffmpeg -y -i INPUT.mp4 -filter_complex
     "drawtext=enable='between(t,14,16)':fontfile=tahoma.ttf:fontsize=54:fontcolor=green:x=10:y=text_h + 10:text='Dana Scully',
      drawtext=enable='between(t,19,23)':fontfile=tahoma.ttf:fontsize=16:fontcolor=red:x=150:y=220:text='Dana Scully  \<dana.scully\@fbi.gov\>',
      drawtext=enable='between(t,99,104)':fontfile=tahoma.ttf:fontsize=28:fontcolor=green:x=480:y=text_h + 160:text='Dana Scully',
      drawtext=enable='between(t,14,16)':fontfile=tahoma.ttf:fontsize=16:fontcolor=yellow:x=40:y=25:text='Dana Scully  \<dana.scully\@fbi.gov\>',
      drawtext=enable='between(t,180,186)':fontfile=tahoma.ttf:fontsize=88:fontcolor=green:x=20:y=430:text='Dana Scully'[text];
      color=c=#111111:s=1280x720:d=1,format=yuv444p[colorbk];
      [colorbk]drawtext=fontfile=tahoma.ttf:fontsize=16:fontcolor=purple:x=(w-text_w)/2:y=(h-text_h)/2:text='by',drawtext=fontfile=tahoma.ttf:fontsize=32:fontcolor=green:x=(w-text_w)/2:y=((h-text_h)/2)+50:text='Dana Scully',rotate=(-.5):ow=1280:oh=720:c=#111111,chromakey=#111111:similarity=0.01,format=yuva444p,colorkey=#111111:0.1[rotated];
      [text][rotated]overlay=eval=frame:x='if(gte(t,134),(if(lte(t,137),20,NAN)), NAN)':y=100[out];[out]scale=iw*.25:-1"
      -crf 20 test.mp4

    Is that about as optimized as it is going to get ? I thought ffmpeg would already handle the threads based on the computer’s processor, so no real need to mess with it. The processing will all be done on AWS VMs.

    Rotating the text is what really slows it down.

    Any ideas ?

  • Packet Corruption : Why sometimes ffmpeg .bat batch video editing makes my computer unstable unable to restart ?

    13 juin 2022, par principal-ideal-domain

    I'm doing very time consuming ffmpeg video editing. That's why I put my commands into a .bat batch file and run them over night. Usually that works fine, but from time to time when I look the next moring I see an error message of this kind :

    


    enter image description here

    


    From that state on, I didn't find any good way to close the console. When I press the [x] button in the top right corner, it freezes. When I try to kill the application using the task manager nothing happens. Even explorer.exe cannot be closed using the task manager. A shutdown won't do anything. During the last month I had this problem about three times and the only way I could close it was to long press the power button of the computer until it was turned off "the bad way".

    


    Any ideas what to in such situations ?
    
Or even better : How to prevent those situations ?
What can the reason(s) be for the error ?
Do you understand the message ?

    


    When the computer is started again the next morining and I run the same .bat file again everything works fine. So the same error does not repeat and the video is edited nicely !

    


    Edit : Now, about one week after posting this question the problem occurred many more times ! It is very annoying. I guess it has to do with the external hard drive connected by USB. Sometimes it randomly interrupts the connection ! That might be the reason for the behavior. Whatever its causing the error, I want to learn a solution how to deal with this in future. I don't want to always push the reset button of my computer. I want a proper way to be able to shut it down.