Recherche avancée

Médias (91)

Autres articles (54)

  • (Dés)Activation de fonctionnalités (plugins)

    18 février 2011, par

    Pour gérer l’ajout et la suppression de fonctionnalités supplémentaires (ou plugins), MediaSPIP utilise à partir de la version 0.2 SVP.
    SVP permet l’activation facile de plugins depuis l’espace de configuration de MediaSPIP.
    Pour y accéder, il suffit de se rendre dans l’espace de configuration puis de se rendre sur la page "Gestion des plugins".
    MediaSPIP est fourni par défaut avec l’ensemble des plugins dits "compatibles", ils ont été testés et intégrés afin de fonctionner parfaitement avec chaque (...)

  • Activation de l’inscription des visiteurs

    12 avril 2011, par

    Il est également possible d’activer l’inscription des visiteurs ce qui permettra à tout un chacun d’ouvrir soit même un compte sur le canal en question dans le cadre de projets ouverts par exemple.
    Pour ce faire, il suffit d’aller dans l’espace de configuration du site en choisissant le sous menus "Gestion des utilisateurs". Le premier formulaire visible correspond à cette fonctionnalité.
    Par défaut, MediaSPIP a créé lors de son initialisation un élément de menu dans le menu du haut de la page menant (...)

  • MediaSPIP : Modification des droits de création d’objets et de publication définitive

    11 novembre 2010, par

    Par défaut, MediaSPIP permet de créer 5 types d’objets.
    Toujours par défaut les droits de création et de publication définitive de ces objets sont réservés aux administrateurs, mais ils sont bien entendu configurables par les webmestres.
    Ces droits sont ainsi bloqués pour plusieurs raisons : parce que le fait d’autoriser à publier doit être la volonté du webmestre pas de l’ensemble de la plateforme et donc ne pas être un choix par défaut ; parce qu’avoir un compte peut servir à autre choses également, (...)

Sur d’autres sites (11608)

  • avcodec/mpegvideo_enc : Reduce stack usage

    18 mai, par Andreas Rheinhardt
    avcodec/mpegvideo_enc : Reduce stack usage
    

    Multiple PutBitContexts are used when encoding partitioned
    frames. When there are multiple candidates for macroblock types,
    multiple states (namely the state before encoding the current MB,
    the best state among the ones already tried and the current one)
    need to be kept ; duplicates of the PutBitContexts are among this
    state. The temporary buffers for them are kept on the stack
    in encode_thread() and their size is quite generous (MAX_MB_SIZE
    - 3000 bytes). This commit uses tighter bounds, bringing the
    size of the pb2 buffer down to 15 bytes.

    Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@outlook.com>

    • [DH] libavcodec/mpeg4videoenc.h
    • [DH] libavcodec/mpegvideo_enc.c
  • Unable to retrieve video stream from RTSP URL inside Docker container

    6 février, par birdalugur

    I have a FastAPI application running inside a Docker container that is trying to stream video from an RTSP camera URL using OpenCV. The setup works fine locally, but when running inside Docker, the /video endpoint does not return a stream and times out. Below are the details of the issue.

    &#xA;

    Docker Setup :

    &#xA;

    Dockerfile :

    &#xA;

    FROM python:3.10.12&#xA;&#xA;RUN apt-get update &amp;&amp; apt-get install -y \&#xA;    libgl1-mesa-glx \&#xA;    libglib2.0-0&#xA;&#xA;WORKDIR /app&#xA;&#xA;COPY requirements.txt .&#xA;RUN pip install --no-cache-dir -r requirements.txt&#xA;&#xA;COPY . .&#xA;&#xA;CMD ["python", "app.py"]&#xA;&#xA;

    &#xA;

      &#xA;
    • Docker Compose :
    • &#xA;

    &#xA;

    services:&#xA;  api:&#xA;    build: ./api&#xA;    ports:&#xA;      - "8000:8000"&#xA;    depends_on:&#xA;      - redis&#xA;      - mongo&#xA;    networks:&#xA;      - app_network&#xA;    volumes:&#xA;      - ./api:/app&#xA;    environment:&#xA;      - REDIS_HOST=redis&#xA;      - REDIS_PORT=6379&#xA;      - MONGO_URI=mongodb://mongo:27017/app_db&#xA;&#xA;  frontend:&#xA;    build: ./frontend&#xA;    ports:&#xA;      - "3000:3000"&#xA;    depends_on:&#xA;      - api&#xA;    networks:&#xA;      - app_network&#xA;    volumes:&#xA;      - ./frontend:/app&#xA;      - /app/node_modules&#xA;&#xA;redis:&#xA;    image: "redis:alpine"&#xA;    restart: always&#xA;    networks:&#xA;      - app_network&#xA;    volumes:&#xA;      - redis_data:/data&#xA;&#xA;  mongo:&#xA;    image: "mongo:latest"&#xA;    restart: always&#xA;    networks:&#xA;      - app_network&#xA;    volumes:&#xA;      - mongo_data:/data/db&#xA;&#xA;networks:&#xA;  app_network:&#xA;    driver: bridge&#xA;&#xA;volumes:&#xA;  redis_data:&#xA;  mongo_data:&#xA;&#xA;

    &#xA;

    Issue :

    &#xA;

    When I try to access the /video endpoint, the following warnings appear :

    &#xA;

    [ WARN:0@46.518] global cap_ffmpeg_impl.hpp:453 _opencv_ffmpeg_interrupt_callback Stream timeout triggered after 30037.268665 ms&#xA;

    &#xA;

    However, locally, the RTSP stream works fine using OpenCV with the same code.

    &#xA;

    Additional Information :

    &#xA;

      &#xA;
    1. Network : The Docker container can successfully ping the camera IP (10.100.10.94).
    2. &#xA;

    3. Local Video : I can read frames from a local video file without issues.
    4. &#xA;

    5. RTSP Stream : I am able to access the RTSP stream directly using OpenCV locally, but not inside the Docker container.
    6. &#xA;

    &#xA;

    Code :

    &#xA;

    Here's the relevant part of the code in my api/app.py :

    &#xA;

    import cv2&#xA;from fastapi import FastAPI&#xA;from fastapi.responses import StreamingResponse&#xA;&#xA;RTSP_URL = "rtsp://deneme:155115@10.100.10.94:554/axis-media/media.amp?adjustablelivestream=1&amp;fps=10"&#xA;&#xA;def generate_frames():&#xA;    cap = cv2.VideoCapture(RTSP_URL)&#xA;    if not cap.isOpened():&#xA;        print("Failed to connect to RTSP stream.")&#xA;        return&#xA;&#xA;    while True:&#xA;        success, frame = cap.read()&#xA;        if not success:&#xA;            print("Failed to capture frame.")&#xA;            break&#xA;&#xA;        _, buffer = cv2.imencode(".jpg", frame)&#xA;        frame_bytes = buffer.tobytes()&#xA;&#xA;        yield (&#xA;            b"--frame\r\n" b"Content-Type: image/jpeg\r\n\r\n" &#x2B; frame_bytes &#x2B; b"\r\n"&#xA;        )&#xA;&#xA;    cap.release()&#xA;&#xA;@app.get("/video")&#xA;async def video_feed():&#xA;    """Return MJPEG stream to the browser."""&#xA;    return StreamingResponse(&#xA;        generate_frames(), media_type="multipart/x-mixed-replace; boundary=frame"&#xA;    )&#xA;

    &#xA;

    Has anyone faced similar issues or have suggestions on how to resolve this ?

    &#xA;


    &#xA;
  • Gstreamer video increases latency with decreased FPS

    19 novembre 2024, par Ri Di

    I am using RPI 5 to stream the video :

    &#xA;

    rpicam-vid -t 0 --camera 0 --nopreview --mode 2304:1296:10:P --codec yuv420 &#xA;           --width 640 --height 360 --framerate 10 --rotation 0 &#xA;           --autofocus-mode manual --inline --listen -o - | &#xA;     ffmpeg -f rawvideo -pix_fmt yuv420p -s:v 640x360 -r 10 -i /dev/stdin &#xA;            -c:v libx264 -preset ultrafast -tune zerolatency -maxrate 300k &#xA;            -bufsize 50k -g 30000 -f mpegts tcp://192.168.0.147:1234&#xA;

    &#xA;

    View it with :

    &#xA;

    gst-launch-1.0 -v tcpserversrc host=0.0.0.0 port=1234 ! queue ! &#xA;    tsdemux ! h264parse ! avdec_h264 ! videorate ! video/x-raw,framerate=10/1 !  &#xA;    videoconvert ! autovideosink sync=false&#xA;

    &#xA;

    Problem is that with 10 FPS I get around 2s of latency ! While 56 or 120 FPS results in below 300ms latency.

    &#xA;

    Is the problem in sender or reader side ? Or both ?

    &#xA;

    I am not planning to use the 10 FPS, its only for demonstration of problem. But I would like to get lower latency at 56 FPS - just like at 120 FPS (around 80-100 ms difference) or maybe even better, as it seems to get lower with higher FPS.

    &#xA;

    Maybe there is some kind of buffering parameter which holds frames ?

    &#xA;

    (of course, when testing with higher FPS I change both numbers in sender and the one in reader command. The camera is v3 RPI official)

    &#xA;

    Also I'd like to mention that same thing happens with ffplay :

    &#xA;

    ffplay -i -probesize 3000 tcp://0.0.0.0:1234/?listen&#xA;

    &#xA;