Recherche avancée

Médias (1)

Mot : - Tags -/copyleft

Autres articles (83)

  • List of compatible distributions

    26 avril 2011, par

    The table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
    If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...)

  • MediaSPIP Core : La Configuration

    9 novembre 2010, par

    MediaSPIP Core fournit par défaut trois pages différentes de configuration (ces pages utilisent le plugin de configuration CFG pour fonctionner) : une page spécifique à la configuration générale du squelettes ; une page spécifique à la configuration de la page d’accueil du site ; une page spécifique à la configuration des secteurs ;
    Il fournit également une page supplémentaire qui n’apparait que lorsque certains plugins sont activés permettant de contrôler l’affichage et les fonctionnalités spécifiques (...)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

Sur d’autres sites (12632)

  • Unhandled stream error in pipe : write EPIPE in Node.js

    28 novembre 2013, par Michael Romanenko

    The idea is to serve screenshots of RTSP video stream with Express.js server. There is a continuously running spawned openRTSP process in flowing mode (it's stdout is consumed by another ffmpeg process) :

    function spawnProcesses (camera) {
     var openRTSP = spawn('openRTSP', ['-c', '-v', '-t', camera.rtsp_url]),
         encoder = spawn('ffmpeg', ['-i', 'pipe:', '-an', '-vcodec', 'libvpx', '-r', 10, '-f', 'webm', 'pipe:1']);

     openRTSP.stdout.pipe(encoder.stdin);

     openRTSP.on('close', function (code) {
       if (code !== 0) {
         console.log('Encoder process exited with code ' + code);
       }
     });

     encoder.on('close', function (code) {
       if (code !== 0) {
         console.log('Encoder process exited with code ' + code);
       }
     });

     return { rtsp: openRTSP, encoder: encoder };
    }

    ...

    camera.proc = spawnProcesses(camera);

    There is an Express server with single route :

    app.get('/cameras/:id.jpg', function(req, res){
     var camera = _.find(cameras, {id: parseInt(req.params.id, 10)});
     if (camera) {
       res.set({'Content-Type': 'image/jpeg'});
       var ffmpeg = spawn('ffmpeg', ['-i', 'pipe:', '-an', '-vframes', '1', '-s', '800x600', '-f', 'image2', 'pipe:1']);
       camera.proc.rtsp.stdout.pipe(ffmpeg.stdin);
       ffmpeg.stdout.pipe(res);
     } else {
       res.status(404).send('Not found');
     }
    });

    app.listen(3333);

    When i request http://localhost:3333/cameras/1.jpg i get desired image, but from time to time app breaks with error :

    stream.js:94
     throw er; // Unhandled stream error in pipe.
           ^
    Error: write EPIPE
       at errnoException (net.js:901:11)
       at Object.afterWrite (net.js:718:19)

    Strange thing is that sometimes it successfully streams image to res stream and closes child process without any error, but, sometimes, streams image and falls down.

    I tried to create on('error', ...) event handlers on every possible stream, tried to change pipe(...) calls to on('data',...) constructions, but could not succeed.

    My environment : node v0.10.22, OSX Mavericks 10.9.

    UPDATE :

    I wrapped spawn('ffmpeg',... block with try-catch :

    app.get('/cameras/:id.jpg', function(req, res){
    ....
       try {
         var ffmpeg = spawn('ffmpeg', ['-i', 'pipe:', '-an', '-vframes', '1', '-s', '800x600', '-f', 'image2', 'pipe:1']);
         camera.proc.rtsp.stdout.pipe(ffmpeg.stdin);
         ffmpeg.stdout.pipe(res);
       } catch (e) {
         console.log("Gotcha!", e);
       }
    ....
    });

    ... and this error disappeared, but log is silent, it doesn't catch any errors. What's wrong ?

  • Can VideoView be detach and reattached without stopping the stream ?

    1er juin 2015, par Thierry-Dimitri Roy

    I’m building an app where the user clicks on a button to show a video full screen. Initially the video is attached to a view inside a ViewPager. To be able to show it fullscreen I detach it from its parent and reattach it to the root view. This works fine, except when the video is switched to fullscreen while playing. When I detach a playing VideoView it just stop and I need to restart it. This is not acceptable since the video starts buffering before resume. Here the part of the code where the detach is done :

       final ViewGroup parent = (ViewGroup) findViewById(R.id.parent);

       final ViewGroup root = (ViewGroup) findViewById(R.id.root);

       Button b = (Button) findViewById(R.id.button);
       b.setOnClickListener(new OnClickListener() {

           @Override
           public void onClick(View v) {
               parent.removeView(mVideoView);

               LayoutParams lp = new FrameLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
               root.addView(mVideoView, lp);
           }
       });

    Depending of the device, I have a different log error. Probably because the actual video player is provided by the manufacturer and not the Android SDK. Here are the error logs for a Nexus 7 :

    10-30 20:26:18.618: D/NvOsDebugPrintf(124): NvMMDecTVMRDestroyParser Begin
    10-30 20:26:18.618: D/NvOsDebugPrintf(124): --------- Closing TVMR Frame Delivery Thread -------------
    10-30 20:26:18.678: D/NvOsDebugPrintf(124): ------- NvAvpClose -------
    10-30 20:26:18.678: D/NvOsDebugPrintf(124): NvMMDecTVMRDestroyParser Done
    10-30 20:26:18.678: D/NvOsDebugPrintf(124): NvMMLiteTVMRDecPrivateClose Done

    I haven’t been able to detach the video without stopping it. I tried using SurfaceView or TextureView without success.

    I also tried finding a third party video player. I found a commercial one (http://www.vitamio.org/) that I can’t really use for business reason. I found an open source one, that hasn’t been updated in the last year (https://code.google.com/p/dolphin-player/).

    I’m currently targeting Android 4.2 or better on tablet only.


    Note that the ViewPager is not fullscreen. So I can’t use LayoutParams to make the video fullscreen. I need to remove the VideoView from the parent in the ViewPager and add it to the root view to be able to show it fullscreen.

    The URL I’m testing with : http://bellvps1.cpl.delvenetworks.com/media/e1b3e24ecb944abd8f4ed823a0b76ddc/68f78d35296243bfb46d2418f03f2fd0/bande-annonce---the-secret-life-of-walter-mitty-1-9efcc5c6e52ac07a3edf84a1b21967995b7796a2.m3u8

  • Can VideoView be detach and reattached without stopping the it ?

    31 octobre 2013, par Thierry-Dimitri Roy

    I'm building an app where the user clicks on a button to show a video full screen. Initially the video is attached to a view inside a ViewPager. To be able to show it fullscreen I detach it from its parent and reattach it to the root view. This works fine, except when the video is switched to fullscreen while playing. When I detach a playing VideoView it just stop and I need to restart it. This is not acceptable since the video starts buffering before resume. Here the part of the code where the detach is done :

       final ViewGroup parent = (ViewGroup) findViewById(R.id.parent);

       final ViewGroup root = (ViewGroup) findViewById(R.id.root);

       Button b = (Button) findViewById(R.id.button);
       b.setOnClickListener(new OnClickListener() {

           @Override
           public void onClick(View v) {
               parent.removeView(mVideoView);

               LayoutParams lp = new FrameLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
               root.addView(mVideoView, lp);
           }
       });

    Depending of the device, I have a different log error. Probably because the actual video player is provided by the manufacturer and not the Android SDK. Here are the error logs for a Nexus 7 :

    10-30 20:26:18.618 : D/NvOsDebugPrintf(124) : NvMMDecTVMRDestroyParser Begin
    10-30 20:26:18.618 : D/NvOsDebugPrintf(124) : --------- Closing TVMR Frame Delivery Thread -------------
    10-30 20:26:18.678 : D/NvOsDebugPrintf(124) : ------- NvAvpClose -------
    10-30 20:26:18.678 : D/NvOsDebugPrintf(124) : NvMMDecTVMRDestroyParser Done
    10-30 20:26:18.678 : D/NvOsDebugPrintf(124) : NvMMLiteTVMRDecPrivateClose Done

    I haven't been able to detach the video without stopping it. I tried using SurfaceView or TextureView without success.

    I also tried finding a third party video player. I found a commercial one (http://www.vitamio.org/) that I can't really use for business reason. I found an open source one, that hasn't been updated in the last year (https://code.google.com/p/dolphin-player/).

    I'm currently targeting Android 4.2 or better on tablet only.