
Recherche avancée
Médias (1)
-
SPIP - plugins - embed code - Exemple
2 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
Autres articles (81)
-
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 (...) -
Organiser par catégorie
17 mai 2013, parDans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...) -
Récupération d’informations sur le site maître à l’installation d’une instance
26 novembre 2010, parUtilité
Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...)
Sur d’autres sites (4275)
-
OpenCV write jpeg buffer into Popen object
5 novembre 2017, par M LeonardI am doing some image operations on a numpy array via OpenCV. These images are then being baked out to jpeg, then ingested into FFMPEG to make a video. However, baking it out to a file is not very efficient. I would like to stream this directly into FFMPEG. In theory, it would look something like this :
p = Popen(['/usr/local/bin/ffmpeg', '-s', '1920x1080',
'-pix_fmt', 'yuvj420p',
'-y',
'-f', 'image2pipe',
'-vcodec', 'mjpeg',
'-r', self.fps,
'-i', '-',
'-r', self.fps,
'-f', 'mp4',
'-vcodec', 'libx264',
'-preset', 'fast',
# '-crf', '26',
'output/{}.mp4'.format(self.animation_name)], stdin=PIPE)
image_resize = cv.resize(self.original_image, (0, 0), fx=zoom, fy=zoom)
M = np.float32([[1, 0, x_total], [0, 1, y_total]])
image_offset = cv.warpAffine(image_resize, M, (self.original_image_width, self.original_image_width))
image = image_offset[0:self.output_raster_height, 0:self.output_raster_width].copy()
cv.imwrite(p.stdin, image) # this doesn't actually work, but that's the idea...I’ve been able to achieve this with Pillow using this setup :
p = Popen(['/usr/local/bin/ffmpeg', '-s', '1920x1080',
'-pix_fmt', 'yuvj420p',
'-y',
'-f', 'image2pipe',
'-vcodec', 'mjpeg',
'-r', self.fps,
'-i', '-',
'-r', self.fps,
'-f', 'mp4',
'-vcodec', 'libx264',
'-preset', 'fast',
# '-crf', '26',
'output/{}.mp4'.format(self.animation_name)], stdin=PIPE)
image_resize = self.original_image.resize((resize_width, resize_height), resample=PIL.Image.BICUBIC)
image_offset = ImageChops.offset(image_resize, xoffset=int(x_total), yoffset=int(y_total))
image = image_offset.crop((0, 0, self.output_raster_width, self.output_raster_height))
image.save(p.stdin, 'JPEG')So, my question is :
How would I write an OpenCV Jpeg buffer into the p.stdin object like it’s being done in the Pillow version ?
-
avformat/AVFormatContext : Move fields down to match the fork
9 juillet 2013, par Michael Niedermayeravformat/AVFormatContext : Move fields down to match the fork
avconv uses private and internal fields from libavformat, we thus must
match the layout even of the fields marked non public.
Otherwise ffmpegs libavformat could not be used as a dropin replacement
on debian/ubuntuThe current soname of libavformat was not part of any release nor are any
fields marked public moved thus in theory
no installed shared lib ABI breakage should occur. Still the need for this
change is unfortunate and chilling.
If you installed shared libs from a recent development version of libavformat
that is more recent than the last release. You probably want to check or rebuild
applications that linked to it.minor versions of avformat & avdevice are bumped to allow detecting this
as both use the updated structSigned-off-by : Michael Niedermayer <michaelni@gmx.at>
-
Prevent suspend event when streaming video via HTML video tag
24 septembre 2014, par jasongullicksonI seem to be having the opposite problem of most people who are streaming video using the HTML video tag ; I’m saturating the client with data.
When playing a long video served via ffserver (webm container) everything works great but eventually the browser (Chrome in this case) will begin throwing "suspend" events. After a number of these ( 50-100), a "stalled" event will fire and playback will stop.
I believe the problem is that once Chrome has buffered a certain amount of video it goes into "suspend" and stops downloading more data. I’ve tested this theory by throttling the speed at which video data is delivered, and if I keep the delivered frame rate close to the playback rate, I can prevent this from happening, but of course deliberately holding back server performance isn’t ideal.
What I’m looking for is either a way to suppress this "suspend" behavior altogether, or alternatively a way to respond to the event that prevents the eventual "stalled" state.
Presumably the browser at some point exits the "suspend" state and begins requesting data again, but I haven’t actually observed this occurring. I’m using a chain of mpeg2 -> ffmpeg -> ffserver to stream the video so if the browser is attempting to resume loading data I don’t see the request in my application. I could use a proxy or a sniffer to watch for the traffic but I would expect that maybe there is an ffserver log that can tell me the same thing ? In any event if it’s attempting to resume the download it’s failing, and there’s no indication server-side that there’s a reason for the request to fail (in fact I can pull up the same video feed from ffserver and see it playing correctly).
So I feel like I’ve isolated this to a client-side playback issue, and one where the browser is voluntarily giving up on loading the data, but I’m not sure how to convince it to "not do that", or at least attempt to resume when it runs the buffer dry.