Recherche avancée

Médias (2)

Mot : - Tags -/kml

Autres articles (31)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs

    12 avril 2011, par

    La manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
    Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras.

  • 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

Sur d’autres sites (4298)

  • FFMPEG to take frame and save as image

    22 février 2013, par alex

    Im trying to save an image from a video frame and save it as a jpeg.
    This function works for smaller video files, but if the video is over 10 minutes it won't save the jpeg image. An error comes up as before trans.

    public function VideoToJpeg($localVideoPath, $localOutImgPath)
    {
       $Name = dirname(__FILE__) . "/ffmpeg";
       $Str = "$Name -i \"$localVideoPath\" -an -ss 00:00:03 -an -r 1 -vframes 1 -y \"$localOutImgPath\"";

       exec($Str);
    }

    here is the error I got from ffmpeg

    [NULL @ 0370e760] Unable to find a suitable output format for 'path'
    : Invalid argument
  • Importing PIL images into FFMPY/FFMPEG to save as GIF/video

    24 mai 2023, par Tricky Devil

    I would like to know how I can transfer PIL images to FFMPY to save it as video, or gif, since the PIL library's quantization method has strong quality losses in certain cases. I first do some modifications with PIL, and then want to export and save the result.

    


    I did not find any information on the topic online, beside one post with PIL to FFMPEG :
Pipe PIL images to ffmpeg stdin - Python
How could I implement something similar in FFMPY ?

    


    If I have for example this setup to begin with :

    


    import ffmpy
import PIL
from PIL import Image as Img

images = [Img.open('frame 1.png'),Img.open('frame 2.png')]#How do I convert them to FFMPEG?

#Here I modify the images using PIL

#Save with FFMPEG:
ff = ffmpy.FFmpeg(
    inputs={images ?: None},#How do I insert PIL images here?
    outputs={'output.gif': None},
    executable='ffmpeg\\bin\\ffmpeg.exe')
ff.run()


    


    How would I proceed to convert and save the images as a video using FFMPY ?
Is it possible by adding some steps inbetween ? I wouldn't want to have to save all PIL images first as images, and then import them and save them with FFMPY a second time, since that would be very time consuming with larger files.

    


  • Save video to disk from WebRTC MediaStream in Node

    27 novembre 2020, par SAGBO Aimé

    I'm building an app where the user can connect to the server through a WebRTC (I'm using simple-peer library both server-side and client-side to set the peer-to-peer connection).
Once the client and the server are connected, the client app stream the user camera and micro to the server.

    


    Now, I want to save the streamed data to the filesystem server-side as an MP4 video file.

    


    I hear about ffmpeg and fluent-ffmpeg to achieve this but i don't know how to use them.

    


      

    • Server side code to set up the peer connection
    • 


    


    const Peer = require("simple-peer");
const wrtc = require("wrtc");

const peer = new Peer({ initiator: false, wrtc: wrtc, trickle: false });

peer.on("error", (err: any) => console.log("error", err));

  peer.on("signal", (data: any) => {
    if (data.type === "offer" || data.type === "answer")
      dispatchMessage(JSON.stringify(data));
    // if (data.renegotiate || data.transceiverRequest) return;
  });

  peer.on("connect", () => {
    console.log("CONNECTED");
    peer.send(JSON.stringify("HELLO DEER PEER FROM SERVER"));
  });

  peer.on("data", (data: any) => {
    console.log("data: ", data);
  });

  peer.on("stream", (stream: MediaStream) => {
    console.log("-------Stream received", stream);
  });

  peer.on("track", (track: MediaStreamTrack) => {
    console.log("-------trackEvent:", track);
  });


    


      

    • Client-side code
    • 


    


    const stream = await window.navigator.mediaDevices.getUserMedia({
    video: { width: { ideal: 4096 }, height: { ideal: 2160 }},
    audio: true,
});

const p = new SimplePeer({
    initiator: isInitiator,  
    trickle: false  
});

stream.getTracks().forEach(track => p.addTrack(
    track,  
    stream  
));

// Here I set up the listeners for the peer connection