
Recherche avancée
Médias (17)
-
Matmos - Action at a Distance
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
DJ Dolores - Oslodum 2004 (includes (cc) sample of “Oslodum” by Gilberto Gil)
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Danger Mouse & Jemini - What U Sittin’ On ? (starring Cee Lo and Tha Alkaholiks)
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Cornelius - Wataridori 2
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
The Rapture - Sister Saviour (Blackstrobe Remix)
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Chuck D with Fine Arts Militia - No Meaning No
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (63)
-
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 (...) -
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
Support audio et vidéo HTML5
10 avril 2011MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)
Sur d’autres sites (9507)
-
Obtaining frames from IP Camera with low latency
5 février 2023, par Russ1337I am currently using this command to get frames from my RTSP stream and reading frames from stdout :


ffmpeg -nostdin -rtsp_transport tcp -i -pix_fmt bgr24 -an -vcodec rawvideo -f rawvideo -



However, I would like to get the same latency as when I see it via ffplay :


ffplay -fflags nobuffer -flags low_delay -tune zerolatency -framedrop -rtsp_transport tcp 



or when I play it via VLC Media > Open Network Stream with :network_caching=300ms.


I would like to know what other parameters I can use with my ffmpeg command to get an equivalent (or better) result compared to the ffplay command.


I have made references from : How to dump raw RTSP stream to file ?, Open CV RTSP camera buffer lag, How to pipe output from ffmpeg using python ?, bad ffmpeg performace compared to ffplay and VLC, How to minimize the delay in a live streaming with ffmpeg


My current implmentation :


FFMPEG_CMD = "ffmpeg -nostdin -rtsp_transport tcp -i -pix_fmt bgr24 -an -vcodec rawvideo -f rawvideo -".split(" ")
WIDTH = 2560
HEIGHT = 1440

process = subprocess.Popen(FFMPEG_CMD, stdout=subprocess.PIPE, stderr=subprocess.DEVNULL)

while True:
 raw_frame = process.stdout.read(WIDTH*HEIGHT*3)
 frame = np.frombuffer(raw_frame, np.uint8) 
 frame = frame.reshape((HEIGHT, WIDTH, 3))

 <do stuff="stuff" with="with" frame="frame"></do> show frame etc.>



Thanks for reading.



ffmpeg
command I am now using for < 1s latency.

ffmpeg -nostdin -flags low_delay -rtsp_transport tcp -i -pix_fmt bgr24 -an -vcodec rawvideo -f rawvideo -




Implementation with suggestion(s) from Answers :


import subprocess
import numpy as np

FFMPEG_CMD = "ffmpeg -nostdin -flags low_delay -rtsp_transport tcp -i -pix_fmt bgr24 -an -vcodec rawvideo -f rawvideo -".split(" ")
WIDTH = 2560
HEIGHT = 1440

process = subprocess.Popen(FFMPEG_CMD, stdout=subprocess.PIPE, stderr=subprocess.DEVNULL)

raw_frame = np.empty((HEIGHT, WIDTH, 3), np.uint8) 
frame_bytes = memoryview(raw_frame).cast("B")

while process.poll() is None:
 process.stdout.readinto(frame_bytes)
 frame = raw_frame.reshape((HEIGHT, WIDTH, 3))

 <do stuff="stuff" with="with" frame="frame"></do> show frame etc.>



-
avformat/avisynth : fix fallbacks for four frameprops
27 février 2022, par Stephen Hutchinsonavformat/avisynth : fix fallbacks for four frameprops
If _FieldBased, _Matrix, _ColorRange, or _ChromaLocation haven't
been set, that absence would be interpreted as 0, leading to those
being set to case 0 instead of default. There is no case 0 for
_Primaries and _Transfer, so those were correctly falling back
to the default case.Signed-off-by : Stephen Hutchinson <qyot27@gmail.com>
-
avformat/avisynth : remove unused variable 'frameprop'
19 février 2022, par Stephen Hutchinson