
Recherche avancée
Médias (1)
-
The Slip - Artworks
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
Autres articles (52)
-
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 (...) -
Les tâches Cron régulières de la ferme
1er décembre 2010, parLa gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
Le super Cron (gestion_mutu_super_cron)
Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...) -
Submit bugs and patches
13 avril 2011Unfortunately a software is never perfect.
If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
You may also (...)
Sur d’autres sites (4497)
-
For modifying MPEG-2 Part 4 video, which is the easiest library/approach can I use ?
17 décembre 2015, par liamzebedeeI’m trying to implement a video watermarking system which modifies a subset of individual pixels (i.e. the RGB values at sets of
x,y
). The base use case would be modifying an MP4, which consists of modifying the contained MPEG-2 Part 4 Video stream.I’ve done some research, and have found that it isn’t as simple as just modifying the raw frames, as the ubiquitous P-frames and B-frames rely on compressing the output by only storing the differences between frames.
I’m relatively technology-agnostic, I just want to find a solution. Which library/framework should I use (seems like ffmpeg for now) and which approach do I take ?
-
Decode h264 video bytes into JPEG frames in memory with ffmpeg
5 février 2024, par John KarkasI'm using python and ffmpeg (4.4.2) to generate a h264 video stream from images produced continuously from a process. I am aiming to send this stream over websocket connection and decode it to individual image frames at the receiving end, and emulate a stream by continuously pushing frames to an
<img style='max-width: 300px; max-height: 300px' />
tag in my HTML.

However, I cannot read images at the receiving end, after trying combinations of
rawvideo
input format,image2pipe
format, re-encoding the incoming stream withmjpeg
andpng
, etc. So I would be happy to know what the standard way of doing something like this would be.

At the source, I'm piping frames from a while loop into ffmpeg to assemble a h264 encoded video. My command is :


command = [
 'ffmpeg',
 '-f', 'rawvideo',
 '-pix_fmt', 'rgb24',
 '-s', f'{shape[1]}x{shape[0]}',
 '-re',
 '-i', 'pipe:',
 '-vcodec', 'h264',
 '-f', 'rawvideo',
 # '-vsync', 'vfr',
 '-hide_banner',
 '-loglevel', 'error',
 'pipe:'
 ]



At the receiving end of the websocket connection, I can store the images in storage by including :


command = [
 'ffmpeg',
 '-i', '-', # Read from stdin
 '-c:v', 'mjpeg',
 '-f', 'image2',
 '-hide_banner',
 '-loglevel', 'error',
 f'encoded/img_%d_encoded.jpg'
 ]



in my ffmpeg command.


But, I want to instead extract each individual frame coming in the pipe and load in my application, without saving them in storage. So basically, I want whatever is happening at by the
'encoded/img_%d_encoded.jpg'
line in ffmpeg, but allowing me to access each frame in the stdout subprocess pipe of an ffmpeg pipeline at the receiving end, running in its own thread.

- 

- What would be the most appropriate ffmpeg command to fulfil a use case like the above ? And how could it be tuned to be faster or have more quality ?
- Would I be able to read from the stdout buffer with
process.stdout.read(2560x1440x3)
for each frame ?






If you feel strongly about referring me to a more update version of ffmpeg, please do so.


PS : It is understandable this may not be the optimal way to create a stream. Nevertheless, I do not find there should be much complexity in this and the latency should be low. I could instead communicate JPEG images via the websocket and view them in my
<img style='max-width: 300px; max-height: 300px' />
tag, but I want to save on bandwidth and relay some computational effort at the receiving end.

-
Monitor multiple instances of same process
18 décembre 2013, par user3116597I'm trying to monitor multiple instances of the same process. I can't for the life of me do this without running into a problem.
All the examples I have seen so far on the internet involve me writing out the PID or monitoring the process itself. The issue is that if one instance fails, it doesn't mean all the rest have failed as well.
In order for me to write out the PID for each process it would mean I'd probably have to run each process with a short delay to record the correct, seeing as the way I need to record the PID is done through the process name being probed.
If I'm wrong on this, please correct me. But so far I haven't found a way to monitor each individual process, which all have the same name.
To add to the above, the processes are run in a batch script and each one is run in its own screen (ffmpeg would otherwise not be able to run in the background).
If anyone can point me vaguely in the right direction on how to do this in Linux I would really appreciate it. I read somewhere that it would be possible to set up symlinks which would then give me fake process names and that way I can monitor the 'fake' process name.