Recherche avancée

Médias (1)

Mot : - Tags -/géodiversité

Autres articles (47)

  • Le plugin : Gestion de la mutualisation

    2 mars 2010, par

    Le plugin de Gestion de mutualisation permet de gérer les différents canaux de mediaspip depuis un site maître. Il a pour but de fournir une solution pure SPIP afin de remplacer cette ancienne solution.
    Installation basique
    On installe les fichiers de SPIP sur le serveur.
    On ajoute ensuite le plugin "mutualisation" à la racine du site comme décrit ici.
    On customise le fichier mes_options.php central comme on le souhaite. Voilà pour l’exemple celui de la plateforme mediaspip.net :
    < ?php (...)

  • Installation en mode ferme

    4 février 2011, par

    Le mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
    C’est la méthode que nous utilisons sur cette même plateforme.
    L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
    Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...)

  • Le plugin : Podcasts.

    14 juillet 2010, par

    Le problème du podcasting est à nouveau un problème révélateur de la normalisation des transports de données sur Internet.
    Deux formats intéressants existent : Celui développé par Apple, très axé sur l’utilisation d’iTunes dont la SPEC est ici ; Le format "Media RSS Module" qui est plus "libre" notamment soutenu par Yahoo et le logiciel Miro ;
    Types de fichiers supportés dans les flux
    Le format d’Apple n’autorise que les formats suivants dans ses flux : .mp3 audio/mpeg .m4a audio/x-m4a .mp4 (...)

Sur d’autres sites (7620)

  • Reading video frame by frame using php, ffmpeg and proc_open

    29 avril 2020, par Tom

    I want to use proc_open to read every frame from a video using ffmpeg and then use PHP to do something with the frames.&#xA;Here's the example that does the opposite- it sends frame by frame from PHP to ffmpeg :

    &#xA;&#xA;

    $descriptors = array(&#xA;    0 => array("pipe", "r"),&#xA;&#xA;    1 => array("pipe", "w"), &#xA;    2 => array("file", "C:/error-output.txt", "a")  &#xA;);&#xA;&#xA;$frames = glob(&#x27;Q:/images/*.jpg&#x27;);&#xA;&#xA;&#xA;$command = "ffmpeg -f image2pipe -pix_fmt rgb24 -framerate 10 -c:v mjpeg -i - ".&#xA;                "-r 10 -vcodec libx264 -pix_fmt yuv420p  -preset faster -crf 17 ".&#xA;                "-y test.mp4";&#xA;&#xA;$ffmpeg = proc_open($command, $descriptors, $pipes);&#xA;&#xA;if (!is_resource($ffmpeg))&#xA;{&#xA;    die(&#x27;Could not run ffmpeg&#x27;);&#xA;&#xA;}&#xA;&#xA;foreach ($frames AS $frame)&#xA;{&#xA;&#xA;    fwrite($pipes[0], file_get_contents($frame) );&#xA;}&#xA;&#xA;fclose($pipes[0]);&#xA;

    &#xA;&#xA;

    And here's how I am trying but can't get it right :

    &#xA;&#xA;

    $descriptors = array(&#xA;    0 => array("pipe", "r"),&#xA;&#xA;    1 => array("pipe", "w"),  write to&#xA;    2 => array("file", "C:/error-output.txt", "a") &#xA;);&#xA;&#xA;&#xA;$command = "ffmpeg -i 1.gif -ss 00:00:3 -s 650x390 -vframes 100 -c:v png -f image2pipe -";&#xA;&#xA;$ffmpeg = proc_open($command, $descriptors, $pipes);&#xA;&#xA;if (!is_resource($ffmpeg))&#xA;{&#xA;    die(&#x27;Could not run ffmpeg&#x27;);&#xA;&#xA;}&#xA;&#xA;while (!feof($pipes[1]))&#xA;{&#xA;    $frame = fread($pipes[1], 5000);&#xA;}&#xA;&#xA;fclose($pipes[1]);&#xA;

    &#xA;&#xA;

    The biggest issue is I don't know how much data to read from ffmpeg to get a whole frame.

    &#xA;

  • FFmpeg video is very distorted after a pixel-perfect start

    7 septembre 2022, par AlvinfromDiaspar

    I am using the following FFMpeg command to convert a H.264 UDP streamed video from a Tello drone to another address.

    &#xA;&#xA;

    ffmpeg -i udp://0.0.0.0:11111 -preset ultrafast -vcodec libx264 -tune zerolatency -b 900k -f h264 udp://127.0.0.1:5000&#xA;

    &#xA;&#xA;

    Then I simply use the following OpenCv to read from that new address :

    &#xA;&#xA;

    this.Capture = new OpenCvSharp.VideoCapture("udp://127.0.0.1:5000", OpenCvSharp.VideoCaptureAPIs.FFMPEG);&#xA;

    &#xA;&#xA;

    From this Capture reference, i obtain the next frame by calling this.Capture.Read(mat).&#xA;When i assigned the convert image to the UI, the image is pixel perfect !

    &#xA;&#xA;

    However, after the initial rendering, i am not seeing immediate updates. But i do see very laggy video updates that is very distorted. It looks like each consecutive frame is just the delta/difference drawn on top of the previous frame.

    &#xA;&#xA;

    Is there anything i can tweak/modify in my FFMpeg command to resolve this distorted video rendering ?

    &#xA;&#xA;

    Update 1&#xA;I was able to make some progress. The video updates, still with distortion, but overall distortion is a bit less. And the frames update more responsively.

    &#xA;&#xA;

    To get to this point, i simply added this parameter to my FFMpeg command :

    &#xA;&#xA;

    -g 100&#xA;

    &#xA;&#xA;

    I also tried :

    &#xA;&#xA;

    -g 300&#xA;

    &#xA;

  • Using GStreamer to receive and send h264 video (from OBS)

    16 mars 2020, par Ivorius

    I’ve been trying to set up using GStreamer to get support for some input I can output from OBS.

    OBS : rtp_mpegts to udp ://localhost:5000

    http-launch 8080 webmmux streamable=true name=stream udpsrc uri=udp://localhost:5000 caps="application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)MP2T-ES, payload=(int)
    33" ! gstrtpjitterbuffer latency=200 ! application/x-rtp ! rtpmp2tdepay ! video/mpegts ! mpegtsdemux ! video/x-h264 ! queue ! decodebin ! vp8enc ! stream.   audiotestsrc ! vorbisenc ! stream.

    However, using this it seems to accept connections, but just closes them again after a while. Any clues on what I am doing wrong ? I am open to any format changes as long as they’re supported by OBS / ffmpeg.

    As a bonus, how do I add support for audio as well ?

    Background

    I’ve found https://github.com/sdroege/http-launch, which works well in displaying a GStreamer video over http:

    <video autoplay="autoplay" controls="">
       <source src="https://localhost:8080" type="video/mp4" codecs="avc1.4D401E, mp4a.40.2">
       You browser doesn't support element <code>video

    .

    I’ve managed to set up a pipeline where I can use a GStreamer source to pipe into a http-launch
    pipeline and display it on video :

    http-launch 8080 webmmux streamable=true name=stream udpsrc port=5000 caps = "application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, payload=(int)96" ! mpegtsdemu
    x ! h264parse ! TIViddec2 ! videoconvert ! vp8enc ! stream.   audiotestsrc ! vorbisenc ! stream.

    gst-launch-1.0 -v videotestsrc ! videoconvert ! x264enc tune=zerolatency bitrate=500 speed-preset=superfast ! rtph264pay ! udpsink host=127.0.0.1 port=5000

    However, I don’t think OBS supports rpt over UDP. It uses ffmpeg to send these packets, which can stream rtp_mpegts. I’ve found some code snippets which claim to support the format, and stitch together the above pipeline.