Recherche avancée

Médias (91)

Autres articles (96)

  • Contribute to documentation

    13 avril 2011

    Documentation is vital to the development of improved technical capabilities.
    MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
    To contribute, register to the project users’ mailing (...)

  • Installation en mode standalone

    4 février 2011, par

    L’installation de la distribution MediaSPIP se fait en plusieurs étapes : la récupération des fichiers nécessaires. À ce moment là deux méthodes sont possibles : en installant l’archive ZIP contenant l’ensemble de la distribution ; via SVN en récupérant les sources de chaque modules séparément ; la préconfiguration ; l’installation définitive ;
    [mediaspip_zip]Installation de l’archive ZIP de MediaSPIP
    Ce mode d’installation est la méthode la plus simple afin d’installer l’ensemble de la distribution (...)

  • Automated installation script of MediaSPIP

    25 avril 2011, par

    To overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
    You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
    The documentation of the use of this installation script is available here.
    The code of this (...)

Sur d’autres sites (9637)

  • May I use OpenCV in a customized FFMPEG filter ?

    25 octobre 2017, par Codecodeup

    I am new to FFMPEG and OpenCV. I hope to overlay a heatmap video on top of a video. There could be two solutions :
    (1) Make a customized FFMPEG filter. When looping over each frame, calculate the heatmap for that frame and overlay it with the video frame. Here, I need some matrix operations to calculate the heatmap. May I use OpenCV for these operations inside the FFMPEG filter ?
    (2) Generate the heatmap, using OpenCV, as a video and then use FFMPEG to overly the heatmap video on top of the original video.

    Looks like the first one fits the FFMPEG workflow, but I am still not sure which solution is better, or if there are better solutions. Especially, I am not sure if I can use OpenCV inside FFMPEG.

    Thanks.

  • How to reduce the size of video file as a buffer or blob before writing it on Nodejs ?

    7 novembre 2022, par Hypothesis

    I send live feed from client to the server using websocket from the client side like this :

    


        recorder = new MediaRecorder(canvasStream, {
        mimeType: 'video/webm;codecs=vp9',
        videoBitsPerSecond: 3 * 1024 * 1024
    });
    recorder.ondataavailable = async (e) => {
        const arbuf = await e.data.arrayBuffer()
        ws.send(pack({ type: 'REC', data: arbuf })) //sends to server
    }


    


    and on the server side I get them like this :

    


     let blob = new Blob(chunks, { type: 'video/mp4' })
      const buffer = Buffer.from(await blob.arrayBuffer());
      fs.writeFile("foo.mp4", buffer, () => console.log('video saved!'));


    


    However foo.mp4 is really large. Please help me find a way to reduce the size of foo.mp4 as it is being written down to the disc. ( I can reduce it after it is written, however that won't do the trick for me. It has to be encoded and compressed before it is written )

    


  • Video width is different in different devices

    8 novembre 2017, par David

    I have a special video when i want to get this video’s width code returns different value for Samsung galaxy s6 and Samsung note 3. I tested many different codes and libraries, but result is the same.
    in Samsung galaxy s6 : 640x480
    in Samsung note 3 : 853x480
    when I open this video with Gspot program it shows :

    Recommended Display Size : 853x480

    and this is the same value is returned by our IOS app tested in Iphone 7. aspect radio is not the same and this is big problem.

    here is some of codes I tested :

    (1)

       MediaMetadataRetriever metaRetriever = new MediaMetadataRetriever();
       metaRetriever.setDataSource(path);
       Bitmap bmp = metaRetriever.getFrameAtTime(-1);

       int height = bmp.getHeight();
       int width = bmp.getWidth();

    (2)

       MediaPlayer myMediaPlayer= MediaPlayer.create(ApplicationLoader.applicationContext,
                                        Uri.fromFile(new File(path)));

       width = myMediaPlayer.getVideoWidth();
       height = myMediaPlayer.getVideoHeight();

    (3)

    MediaMetadataRetriever metaRetriever = new MediaMetadataRetriever();
           metaRetriever.setDataSource(path);
    String heights = metaRetriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_VIDEO_HEIGHT);
           String widths = metaRetriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_VIDEO_WIDTH);
       int height = Integer.valueOf(heights);
           int width = Integer.valueOf(widths);

    (4)

     MediaPlayer myMediaPlayer= MediaPlayer.create(ApplicationLoader.applicationContext, Uri.fromFile(new File(path)));
               myMediaPlayer.setOnVideoSizeChangedListener((mp, width, height) -> {
           int videoWidth = width;
           int videoHeight = height;
       );
               myMediaPlayer.setDataSource(path);
               myMediaPlayer.prepare();

    FFmpegMediaMetadataRetriever, FFmpeg Java, ExoPlayer and some other libraries returns the same result.