
Recherche avancée
Médias (91)
-
Richard Stallman et le logiciel libre
19 octobre 2011, par
Mis à jour : Mai 2013
Langue : français
Type : Texte
-
Stereo master soundtrack
17 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Audio
-
Elephants Dream - Cover of the soundtrack
17 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Image
-
#7 Ambience
16 octobre 2011, par
Mis à jour : Juin 2015
Langue : English
Type : Audio
-
#6 Teaser Music
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#5 End Title
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
Autres articles (65)
-
Formulaire personnalisable
21 juin 2013, parCette page présente les champs disponibles dans le formulaire de publication d’un média et il indique les différents champs qu’on peut ajouter. Formulaire de création d’un Media
Dans le cas d’un document de type média, les champs proposés par défaut sont : Texte Activer/Désactiver le forum ( on peut désactiver l’invite au commentaire pour chaque article ) Licence Ajout/suppression d’auteurs Tags
On peut modifier ce formulaire dans la partie :
Administration > Configuration des masques de formulaire. (...) -
Amélioration de la version de base
13 septembre 2013Jolie sélection multiple
Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...) -
Qu’est ce qu’un masque de formulaire
13 juin 2013, parUn masque de formulaire consiste en la personnalisation du formulaire de mise en ligne des médias, rubriques, actualités, éditoriaux et liens vers des sites.
Chaque formulaire de publication d’objet peut donc être personnalisé.
Pour accéder à la personnalisation des champs de formulaires, il est nécessaire d’aller dans l’administration de votre MediaSPIP puis de sélectionner "Configuration des masques de formulaires".
Sélectionnez ensuite le formulaire à modifier en cliquant sur sont type d’objet. (...)
Sur d’autres sites (9186)
-
h263dec : call get_format() on resolution changes
8 octobre 2014, par Rémi Denis-Courmont -
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 ?


-
-
FFprobe reading incorrect resolution value despite players rendering it correctly
28 octobre 2024, par BoehmiI'm creating a video from a stream with the help of FFMPEG and I also use FFPROBE to gather information for use on a status page like resolution, codecs et cetera.



When FFProbe parses my video for information, I get a resolution value of 544x576 (almost a square !), but an aspect ratio of 16:9.



These values are consistent on both the input stream and my saved video.



When I watch the video in the standard HTML5 Player, VLC or FFPLAY however, I get a video with the proportions of 16:9 and a resolution (measured using an image editing program) of 1024x576 that does look native and not stretched in any way.



Even if I re-encode the video using slightly different codecs, this incorrect resolution value persists, even though every player I use displays it correctly.



This is slightly inconvenient because I am relying on getting the correct resolution value from the video for further processing.



I'm also using a recent FFMPEG+FFPROBE version that was compiled on the 15th of July.



Is this a bug within FFMPEG or is there anything I'm doing wrong ?



Used command lines :



FFMPEG :



ffmpeg -i source -loglevel debug -vcodec copy -acodec copy -bsf:a aac_adtstoasc -movflags +faststart -t 360 -y video.mp4




FFPROBE (I parse the output of this directly and save the values) :



ffprobe -i source -show_format -show_streams 




FFProbe output :



width=544
height=576
coded_width=544
coded_height=576
has_b_frames=2
sample_aspect_ratio=32:17
display_aspect_ratio=16:9




I can see that the sample aspect ratio is different from the display aspect ratio, but how come the video looks proper in 16:9 when it's supposedly encoded at a near square resolution ?