Recherche avancée

Médias (0)

Mot : - Tags -/diogene

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (40)

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

  • Mediabox : ouvrir les images dans l’espace maximal pour l’utilisateur

    8 février 2011, par

    La visualisation des images est restreinte par la largeur accordée par le design du site (dépendant du thème utilisé). Elles sont donc visibles sous un format réduit. Afin de profiter de l’ensemble de la place disponible sur l’écran de l’utilisateur, il est possible d’ajouter une fonctionnalité d’affichage de l’image dans une boite multimedia apparaissant au dessus du reste du contenu.
    Pour ce faire il est nécessaire d’installer le plugin "Mediabox".
    Configuration de la boite multimédia
    Dès (...)

  • La sauvegarde automatique de canaux SPIP

    1er avril 2010, par

    Dans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
    Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)

Sur d’autres sites (7796)

  • 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.

  • 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;

  • 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;