
Recherche avancée
Autres articles (71)
-
Les vidéos
21 avril 2011, parComme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...) -
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
De près ou de loin...
29 avril 2011, parIls ne le savent pas forcément mais sont indispensables
MediaSPIP est un logiciel open-source, il se base sur d’autres logiciels, et d’autres logiciels lui sont également nécessaires pour fonctionner ... Les personnes ici listées ne savent pas forcément qu’elles ont un rôle important dans le développement, elles ont apporté leur connaissances dans le cadre de la création d’une partie de ces éléments nécessaires ou ont écrit des articles permettant de comprendre certaines choses... il semble indispensable (...)
Sur d’autres sites (8051)
-
I am phasing a issue of " ffmpeg attribute 'error'" in my project which is a voice command assistant using GPT 3.5 Turbo and BING API [closed]
2 mai 2023, par Rudraksh Singh BhadauriaI ma working on a pyhton project as want to make a program which can work as fluent as GPT and can also adapt latest news through BING API but after trying a lot I am stuck with a issue where "Error transcribing audio : module 'ffmpeg' has no attribute 'Error'" I have tried installing these ffmpeg files again and again in the way already mentioned in stack overflow but for me its not working.


I have tried using :
installing ffmpeg-pyhton in my terminal and also ffmpeg module and also I have reinstalled the whole files and also have put them in my environment variables.
If anyone could help me to sort this problem out then it will be great help.


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


-
dashenc : add support for assigning streams to AdaptationSets
29 janvier 2017, par Peter Großedashenc : add support for assigning streams to AdaptationSets
Also makes sure all streams are assigned to exactly one AdaptationSet.
This patch is originally based partially on code by Vignesh Venkatasubramanian.
Signed-off-by : Peter Große <pegro@friiks.de>
Signed-off-by : Martin Storsjö <martin@martin.st>