
Recherche avancée
Autres articles (72)
-
Participer à sa traduction
10 avril 2011Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
Actuellement MediaSPIP n’est disponible qu’en français et (...) -
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
Emballe médias : à quoi cela sert ?
4 février 2011, parCe plugin vise à gérer des sites de mise en ligne de documents de tous types.
Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;
Sur d’autres sites (8335)
-
ffmpeg only works 2 instances
31 janvier 2023, par AlexI have 3 usb web cameras. Im using Windows 7.




And I need to create 3 video streams :


ffmpeg -f dshow -i video="Full HD webcam" -vcodec libx264 -tune zerolatency -threads 0 -b 900k -f mpegts udp ://localhost:1234


ffmpeg -f dshow -i video=”@device_pnp_~?\usb#vid_1908&pid_2311&mi_00#8&134fde2a&0&0000#65e8773d-8f56-11d0-a3b9-00a0c9223196\global” -vcodec libx264 -tune zerolatency -threads 0 -b 900k -f mpegts udp ://localhost:1233


ffmpeg -f dshow -i video="@device_pnp_~?\usb#vid_1908&pid_2311&mi_00#8&962d85&0&0000#65e8773d-8f56-11d0-a3b9-00a0c9223196\global" -vcodec libx264 -tune zerolatency -threads 0 -b 900k -f mpegts udp ://localhost:1232


But only works 2 any instances of video streams. When I try to create third video stream I get error :




Can anybody help me, please ?


i tried to create 3 video streams, but could only create 2 instances of ffmpeg process.


-
A process' child doesn't get killed from killing the parent process
2 avril 2022, par ImpasseI am developing an Electron application. In this application, I am spawning a Python process with a file's path as an argument, and the file itself is then passed to ffmpeg (through the ffmpeg-python module) and then goes through some Tensorflow functions.


I am trying to handle the case in which the user closes the Electron app while the whole background process is going. From my tests though, it seems like ffmpeg's process stays up no matter what. I'm on Windows and I'm looking at the task manager and I'm not sure what's going on : when closing the Electron app's window, sometimes ffmpeg.exe will be a single process, some other times it will stay in an Electron processes group.


I have noticed that if I kill Electron's process through closing the window, the python process will also close once ffmpeg has done its work, so I guess this is half-working. The problem is, ffmpeg is doing intensive stuff and if the user needs to close the window, then the ffmpeg process also NEEDS to be killed. But I can't achieve that in any way.


I have tried a couple things, so I'll paste some code :


main.js


// retrieve video data
ipcMain.handle('get-games', async (event, arg) => {
 const spawn = require('child_process').spawn;
 const pythonProcess = spawn('python', ["./backend/predict_games.py", arg]);

 // sets pythonProcess as a global variable to be accessed when quitting the app
 global.childProcess = pythonProcess;

 return new Promise((resolve, reject) => {
 let result = "";

 pythonProcess.stdout.on('data', async (data) => {
 data = String(data);

 if (data.startsWith("{"))
 result = JSON.parse(data);
 });

 pythonProcess.on('close', () => {
 resolve(result);
 })

 pythonProcess.on('error', (err) => {
 reject(err);
 });
 })
});

app.on('before-quit', function () {
 global.childProcess.kill('SIGINT');
});



predict_games.py
(the ffmpeg part)

def convert_video_to_frames(fps, input_file):
 # a few useful directories
 local_dir = os.path.dirname(os.path.abspath(__file__))
 snapshots_dir = fr"{local_dir}/snapshots/{input_file.stem}"

 # creates snapshots folder if it doesn't exist
 Path(snapshots_dir).mkdir(parents=True, exist_ok=True)

print(f"Processing: {Path(fr'{input_file}')}")
try:
 (
 ffmpeg.input(Path(input_file))
 .filter("fps", fps=fps)
 .output(f"{snapshots_dir}/%d.jpg", s="426x240", start_number=0)
 .run(capture_stdout=True, capture_stderr=True)
 )
except ffmpeg.Error as e:
 print("stdout:", e.stdout.decode("utf8"))
 print("stderr:", e.stderr.decode("utf8"))



Does anyone have any clue ?


-
Evolution #3488 : Stocker globalement toutes les requetes passées
24 juillet 2015, par cedric -un compteur global de requêtes, optionnel ou non ça parait pas mal, car a contrario stocker toutes les requêtes peut vite être lourd.
J’ai vu des sites avec plus de 2000 requete sur une page, et ça alourdirait inutilement la conso mémoire.
Sinon je pense aussi qu’ajouter ton petit bandeau dans le plugin dev serait une bonne idée