Recherche avancée

Médias (3)

Mot : - Tags -/spip

Autres articles (84)

  • Contribute to documentation

    13 avril 2011

    Documentation is vital to the development of improved technical capabilities.
    MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
    To contribute, register to the project users’ mailing (...)

  • MediaSPIP en mode privé (Intranet)

    17 septembre 2013, par

    À partir de la version 0.3, un canal de MediaSPIP peut devenir privé, bloqué à toute personne non identifiée grâce au plugin "Intranet/extranet".
    Le plugin Intranet/extranet, lorsqu’il est activé, permet de bloquer l’accès au canal à tout visiteur non identifié, l’empêchant d’accéder au contenu en le redirigeant systématiquement vers le formulaire d’identification.
    Ce système peut être particulièrement utile pour certaines utilisations comme : Atelier de travail avec des enfants dont le contenu ne doit pas (...)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

Sur d’autres sites (10768)

  • RTP/UDP or RTSP for accessing stream and passing frame to OpenCV ?

    15 janvier 2020, par xor31four

    Apologies for my inexperience in this domain..I am trying to implement an algorithm that detects the occurrence of a particular event in real-time. The particular event is a consecutive growth of motion across 5 consecutive frames.. almost analogous to a growing sphere or beach ball.

    I am able to detect the event on pre-recorded video that is in .avi format (mjpeg frames) with EmguCV (C# wrapper for OpenCV). The method I use is based on background subtraction.. outlined here https://www.pyimagesearch.com/2015/05/25/basic-motion-detection-and-tracking-with-python-and-opencv/

    The problem is that the live video transport stream is usually in the format rtsp ://XXX.XXX.X.XX/stream1.sdp

    EmguCV on windows can’t decode this h.264 stream for some reason that I am still trying to figure out ... I tried the same url using Python and OpenCV and received a non-matching transport in server reply message similar to this one "Nonmatching transport in server reply" when cv2.VideoCapture rtsp onvif camera, how to fix ? - the answer didn’t work for me.

    I can open the rtsp URL using VLCPlayer and its corresponding C# library - from my understanding it is using ffmpeg, although I may be wrong. FFmpeg on the command line can access the stream.

    EmguCV also uses ffmpeg as a backend which is why I am very confused as to why it can’t open the rtsp URL.

    Here is an image of the module tree when VLCPlayer opens the rtsp stream : enter image description here.

    From my understanding, EmguCV doesn’t use live555 or avcodec..

    I’ve noticed that if I change the streamer configuration to use UDP or RTP rather than RTSP, EmguCV can access the h.264 URL, although the URL is now in the format rtp/udp ://XXX.XXX.X.XX:XXXXX - no .sdp extension.

    I would highly appreciate if someone with more experience can give me some pointers.
    I have a great deal to learn even though I have spent a lot of time researching this topic. In regards to the detections remaining successful would it be recommended to process H.264 frames with possible distortion or MJPEG frames ?

    I can’t afford a delay longer than 1-2 seconds, and would ideally like to continue with the current method used to detect the event.

    From my current understanding, here are the routes I can take :

    1) Use RTP/UDP and process h.264 video using EmguCV - there is some distortion in the video when there is a large amount of movement.. I also receive several h264 error messages during the stream

    [h264 @ 00000124f13a5080] SPS unavailable in decode_picture_timing
    [h264 @ 00000124f13a5080] non-existing PPS 0 referenced
    [h264 @ 00000124f13a5080] decode_slice_header error
    [h264 @ 00000124f13a5080] no frame!
    [h264 @ 00000124f135eac0] Missing reference picture, default is 0
    [h264 @ 00000124f135eac0] decode_slice_header error
    [h264 @ 00000124f13a5080] cbp too large (6929) at 11 20
    [h264 @ 00000124f13a5080] error while decoding MB 11 20
    [h264 @ 00000124f135eac0] top block unavailable for requested intra mode -1
    [h264 @ 00000124f135eac0] error while decoding MB 3 0
    [h264 @ 00000124f124e580] cbp too large (96) at 33 0
    [h264 @ 00000124f124e580] error while decoding MB 33 0
    [h264 @ 00000124f19940c0] top block unavailable for requested intra mode
    [h264 @ 00000124f19940c0] error while decoding MB 1 1

    H.264 video

    2) Keep RTSP protocol, use libav to decode the frames and pass to EmguCV.. following this answer https://www.raspberrypi.org/forums/viewtopic.php?t=83127 .. I’m not sure if this will introduce a huge delay

    3) Keep RTSP protocol, use ffmpeg to convert h.264 stream to MJPEG and access this URL instead ?
    Again I’m not sure if this will be a feasible solution if it will introduce a great delay.

    4) Use a Linux machine rather than windows and configure a gstreamer backend - not ideal

    Thank you for taking the time to read this post.

  • How to Stream With FFmpeg and NGINX RTMP

    2 octobre 2023, par willowen100

    I'm trying to stream from OBS (open broadcast software) on my Windows PC to NGINX+RTMP also installed on the same PC. I have set a bitrate of 20,000Kbps in OBS which will be the foundation bitrate for the multiple streams I aim to setup within NGINX.

    



    I would like to be able to stream into NGINX and then on-the-fly use FFmpeg to transcode the stream to comply with the streaming site I intend to broadcast to, for example Twitch.tv.

    



    I can view my stream via VLC if I use the network path rtmp ://localhost/live/test. However, when I'm on Twitch's inspector site to see if my stream is coming thorugh, I'm not receiving anything. I have no idea if my FFmpeg is working or there is something wrong with my NGINX configuration below.

    



    If someone could shed some light of where I might be going wrong please that would be greatly appreciated.

    



    nginx.conf

    



    #user www-data;
worker_processes  1;

events {
    worker_connections  1024;
}

http { 
    server_tokens off;

    include mime.types;
    default_type application/octet-stream;
    sendfile off;
    keepalive_timeout 65;

    server {
        listen 80;
        server_name localhost;

        # make a internal server page and put it in html
        error_page 500 502 503 504 /50x.html;
        location = /50x.html {
            root html;
        }
    }
}

rtmp {
    server {
        listen 1935;
        chunk_size 8192;

        application live {
            live on;
            #interleave on;
            #wait_video on;
            record off;

            # Twitch
            exec_push "D:\Users\Will\Downloads\ffmpeg\bin"
                -i rtmp://localhost/source/$name 
                -c:v libx264 
                -c:a copy 
                -preset veryfast 
                -profile:v high 
                -level 4.1
                -x264-params "nal-hrd=cbr" "opencl=true"
                -b:v 8000K 
                -minrate 8000K 
                -maxrate 8000K
                -keyint 2
                -s 1920x1080
                push rtmp://live-lhr03.twitch.tv/app/STREAM_KEY;
        }
    }
}


    



    Many thanks

    



    UPDATE 1

    



    For the sake of simplicity I'm testing OBS, NGINX and FFmpeg all on the same physical computer, a Windows PC. Once everything is working I will port NGINX and FFmpeg to my Linux PC.

    



    I'm using a pre-compiled version of NGINX with the RTMP module baked in. I've also downloaded the latest FFmpeg libraries which I have set a path environment variable for in Windows so that FFmpeg commands can be called in CommandPrompt/PowerShell.

    



    Here's the path I'm trying to take :-

    



    OBS is encoding x264 at 20,000Kbps and it's destination is a RTMP application in NGINX called 'live'. From here I want to encode the one stream derived from OBS into several smaller bandwidth streams so that I can comply with streaming service's requirements such as Twitch and Mixer for example.

    



    At the end of the FFmpeg parameters do I push the output directly to Twitch or take the output of FFmpeg and send back into a second RTMP application on NGINX and then push out to Twitch ?

    



    One advantage of pushing FFmpeg's output back into NGINX before going off to the external stream service is I can open the FFmpeg transcoded stream through a RTMP supported player such as VLC for example, allowing me to view the compressed output.

    



    Another question I have is, can the FFmpeg parameters be put on separate lines or do they have to all in one line ?

    



    This is a really good site I have been referring back to

    



    https://blog.twitch.tv/en/2017/10/10/live-video-transmuxing-transcoding-f-fmpeg-vs-twitch-transcoder-part-i-489c1c125f28/

    


  • PyArcade (Pyglet) python3 Help needed

    8 juillet 2024, par F4zi

    Python 3.8.1

    


    using python-arcade and linux manjaro os

    


    This project is a multiplayer game built with python arcade

    


    I get these errors while running :

    


    class Client(arcade.Window):

    def __init__(
        self, 
        width: int, 
        height: int, 
        title: str = 'Immortals'
    ) -> None:
        super().__init__(width, height, title=title)


    


    Traceback (most recent call last):&#xA;  File "/home/iddos/Documents/Github/Python/immortals/immortals/main.py", line 42, in <module>&#xA;    main(**config[&#x27;resolution&#x27;])&#xA;  File "/home/iddos/Documents/Github/Python/immortals/immortals/main.py", line 20, in main&#xA;    window = Immortals(*args, **kwargs)&#xA;  File "/home/iddos/Documents/Github/Python/immortals/immortals/core/client.py", line 40, in __init__&#xA;    super().__init__(width, height, title=title)&#xA;  File "/home/iddos/.local/share/virtualenvs/immortals-SS7Euna6/lib/python3.8/site-packages/arcade/application.py", line 70, in __init__&#xA;    super().__init__(width=width, height=height, caption=title,&#xA;  File "/home/iddos/.local/share/virtualenvs/immortals-SS7Euna6/lib/python3.8/site-packages/pyglet/window/xlib/__init__.py", line 171, in __init__&#xA;    super(XlibWindow, self).__init__(*args, **kwargs)&#xA;  File "/home/iddos/.local/share/virtualenvs/immortals-SS7Euna6/lib/python3.8/site-packages/pyglet/window/__init__.py", line 642, in __init__&#xA;    self._create()&#xA;  File "/home/iddos/.local/share/virtualenvs/immortals-SS7Euna6/lib/python3.8/site-packages/arcade/application.py", line 469, in _create&#xA;    super()._create()&#xA;  File "/home/iddos/.local/share/virtualenvs/immortals-SS7Euna6/lib/python3.8/site-packages/pyglet/window/xlib/__init__.py", line 352, in _create&#xA;    self.set_caption(self._caption)&#xA;  File "/home/iddos/.local/share/virtualenvs/immortals-SS7Euna6/lib/python3.8/site-packages/arcade/application.py", line 481, in set_caption&#xA;    super().set_caption(caption)&#xA;  File "/home/iddos/.local/share/virtualenvs/immortals-SS7Euna6/lib/python3.8/site-packages/pyglet/window/xlib/__init__.py", line 511, in set_caption&#xA;    self._set_text_property(&#x27;_NET_WM_NAME&#x27;, caption)&#xA;  File "/home/iddos/.local/share/virtualenvs/immortals-SS7Euna6/lib/python3.8/site-packages/pyglet/window/xlib/__init__.py", line 785, in _set_text_property&#xA;    raise XlibException(&#x27;Could not create UTF8 text property&#x27;)&#xA;pyglet.window.xlib.XlibException: Could not create UTF8 text property&#xA;</module>

    &#xA;

    And also this ffmpeg not found error, altough ffmpeg is in /usr/bin/ffmpeg

    &#xA;

    Unable to find match for ffmpeg sound library at expected location: /home/iddos/.local/share/virtualenvs/immortals-SS7Euna6/lib64/python3.8/site-packages/pyglet_ffmpeg2/linux_x86_64/libavfilter.so.7.&#xA;

    &#xA;

    I would love to get some help from you guys since i didn't find a solution for this yet.

    &#xA;