
Recherche avancée
Autres articles (94)
-
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 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 (...) -
Multilang : améliorer l’interface pour les blocs multilingues
18 février 2011, parMultilang 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. -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...)
Sur d’autres sites (8948)
-
x86 : AVX2 high bit-depth vsad
16 avril 2013, par Henrik Gramner -
What is the least CPU-intensive format to pass high resolution frames from ffmpeg to openCV ? [closed]
3 octobre 2024, par DocticoI'm developing an application to process a high-resolution (2560x1440) RTSP stream from an IP camera using OpenCV.


What I've Tried


- 

-
OpenCV's
VideoCapture
:

- 

- Performance was poor, even with
CAP_PROP_FFMPEG
.




- Performance was poor, even with
-
FFmpeg with MJPEG :


- 

- Decoded the stream as MJPEG and created OpenCV Mats from the
image2pipe
JPEG buffer. - Resulted in lower CPU usage for OpenCV but higher for FFmpeg.






- Decoded the stream as MJPEG and created OpenCV Mats from the
-
Current Approach :


- 

- Output raw video in YUV420p format from FFmpeg.
- Construct OpenCV Mats from each frame buffer.
- Achieves low FFmpeg CPU usage and moderately high OpenCV CPU usage.
















Current Implementation


import subprocess
import cv2
import numpy as np

def stream_rtsp(rtsp_url):
 # FFmpeg command to stream RTSP and output to pipe
 ffmpeg_command = [
 'ffmpeg',
 '-hwaccel', 'auto',
 '-i', rtsp_url,
 '-pix_fmt', 'yuv420p', # Use YUV420p format
 '-vcodec', 'rawvideo',
 '-an', # Disable audio
 '-sn', # Disable subtitles
 '-f', 'rawvideo',
 '-' # Output to pipe
 ]

 # Start FFmpeg process
 process = subprocess.Popen(ffmpeg_command, stdout=subprocess.PIPE, stderr=subprocess.DEVNULL)

 # Frame dimensions
 width, height = 2560, 1440
 frame_size = width * height * 3 // 2 # YUV420p uses 1.5 bytes per pixel

 while True:
 # Read raw video frame from FFmpeg output
 raw_frame = process.stdout.read(frame_size)
 if not raw_frame:
 break

 yuv = np.frombuffer(raw_frame, np.uint8).reshape((height * 3 // 2, width))
 frame = cv2.cvtColor(yuv, cv2.COLOR_YUV2BGR_I420)
 
 processFrame(frame)

 # Clean up
 process.terminate()
 cv2.destroyAllWindows()



Question


Are there any other ways to improve performance when processing high-resolution frames from an RTSP stream ?


-
-
avs : support for AviSynth+ high bit-depth pixel formats
18 août 2016, par Anton Mitrofanov