
Recherche avancée
Autres articles (27)
-
La file d’attente de SPIPmotion
28 novembre 2010, parUne file d’attente stockée dans la base de donnée
Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...) -
Support de tous types de médias
10 avril 2011Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)
-
Supporting all media types
13 avril 2011, parUnlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)
Sur d’autres sites (5399)
-
ffmpeg ignores input svg files resolution and produces 100x100 video [closed]
11 novembre 2024, par Francesco PotortìI have used this command for some years to produce .ogg files (or any other format) from a series of .svg files on Linux :


ffmpeg -y -r 1.2 -i %06d.svg -qscale:v 10 path.ogg


It has worked flawlessly until now, when it produces a video with 100x100 resolution, rather then the 1920x1080 resolution of the input files.


If I force the output resolution to be 1920x1080 using the
-s
option, the resulting video is a magnified version of the 100x100 video output I obtain without the-s
option. If I convert the svg files to png usinginkscape
everything is well, but I'd like to avoid making my workflow more complex.

Here you can find some of the .svg files.


Any ideas ?


-
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 ?


-
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 ?


-