
Recherche avancée
Médias (1)
-
The Great Big Beautiful Tomorrow
28 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Texte
Autres articles (60)
-
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 (...) -
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Creating farms of unique websites
13 avril 2011, parMediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)
Sur d’autres sites (5663)
-
Concat audio files then call create file
11 mai 2020, par bleepbloopbleepI am new and am trying to concat a folder of audio files and then stream the create file with ffmpeg in node.js.



I thought I could call the function that creates the file with await and then when it's done the code would continue allowing me to call the created file. However thats not whats happening. I am getting a "file undefined"



Main function



//CONCATS THE FILES
 await concatAudio(supportedFileTypes.supportedAudioTypes, `${path}${config[typeKey].audio_directory}`);

 // CALLS THE FILE CREATED FROM concatAudio
 const randomSong = await getRandomFileWithExtensionFromPath(
 supportedFileTypes.supportedAudioTypes,
 `${path}${config[typeKey].audio_final}`
 );




concatAudio function



var audioconcat = require('audioconcat');
const getRandomFileWithExtensionFromPath = require('./randomFile');
const find = require('find');

// Async Function to get a random file from a path
module.exports = async (extensions, path) => {
 // Find al of our files with the extensions
 let allFiles = [];

 extensions.forEach(extension => {
 allFiles = [...allFiles, ...find.fileSync(extension, path)];
 });

 await audioconcat(allFiles)
 .concat('./live-stream-radio/final/all.mp3')
 .on('start', function(command) {
 console.log('ffmpeg process started:', command);
 })
 .on('error', function(err, stdout, stderr) {
 console.error('Error:', err);
 console.error('ffmpeg stderr:', stderr);
 })
 .on('end', function(output) {
 console.error('Audio created in:', output);
 });

 // Return a random file

 // return '/Users/Semmes/Downloads/live-stream-radio-ffmpeg-builds/live-stream-radio/final/all.mp3';
};



-
Smartly concatenating gopro mp4 files - file-001.mp4 + file-002.mp4
12 décembre 2017, par molly78Hello much smarter than me people out there...
I have a folder of GoPro files which I have already renamed using this awesome utility : https://github.com/kcha/gopro_renamer
However, I now have a folder of 110 files which should make up about 50 continuous videos...
Some of which have only filename-001.mp4 parts, some are filename-001.mp4 and filename-002.mp4 parts. It could go on an on to say 10 parts per video, for argument sake.
I’d like to get a hand with a script that would scan the folder and then join all the parts together into a new file.
In windows 10 I know I can do a simple
copy /b "C:\Filename-001.mp4" + "C:\Filename-002.mp4" Filename.mp4
Just a bit lost how to loop thru this scenario with a (python is fine) script. I do not wish to re-encode them, simply join the parts that correspond to the base filename.
So go from files looking like
filename1-001.mp4 - 87 MB
filename2-001.mp4 - 100 MB
filename2-002.mp4 - 100 MB
filename2-003.mp4 - 22 MB
filename3-001.mp4 - 100 MB
filename3-002.mp4 - 34 MBafter concatenating the parts it would look like :
filename1.mp4 - 87 MB (nothing done other than rename)
filename2.mp4 - 222 MB (all joined)
filename3.mp4 - 134 MB (all joined)Your help is greatly appreciated.
-
Parsing file-like object into create_ffmpeg_player in discord.py not working
3 août 2018, par user4757174The API documentation for create_ffmpeg_player says it allows passing file-like objects into create_ffmpeg_player as it will be passed to stdin.
create_ffmpeg_player(filename, *, use_avconv=False, pipe=False, stderr=None, options=None, before_options=None, headers=None, after=None)
filename – The filename that ffmpeg will take and convert to PCM bytes. If pipe is True then this is a file-like object that is passed to the stdin of ffmpeg
here’s what I am inputting :
buffer = BytesIO()
c.setopt(c.WRITEDATA, buffer)
c.perform()
player = voice.create_ffmpeg_player(buffer,pipe=True)The PycURL object writes data to
buffer
which is the BytesIO object.Then I try to parse the file-like object into create_ffmpeg_player() but I get the following error :
Traceback (most recent call last):
File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\discord\client.py", line 307, in _run_event
yield from getattr(self, event)(*args, **kwargs)
File "test.py", line 116, in on_message
player = voice.create_ffmpeg_player(buffer,pipe=True)
File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\discord\voice_client.py", line 431, in create_ffmpeg_player
p = subprocess.Popen(args, stdin=stdin, stdout=subprocess.PIPE, stderr=stderr)
File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\subprocess.py", line 667, in __init__
errread, errwrite) = self._get_handles(stdin, stdout, stderr)
File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\subprocess.py", line 904, in _get_handles
p2cread = msvcrt.get_osfhandle(stdin.fileno())
io.UnsupportedOperation: filenoThe error shows me that somewhere in the stack, a routine is trying to get the fileno() of the object, but since this is not a real file, there is no file handle, or "fileno". For a temporary work-around I am creating a physical file on disk and parsing that file into the function, but for this program, the function will be run many times so doing physical read/writes is not practical. Is it possible to work around this, or at least create a file on memory with the ability to get/spoof a fileno ?