Recherche avancée

Médias (1)

Mot : - Tags -/pirate bay

Autres articles (104)

Sur d’autres sites (24046)

  • Gstreamer, x264enc "Redistribute latency..." error

    20 août 2021, par Jason

    I'm trying to setup a video pipeline with very limited bandwidth. I was able to do it with two raspberry pis using the below lines. The first is for the camera pi and the second is to watch stream :

    


    gst-launch-1.0 rpicamsrc preview=false !  'video/x-h264, width=800, height=600, framerate=30/1' ! h264parse ! rtph264pay config-interval=1 pt=96 ! gdppay ! udpsink host=YOUR_PC_IP port=5000
gst-launch-1.0 udpsrc port=5000 ! gdpdepay ! rtph264depay ! h264parse ! avdec_h264 ! autovideosink sync=false


    


    It works but I go over my bandwidth limit if there is movement. I'm not sure if there is a way to limit bandwidth by setting a parameter here :

    


    'video/x-h264, width=800, height=600, framerate=30/1'


    


    From what I can find online, I have to use something like x264enc. I've followed tutorials but I can't get x264enc to work. it always outputs "Redistribute latency..." on both machines when run and it stays there.

    


    I've tried using x264enc like follows :

    


    gst-launch-1.0 rpicamsrc preview=false !  'video/x-raw, width=800, height=600, framerate=30/1' ! x264enc ! h264parse ! rtph264pay config-interval=1 pt=96 ! gdppay ! udpsink host=YOUR_PC_IP port=5000
gst-launch-1.0 rpicamsrc preview=false !  'video/x-raw, width=800, height=600, framerate=30/1' ! x264enc tune=zerolatency ! h264parse ! rtph264pay config-interval=1 pt=96 ! gdppay ! udpsink host=YOUR_PC_IP port=5000
gst-launch-1.0 rpicamsrc preview=false ! x264enc ! h264parse ! rtph264pay config-interval=1 pt=96 ! gdppay ! udpsink host=YOUR_PC_IP port=5000
gst-launch-1.0 rpicamsrc preview=false ! x264enc tune=zerolatency ! h264parse ! rtph264pay config-interval=1 pt=96 ! gdppay ! udpsink host=YOUR_PC_IP port=5000


    


    Based on tutorials, I would think some of those should work. Other threads say that tune=zerolatency fixes my problem. At least the ones with same output of "Redistribute latency..." I don't know what I'm doing wrong.

    


    Any help would be appreciated. Thanks !

    


  • tests/fate : move TTML-in-MP4 tests from subtitles.mak to mov.mak

    25 août 2021, par Jan Ekström
    tests/fate : move TTML-in-MP4 tests from subtitles.mak to mov.mak
    

    subtitles.mak's fate-sub tests utilize a more strict comparator
    ("rawdiff"), which causes the tests fail in case of white space
    differences, such as CRLF vs LF. This in turn causes these
    ffprobe-using TTML-in-MP4 tests to fail on non-LF systems such as
    Windows or wine.

    • [DH] tests/fate/mov.mak
    • [DH] tests/fate/subtitles.mak
    • [DH] tests/ref/fate/mov-mp4-ttml-dfxp
    • [DH] tests/ref/fate/mov-mp4-ttml-stpp
    • [DH] tests/ref/fate/sub-ttml-mp4-dfxp
    • [DH] tests/ref/fate/sub-ttml-mp4-stpp
  • How to "stream" images to ffmpeg to construct a video in .NET 6

    13 septembre 2021, par alkasel

    I'm using FFMPEG command line tool to create a video. As of now I retrive images from memory, but I'd like to avoid writing them to memory in first place and feed FFMPEG directly from memory.

    


    I tried accord-framework.net and it works very well, but now I've switched to .NET 6 and it is not supported (the functionality I used is based on AForge.Video.FFMPEG, an archived project not supporting recent frameworks).

    


    Now as I understand it is possible to have FFMPEG to work on streams instead of images saved on disk. In this post there is a very nice example of doing it in Python.

    


    However I don't know how to do this on .NET 6 using System.Diagnostics.Process : From this post I undestand that I could have FFMPEG take images from standard input using the syntax

    


    -i -


    


    The problem is that I cannot write on standard input before the System.IO.Process (cmd.exe ... \C ffmpeg.exe .... ) has started (I get System.InvalidOperationException : "StandardIn has not been redirected"). However, as soon as such process start, since it find standard input empty, it ends immediately, so I cannot make it in time to fill standard input.

    


    My code looks like this :

    


            MemoryStream memStream = new MemoryStream();

        // Data acquisition
        [...]
        bitmap.Save(memStream, System.Drawing.Imaging.ImageFormat.Bmp);
        [...]

        string ffmpegArgument = "/C ffmpeg.exe -y -i - -c:v libx264 -crf 12 -pix_fmt yuv420p -c:a libvo_aacenc -b:a 128k [...];

        Process cmd = new Process();
        cmd.StartInfo.FileName = "cmd.exe";
        cmd.StartInfo.Arguments = ffmpegArgument;
        cmd.StartInfo.UseShellExecute = false;
        cmd.StartInfo.RedirectStandardInput = true;
        cmd.Start();
        cmd.StandardInput.Write(memStream);


    


    Thanks to everyone who will answer.