Recherche avancée

Médias (3)

Mot : - Tags -/pdf

Autres articles (62)

  • Use, discuss, criticize

    13 avril 2011, par

    Talk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
    The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
    A discussion list is available for all exchanges between users.

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

Sur d’autres sites (8105)

  • fluent-ffmpeg module : "end" event does not fire

    6 décembre 2015, par ndugger

    I’m using the fluent-ffmpeg npm module

    I’ve POSTed a video from my client, and am using new stream.Readable to "read" the video Buffer.

    ffmpeg is converting and saving the file, and everything seems beautiful, but the "end" event never fires.

    My code is as follows :

    const videoStream = new stream.Readable({
       read: function (n) {
           this.push(myVideoBuffer);
       }
    });

    ffmpeg(videoStream)
    .on('progress', e => console.log(e))
    .on('end', () => {
       console.log('ended')
       videoStream.destroy();
    })
    .on('error', e => console.error(e))
    .save(`${process.cwd()}/media/videos/${Date.now()}.mp4`);

    I get a log on every progress event, and it does save the video, but the "end" event’s callback never gets called.

    I assume this is a bug, since everything else works just fine.

  • FFmpeg NaCl module avformat_open_input (on rtsp stream) returns -5 : I/O error

    8 janvier 2016, par Taimoor Alam

    I want to create an RTSP player in Chrome PNaCl.

    I have successfully built the ffmpeg naclport including the following networking flags in the build.sh file for the ffmpeg NaCl port.

    —enable network —enable-protocols —enable-demuxer=rtsp —enable-demux=rtp —enable-demuxer=sdp —enable-decoder=h264

    Furthermore, I have successfully coded and the linked the ffmpeg NaCl port in my own PNaCl module. I have included the following network permissions in the manifest.json file :

    "permissions": [
    {
       "socket": [
           "tcp-listen:*:*",
           "tcp-connect:*:*",
           "resolve-host:*:*",
           "udp-bind:*:*",
           "udp-send-to:*:*"
       ],
    }

    Now once I run the following code, in PNaCl, the avformat_open_input(...) returns -5 or I/O Error :

       AVFormatContext* formatContext = avformat_alloc_context();

       av_register_all();

       avformat_network_init();

       const char * stream_path = "rtsp://184.72.239.149/vod/mp4:BigBuckBunny_115k.mov";

       int result = avformat_open_input(&formatContext, stream_path ,NULL,NULL);

       if(result< 0){

           PostMessage("input not opened, result: ");

           PostMessage(result);

       }else{

         PostMessage(std::string("input successfully opened"));

       }

    What am I possibly doing wrong, and why can’t the PNaCl module access the RTSP stream ?

    PS. This is a similar question, but it gives no definitive answer.

  • Processing Camera stream in Opencv, pushing it over RTMP (NGINX RTMP Module) using FFMPEG

    19 avril 2016, par Asymptote

    Output video :
    https://youtu.be/VxfoBQjoY6E

    Explanation :

    I want to : Process camera stream in Opencv and push it over to RTMP server. I already have NGINX (RTMP module) set up and I have tested streaming videos with both RTMP (Flash Player) and HLS.

    I am reading the frames in a loop and using ’subprocess’ in python to execute ffmpeg command. Here’s the command I am using :

    command = [ffmpeg,
       '-y',
       '-f', 'rawvideo',
       '-vcodec','rawvideo',
       '-pix_fmt', 'bgr24',
       '-s', dimension,
       '-i', '-',
       '-c:v', 'libx264',
       '-pix_fmt', 'yuv420p',
       '-preset', 'ultrafast',
       '-f', 'flv',
       'rtmp://10.10.10.80/live/mystream']


    import subprocess as sp
    ...
    proc = sp.Popen(command, stdin=sp.PIPE,shell=False)
    ...
    proc.stdin.write(frame.tostring()) #frame is read using opencv

    Problem :

    I can see the stream fine but it freezes and resumes frequently. Here’s the output of FFMPEG terminal log :

    Stream mapping:
     Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
    frame=  117 fps= 16 q=22.0 size=     344kB time=00:00:04.04 bitrate= 697.8kbits/s speed=0.543x  

    It mentions speed at the end. I believe it should be close to 1x. I am not sure how to achieve that.

    And I am on the same network as server, I can post my python code if required. Need some ffmpeg guru to give me some advise.

    EDIT

    My input fps is actually 3.
    With '-use_wallclock_as_timestamps', '1' I can see in the log that speed is close to 1x.
    But HLS is not streaming live there’s 2 min delay, it halts and . Chris’s advise partially worked. I am not sure where exactly is the problem, I am starting to believe it has something to do with nginx-rtmp module.

    Here’s the final output, on left it’s flash and on right it’s hls. I am showing the ffmpeg options at the end.
    https://youtu.be/jsm6XNFOUE4