Recherche avancée

Médias (1)

Mot : - Tags -/Rennes

Autres articles (69)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

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

  • reading video mpegts stream from stdin using libavformat libavcodec

    1er février 2012, par D Starkweather

    I'm trying to read video frames from stdin using ffmpeg's libav* lib collection. Simply passing "pipe:0" or "pipe :" as the filename to avformat_open_input_file() in my program does not do the trick. (e.g. cat /dev/video0 | ./myprogram OR ./myprogram < /dev/video0 ; it also fails using file.avi in place of /dev/video0).

    Peeking into ffmpeg.c, I find the following bit of code using tcsetattr() to set the termios :

    struct termios tty;

    if (tcgetattr (0, &amp;tty) == 0) {
    oldtty = tty;
    restore_tty = 1;
    atexit(term_exit);

    tty.c_iflag &amp;= ~(IGNBRK|BRKINT|PARMRK|ISTRIP
                         |INLCR|IGNCR|ICRNL|IXON);
    tty.c_oflag |= OPOST;
    tty.c_lflag &amp;= ~(ECHO|ECHONL|ICANON|IEXTEN);
    tty.c_cflag &amp;= ~(CSIZE|PARENB);
    tty.c_cflag |= CS8;
    tty.c_cc[VMIN] = 1;
    tty.c_cc[VTIME] = 0;

    tcsetattr (0, TCSANOW, &amp;tty);
    }
    signal(SIGQUIT, sigterm_handler); /* Quit (POSIX).  */
    }

    avformat_network_deinit();

    signal(SIGINT , sigterm_handler); /* Interrupt (ANSI).    */
    signal(SIGTERM, sigterm_handler); /* Termination (ANSI).  */
    signal(SIGXCPU, sigterm_handler);

    However, when I try this, it appears to have no effect. What settings do I need in the termios struct to continuously read video frames in ?

    Currently, all i am able to do is call av_read_frames a few times (return code 0) before it usually either segfaults or hangs waiting. The buffer usually contains just a blank screen (all black). With any luck, the video buffer will contain the first video frame it comes across, but does not update to the later frames.

    (I'm running this on Debian 6.0) Here's my version of ffmpeg :

    ffmpeg version N-36936-g4cf81d9 Copyright (c) 2000-2012 the FFmpeg
    developers built on Jan 19 2012 20:51:47 with gcc 4.4.5
    configuration : —enable-shared —enable-gray —enable-hardcoded-tables
    —enable-runtime-cpudetect —enable-libmp3lame —enable-libopenjpeg —enable-librtmp —enable-libtheora —enable-libvorbis —enable-libx264 —enable-libxvid —enable-zlib —enable-gpl libavutil 51. 34.101 / 51. 34.101 libavcodec 53. 57.100 /
    53. 57.100 libavformat 53. 30.100 / 53. 30.100 libavdevice 53. 4.100 / 53. 4.100 libavfilter 2. 59.101 / 2. 59.101 libswscale 2. 1.100 / 2. 1.100 libswresample 0. 6.100 /
    0. 6.100 libpostproc 52. 0.100 / 52. 0.100 Hyper fast Audio and Video encoder usage : ffmpeg [options] [[infile options] -i
    infile].

    Thank you very much for any help helpful tips. It is much appreciated.

    D. Grant Starkweather

  • Suppress output from popen()

    18 février 2012, par Juan Gabriel Calderón-Pérez

    Is there a way to suppress the output from popen() without losing the Wait().

    Test 1 :

    FILE * stream = NULL;
    char buffer [120];

    stream = popen ("ffmpeg -y -i test.amr -ar 16000 test.wav -v quiet", "r");

    while (fgets (buffer, sizeof(buffer), stream))
    {
    }

    pclose (stream);

    Test 2 :

    FILE * stream = NULL;
    char buffer [120];

    stream = popen ("ffmpeg -y -i test.amr -ar 16000 test.wav -v quiet &amp;> /dev/null", "r");

    while (fgets (buffer, sizeof(buffer), stream))
    {
    }

    pclose (stream);

    The problem with Test 2 is that pclose() is not waiting for the pipe to finish processing. I don't want to have a bunch of FFMPEG output every time I have to do a pipe.

  • Passing FileInputStream and FileOutputStream to ffmpeg to transcode(using JAVE-Java Audio Video Encoding)

    17 février 2014, par Jagan S

    I am trying to transcode a *.mov file into a *.mp4 file using JAVE, which calls ffmpeg.
    Both input file and output file are in InputStream and OutputStream forms.
    That means I need to pass InputStream and OutputStream as -i and -y parematers for ffmpeg.
    How do I do that ?

       //Read a movfile.mov converted into a FileInputStream  
       InputStream fileInputStream = getFileInputStream();  
       OutputStream fileOutputStream = new FileOutputStrea(outputMP4File) //Output        
       Process p = Runtime.exec("ffmpeg -i - -y -");  
       InputStream pInStrm = p.getInputStream();  
       OutputStream pOutStrm = p.getOutputStream();  
       int vin = 0, vout = 0;  

       Thread read = new Thread() {  
            byte[] buff = new byte[4096];  
             void run() {  
               while ((vin=fileInputStream.read(buf))!=-1) {  
                    pOutStrm.write(buf, 0, vin);  
               }  
            }  
         }; read.start();

       Thread write = new Thread() {  
           byte[] buff = new byte[4096];  
           void run() {  
                while ((vout=pInStrm.read(buf))!=-1) {  
                    fileOutputStream.write(buf, 0, vout);  
               }  
            }  
         }; write.start();  

    But I keep getting "IOException : pipe is closed" error. Could somebody help me out ?
    Alternatively if there is any JAVA API that could do this transcoding(on Windows and RedHat Linux), that would be very helpful

    Thanks