Recherche avancée

Médias (91)

Autres articles (62)

  • Gestion des droits de création et d’édition des objets

    8 février 2011, par

    Par défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

  • Dépôt de média et thèmes par FTP

    31 mai 2013, par

    L’outil MédiaSPIP traite aussi les média transférés par la voie FTP. Si vous préférez déposer par cette voie, récupérez les identifiants d’accès vers votre site MédiaSPIP et utilisez votre client FTP favori.
    Vous trouverez dès le départ les dossiers suivants dans votre espace FTP : config/ : dossier de configuration du site IMG/ : dossier des média déjà traités et en ligne sur le site local/ : répertoire cache du site web themes/ : les thèmes ou les feuilles de style personnalisées tmp/ : dossier de travail (...)

Sur d’autres sites (13123)

  • Extract frames and miliseconds

    6 décembre 2013, par Gonzalo Solera

    I would like to be able to extract all the frames of a video and their respectives times. I'm using ffmpeg compiled staticall for android and I'm using this command to extract all the frames of a video :

    ffmpeg -i /inputFile.mp4/ -y /output/%d.jpg

    This works good but I would be very grateful if anyone could show me how to record in an arraylist the time of each frame. (I suppose reading the output when I execute the command) :

    Process p = Runtime.getRuntime().exec(myCommand);

    Thanks for help !!

  • Faster way to write image to Process.StandardInput.BaseStream

    4 septembre 2012, par Hasibii

    Im trying to send a lot of desktop captured images to an encoders (FFmpeg) stdin.

    The following code example works.

    the CaptureScreen() function provides an image in 5-10 ms.

    If I save the image in a MemoryStream it takes almost no time.

    But I can only save 1 image every 45 ms to
    proc.StandardInput.BaseStream.

    public void Start(string bitrate, string buffer, string fps, string rtmp, string resolution, string preset)
    {
       proc.StartInfo.FileName = myPath + "\\ffmpeg.exe";
       proc.StartInfo.Arguments = "-f image2pipe -i pipe:.bmp -vcodec libx264 -preset " + preset + " -maxrate " + bitrate + "k -bufsize " +
       buffer + "k -bt 10 -r " + fps + " -an -y test.avi"; //+ rtmp;
       proc.StartInfo.UseShellExecute = false;
       proc.StartInfo.RedirectStandardInput = true;
       proc.StartInfo.RedirectStandardOutput = true;

       proc.Start();

       Stopwatch st = new Stopwatch();
       BinaryWriter writer = new BinaryWriter(proc.StandardInput.BaseStream);
       System.Drawing.Image img;

       st.Reset();
       st.Start();

       for (int z = 0; z < 100; z++)
       {
           img = ScrCap.CaptureScreen();
           img.Save(writer.BaseStream, System.Drawing.Imaging.ImageFormat.Bmp);
           img.Dispose();
       }

       st.Stop();
       System.Windows.Forms.MessageBox.Show(st.ElapsedMilliseconds.ToString());
    }

    The question is :

    Can I do the saving process faster ?

    I try to get stable 60 fps this way

  • run ffmpeg from PHP web script

    18 février 2014, par it6

    I need to manage the recording/capture of a website mindwhile it is running a slide-show to get videos form these slides.

    My approach is :

    <?php

    define('FFMPEG_LIBRARY', '/usr/bin/ffmpeg ');

    $ffmpegcmd = "ffmpeg -f x11grab -r 25 -s 800x600 -i :0.0 /tmp/output.mpg";

    shell_exec($ffmpegcmd);  

    ?>

    But i get this error from php error log :

    [x11grab @ 0x81e8aa0] device: :0.0 -> display: :0.0 x: 0 y: 0 width: 800 height: 600
    No protocol specified
    No protocol specified
    [x11grab @ 0x81e8aa0] Could not open X display.
    :0.0: Input/output error

    Similar command from console run good.

    Please, any help to get display and be able to control ffmpeg from browser php script ?

    Thanks in advance.


    thanks for your time.

    I got rid the X display error, but not I still haven't got the capture.

    Using xvfb I get an unknown file at /tmp written by www-data user :
    - rw-r—r— 1 www-data www-data 11252 Sep 12 09:49 server-B20D7FC79C7F597315E3E501AEF10E0D866E8E92.xkm

    Running startx I got also an unknown file at /tmp
    - rw------- 1 www-data www-data 59 Sep 12 09:53 serverauth.oLcFlG7tXC

    any of both grow in size so it is not capturing anything. The content is some binary thing.
    What are those files about ?

    What I am trying is to write a script in which I can control the time ffmpeg is capturing the desktop to create a video from a jquery slide displayed on a website.

    My try from console is closer, but if I can do it by browser I will be able to know when to stop sending an AJAX request once the slide is finished.

    This is my try from console :

    #!/bin/bash

    # start the slide website: I will need to change it to control by querystring the language and course level
    firefox http://www.languagecourse.net/vocabulary-trainer.php &
    # start recording: I will need to adjust the frame to capture
    ffmpeg -f x11grab -r 25 -s 800x600 -i :0.0 /tmp/output2.mpg &
    # since I can't control the time a course takes I pause an arbitrary time
    sleep 5
    # look for the capture PID and close it
    for i in $(ps aux | grep ffmpeg | sed "s/  */#/g" | cut -f2 -d#)
    do
     echo "proceso $i killed"
     kill -9 $i
    done

    I wonder once the website is opened I can continue doing the control from AJAX, but not know if I will be able to get the ffmpeg PID to stop the command.

    I will appreciate any kind of comments.

    Regards,
    ·_-