Recherche avancée

Médias (1)

Mot : - Tags -/book

Autres articles (51)

Sur d’autres sites (8296)

  • What are some NPAPI video plugin alternatives for Chrome ?

    14 janvier 2014, par ElHaix

    Was : "PPAPI (Pepper) video plugin -NaCl module failed - how to resolve ?"

    Google's Say Goodbye to Our Old Friend NPAPI blog post indicates that NPAPI plugin support will cease by the end of 2014 (in favor of PPAPI).

    We have considered the option of using the ffmpeg libraries to create our own video plugin to simply decode RTSP encoded H.264 video streams on the client - important because we need as near real-time video display (avoiding transcoding latency). Using the ffmpeg libraries, there is still a 3-5 second delay in decoding the stream, not as fast as running MPlayer with the -benchmark option.

    In trying Google's PNaCl recommendation, we just got the LOADING status and the following error :

    NativeClient : NaCl module load failed : PnaclCoordinator : Compile
    process could not be created : ServiceRuntime : failed to start

    We don't need an encoder, simply decoding the incoming stream to images would be fine - or other suggestions ?

    What are some NPAPI alternatives to solve this problem ?

  • Streaming converted movie with mp4 container in NodeJS, movie playing very fast

    20 septembre 2016, par Mustafa

    I have used stream-transcoder module to convert a file make it a stream. So the file is not stored, it is on the fly.

    app.get("/video", function(req,res){
       res.writeHead(200, {'Content-Type': 'video/mp4'});
       var src = "movie.avi";

       var Transcoder = require('stream-transcoder');
       var stream = fs.createReadStream(src);
       new Transcoder(stream)
           .maxSize(1280, 720)
           .videoCodec('h264')
           .videoBitrate(800 * 1000)
           .fps(25)
           .sampleRate(44100)
           .channels(2)
           .audioBitrate(128 * 1000)
           .format('mp4')
           .on('finish', function() {
               console.log("finished");
           })
           .stream().pipe(res);
    });

    It works nicely, it is fast, but too fast, the audio is played at the same speed, however the video does not respect the frame rate, whatever is recieved from ffmpeg is immeidately shown, fastly. Additionally, it does not show the total time, I believe it is the problem. I need to somehow specify the length, framerate, but I could not find enough information on that. I thought the stream recieved from ffmpeg should contain that. And I could not find respective headers for that in HTTP.

    Here are the flags that this stream-transcoder module uses for MP4 :

    [ '-i',
     '-',
     '-vf',
     'scale=min(trunc(1280/hsub)*hsub\\,trunc(a*720/hsub)*hsub):min(trunc(720/vsub)*vsub\\,trunc(1280/a/vsub)*vsub)',
     '-vcodec',
     'h264',
     '-b:v',
     800000,
     '-r',
     25,
     '-ar',
     44100,
     '-ac',
     2,
     '-ab',
     128000,
     '-f',
     'mp4',
     '-movflags',
     'frag_keyframe+faststart',
     'pipe:1' ]

    When I use VP8 encoder and WebM, it works nicely, the time is displayed, video plays normal speed.

  • How to get info of undecoded video frames from bit/packet-loss degraded video in ffmpeg

    9 janvier 2014, par TomiL

    I am using ffprobe to get information regarding decoded video frames :

    ffprobe -i  -show_frames -select_streams v > output_file.txt

    but this way I can only see info of successfully decoded frames from the multimedia container.

    I run some kind of packet loss simulation, so I need to extract "frame time position", "frame type", etc. of un-decoded, e.g. degraded frames from the multimedia container, ie. mpeg-4 transport stream. I get some messages to standard error output, which are hard to understand (and there are no specific information whatsoever !), so I am looking for output more like that, made from -show_frames argument.

    Is there any facility capable of this, e.g. version, ffmpeg module or even some other software with appropriate video decoding software, i.e. H.264 compliant, which can extract frame header information and predicted frame type from the multimedia container ?