Recherche avancée

Médias (1)

Mot : - Tags -/belgique

Autres articles (66)

  • 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

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

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

Sur d’autres sites (7093)

  • ffmpeg doesn't accept input in script

    21 octobre 2022, par Eberhardt

    this is a beginner's question but i can't figure out the answer after looking into it for several days :

    


    I want ffmpeg to extract the audio portion of a video and save it in an .ogg container. If i run the following command in terminal it works as expected :

    


    ffmpeg -i example.webm -vn -acodec copy example.ogg


    


    For convenience, i want to do this in a script. However, if i pass a variable to ffmpeg it apparently just considers the first word and produces the error "No such file or directory".

    


    I noticed that my terminal escapes spaces by a \ so i included this in my script. This doesn't solve the problem though.

    


    Can someone please explain to me, why ffmpeg doesn't consider the whole variable that is passed to it in a script while working correctly when getting passed the same content in the terminal ?

    


    This is my script that passes the filename with spaces escaped by \ to ffmpeg :

    


    #!/bin/bash

titelschr=$(echo $@ | sed "s/ /\\\ /g")
titelohne=$(echo $titelschr | cut -d. -f 1)
titelogg=$(echo -e ${titelohne}.ogg)  

ffmpeg -i $titelschr -vn -acodec copy $titelogg


    


    Thank you very much in advance !

    


  • can't record docker selenium with ffmpeg and ubuntu 18

    1er janvier 2019, par Alex028502

    I have a script that starts a selenium/standalone-chrome container, starts recording with ffmpeg, and runs the selenium tests. However, it is not working with ubuntu 18, possibly because of the ffmpeg version (3.4.4 instead of 2.8.15).

    I have broken down the problem into a couple commands which work fine in ubuntu 16 but not ubuntu 18 :

    start selenium container in terminal #1

    docker run --network=host --shm-size=2g -e SCREEN_WIDTH=1920 -e SCREEN_HEIGHT=1080 selenium/standalone-chrome:3.141.59-antimony

    start recording in terminal #2

    rm -f test.mp4
    # :99 seems to be the default for the selenium container
    ffmpeg -f x11grab -video_size 1920x1080 -i :99 -codec:v libx264 -r 4 test.mp4

    and I get something that looks like this

    frame=    2 fps=0.1 q=-1.0 Lsize=       2kB time=00:00:00.25 bitrate=  75.9kbits/s dup=0 drop=413 speed=0.0165

    the time stays at 0, and then goes up to 25msec when I stop it.

    On the other hand, if I just start regular screen buffer in terminal #1

    Xvfb :99 -screen 0 1920x1080x24

    and run the same thing as above in terminal #2, everything works

    Also, I am pretty sure that the above ffmpeg command worked in ubuntu 16, with ffmpeg-3.

    So to summarise when the above ffmpeg command seems to work :

                      | ubuntu 16 (ffmpeg 3) | ubuntu 18 (ffmpeg 4)
    just start Xvfb    | works                | works
    selenium container | works                | DOES NOT WORK

    Any ideas ?

  • FFMPEG to OpenGL Texture

    23 avril 2014, par Spamdark

    I was here to ask, how can I convert an AVFrame to an opengl texture. Actually, I created a renderer the outputs me the audio (Audio is working) and the video, but the video is not outputing. Here is my code :

    Texture creation :

    glGenTextures(1,&_texture);
    glBindTexture(GL_TEXTURE_2D,_texture);
    glPixelStorei(GL_UNPACK_ALIGNMENT, 1);

    glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR );
    glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );

    Code Info : _texture variable is a GLuint that keeps the texture ID

    Function that gets the AVFrame and convert it to OpenGL Texture :

    int VideoGL::NextVideoFrame(){
    // Get a packet from the queue
    AVPacket *videopacket = this->DEQUEUE(VIDEO);
    int frameFinished;
    if(videopacket!=0){
       avcodec_decode_video2(_codec_context_video, _std_frame,&frameFinished,videopacket);

       if(frameFinished){

           sws_scale(sws_ctx, _std_frame->data, _std_frame->linesize, 0, _codec_context_video->height, _rgb_frame->data, _rgb_frame->linesize);

           if(_firstrendering){
           glBindTexture(GL_TEXTURE_2D,_texture);
           glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, _codec_context_video->width,_codec_context_video->height,0,GL_RGB,GL_UNSIGNED_BYTE,_rgb_frame->data[0]);

           _firstrendering = false;

           }else{

               glActiveTexture(_texture);
               glBindTexture(GL_TEXTURE_2D,_texture);
               glTexSubImage2D(GL_TEXTURE_2D,0,0,0,_codec_context_video->width,_codec_context_video->height,GL_RGB,GL_UNSIGNED_BYTE,_rgb_frame->data[0]);

           }
           av_free_packet(videopacket);
           return 0;
       }else{

           av_free_packet(videopacket);
           return -1;
       }

    }else{
       return -1;
    }
    return 0;
    }

    Code Information : There is a queue where a thread store the AVFrames, this function is frequently called to get the AVFrames, until it gets a NULL it stops to being called.

    That’s actually not working. (I tried to look at some questions in stack overflow, it’s still not working)
    Any example, or someone that helps me to correct any error there ?

    Additional Data : I tried to change the GL_RGB to GL_RGBA and started to play with the formats, anyway it crashes when I try GL_RGBA (Because the width and height are very big, anyway I tried to resize them). I have tried to change the sizes to Power Of 2, stills not working.

    1 Edit :

    Thread function :

    DWORD WINAPI VideoGL::VidThread(LPVOID myparam){

    VideoGL * instance = (VideoGL*) myparam;
    instance->wave_audio->Start();

    int quantity=0;

    AVPacket packet;
    while(av_read_frame(instance->_format_context,&packet) >= 0){
       if(packet.stream_index==instance->videoStream){
           instance->ENQUEUE(VIDEO,&packet);
       }
       if(packet.stream_index==instance->audioStream){
           instance->ENQUEUE(AUDIO,&packet);
       }
    }

    instance->ENQUEUE(AUDIO,NULL);
    instance->ENQUEUE(VIDEO,NULL);

    return 0;
    }

    Thread creation function :

    CreateThread(NULL, 0, VidThread, this, NULL, NULL);

    Where this refers to the class that contains the NextVideoFrame, and the _texture members.

    Solved :

    I followed some of the datenwolf tips, and now the video is displaying correctly with the audio/video :

    Screenshot took