Recherche avancée

Médias (0)

Mot : - Tags -/performance

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

Autres articles (100)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

Sur d’autres sites (13866)

  • php ffmpeg pipe multicast issue

    15 septembre 2024, par cihan ranx

    I have four video in my server. I want to display all of them same page but video tag url is a php page.
Actually it is working. But when i tried to open new tab again index.php then display only 2 video. When waiting to long display all of them. Why i must to waiting and why server take long time to response ? I have ubuntu 20.04 and 8gb ram. If you copy link and open it multiple tab same time you will see the issue.

    


    Video Link is :
index.php

    


    index.php

    


    &#xA;<video src="test.php?video_name=1.mp4" type="video/mp4" autoplay="autoplay" class="video"></video>&#xA;<video src="test.php?video_name=2.mp4" type="video/mp4" autoplay="autoplay" class="video"></video>&#xA;<video src="test.php?video_name=3.mp4" type="video/mp4" autoplay="autoplay" class="video"></video>&#xA;<video src="test.php?video_name=4.mp4" type="video/mp4" autoplay="autoplay" class="video"></video>&#xA;&#xA;

    &#xA;

    test.php

    &#xA;

    &lt;?&#xA;$video_name=$_GET[&#x27;video_name&#x27;];&#xA;header(&#x27;Content-type: video/mp4&#x27;);&#xA;passthru(&#x27;ffmpeg -i &#x27;.$video_name.&#x27;.mp4 -c copy -movflags frag_keyframe&#x2B;empty_moov&#x2B;faststart -f mp4 pipe:&#x27;);&#xA;exit();&#xA;?>&#xA;

    &#xA;

    If close one of tab display all. I think ffmpeg or passthru function make server busy. It must be opened all tab without waiting. It is very importing for me. I developed online camera view system and serving to html with passthru and ffmpeg. But if user open multiple tab server not responding or take long time.

    &#xA;

  • How to read data from subprocess pipe ffmpeg without block in line when rtsp is disconnected

    22 août 2024, par Jester48

    I have some problems with the ffmpeg subprocess in python where I open an RTSP stream.&#xA;One of them is the long time of reading a frame from the pipe, I noticed that reading one frame takes about 250ms -> most of this time is the select.select() line which can take just that long. This makes opening the stream above 4FPS problematic. When I do not use the select.select function, the reading speed is normal, but when the connection to RTSP streams is lost, the program gets stuck in the self.pipe.stdout.read() function and does not exit from it. Is it possible to protect yourself in case of missing data in pipe.stdout.read() without losing frame reading speed as in the case of select.select() ?

    &#xA;

    class RTSPReceiver(threading.Thread):&#xA;    def __init__(self):&#xA;        threading.Thread.__init__(self)&#xA;        self.ffmpeg_cmd = [&#x27;ffmpeg&#x27;,&#x27;-loglevel&#x27;,&#x27;quiet&#x27;,&#x27;-rtsp_transport&#x27; ,&#x27;tcp&#x27;,&#x27;-nostdin&#x27;,&#x27;-i&#x27;,f&#x27;rtsp://{config("LOGIN")}:{config("PASS")}@{config("HOST")}/stream=0&#x27;,&#x27;-fflags&#x27;,&#x27;nobuffer&#x27;,&#x27;-flags&#x27;,&#x27;low_delay&#x27;,&#x27;-map&#x27;,&#x27;0:0&#x27;,&#x27;-r&#x27;,f&#x27;{config("RTSP_FPS")}&#x27;,&#x27;-f&#x27;,&#x27;rawvideo&#x27;,&#x27;-pix_fmt&#x27;,&#x27;bgr24&#x27;,&#x27;-&#x27;]&#xA;        self.img_w = 2688&#xA;        self.img_h = 1520&#xA;        self.image = None&#xA;        self.pipe = subprocess.Popen(self.ffmpeg_cmd, stdout=subprocess.PIPE)&#xA;&#xA;    def reconnect(self) -> None:&#xA;        if self.pipe:&#xA;            self.pipe.terminate()&#xA;            self.pipe.kill()&#xA;            self.pipe.wait()&#xA;&#xA;    def run(self) -> None:&#xA;        self.connect()&#xA;        while True:&#xA;            try:&#xA;                ready, _, _ = select.select([self.pipe.stdout], [], [], 15.0)&#xA;                if ready:&#xA;                    raw_image = self.pipe.stdout.read(self.img_w*self.img_h*3)&#xA;                    if raw_image:&#xA;                        with self.lock:&#xA;                            self.image = np.frombuffer(raw_image, dtype=np.uint8).reshape(self.img_h, self.img_w, 3)&#xA;                else:&#xA;                    self.reconnect()&#xA;            except Exception as e:&#xA;                self.connect()&#xA;

    &#xA;

  • Creating an MP4 video with ffmpeg from timestamped JPEG frames received by pipe

    16 août 2024, par Denis Fevralev

    I need to create a video with following conditions :

    &#xA;

      &#xA;
    1. It can only be made from a sequence of JPEG files, each having its timestamp (milliseconds) in the name. The images' durations are not the same, they differ, so i cannot just concat them all and use particular fps
    2. &#xA;

    3. There are several tar archives with the images sequences, the archives are kind of huge so I read them from a file storage as an async steam of data and cannot save them on the disk as files. The frames are read and right away put to ffmpeg running process stdin.
    4. &#xA;

    5. The images may have different aspect ratios so it's required to make a NxN square and scale the images to fit in with filling the empty space with pads
    6. &#xA;

    &#xA;

    My current solution :

    &#xA;

    ffmpeg -r $someFpsValue -i - -vf scale=w=$w:h=$h:force_original_aspect_ratio=1,pad=$w:$h:(((ow-iw)/2)):(((oh-ih)/2)) result.mp4&#xA;

    &#xA;

    As you can see, it doesn't let me concat the images with correct durations. I know that the concat demuxer can solve the problem of merging images with different durations but seemingly it doesn't work with pipe protocol. I have an idea of evaluating an average fps as (videoFramesCount) / (videoDurationInSeconds) for -r argument, or maybe even counting the fps for each video's second and then getting the avg, but maybe there is a more reliable solution (like some concat demuxer analogue) ?

    &#xA;

    Thanks in advance :)

    &#xA;