
Recherche avancée
Médias (1)
-
Géodiversité
9 septembre 2011, par ,
Mis à jour : Août 2018
Langue : français
Type : Texte
Autres articles (37)
-
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 -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...) -
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 (6499)
-
How do i use multiple filters in FFMPEG ?
20 décembre 2022, par heikoI am trying to get the following done with FFMPEG :


- 

- Use 2 Filters in FFMPEG
- Run it for all .mp4 files in that folder.






Now, the second thing i have already done but for some reason when i am trying to use 2 filters it will only use the first one. The filters should


- 

- Speed up the video
- Change the Saturation and Brightness






I've already tried " ;" "," and " :" to seperate the filters but somehow its not working. Here is the code :


for %%a in ("*.mp4") do ffmpeg -i "%%a" -filter_complex "[0:v]setpts=0.87*PTS[v];[0:a]atempo=1.15[a]" -map "[v]" -map "[a];eq=brightness=0.06:saturation=2" output\%%~na.mp4"



-
Adding an audio track to a video using it's own audio as a source ?
29 novembre 2016, par user41997I have a video file with the following layout :
- Video
- DTS audio
What I would like to do is :
- Video
- AAC audio (converted from the DTS source)
- DTS audio
I can’t wrap my head around the FFMPEG command I would need to do this, though, since I would need to convert the DTS audio to AAC and then place it ahead of the DTS track. The reason for this is the PS4 media player currently doesn’t let you select audio tracks and it only plays the first one it sees. It doesn’t support DTS audio but I’d like to keep it around.
-
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 ?