
Recherche avancée
Médias (1)
-
Video d’abeille en portrait
14 mai 2011, par
Mis à jour : Février 2012
Langue : français
Type : Video
Autres articles (48)
-
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 (...) -
Contribute to documentation
13 avril 2011Documentation is vital to the development of improved technical capabilities.
MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
To contribute, register to the project users’ mailing (...) -
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 (...)
Sur d’autres sites (8285)
-
Input seeking for frame at specified timestamp with Py-AV
9 décembre 2019, par neonScarecrowI have a project already using Py-AV and am trying to replicate a specific ffmpeg command. The goal is to get a frame roughly around the specified timestamp.
Here’s the ffmpeg commmand :
https://trac.ffmpeg.org/wiki/Seekingffmpeg -ss 14 -i https://some_url.mp4 -frames:v 1 frame_at_14_seconds.jpg
Here’s my code :
#return one frame around 14 seconds into the movie
target_sec = 14
container = av.open('https://some_url.mp4', 'r')
container.streams.video[0].thread_type = 'AUTO'
video_stream = next(s for s in container.streams if s.type == 'video')
time_base = float(video_stream.time_base)
target_timestamp = int(target_sec / time_base) + video_stream.start_time
video_stream.seek(target_timestamp)
for frame in container.decode(video_stream):
frame.to_image().save('frame_at_14_seconds.jpg')
breakAdditionally, I have found any documentation about this, but does anyone know if either command (ffmpeg/av.open) is downloading the entire file to a tmp file behind the scenes. I’m looking for a less memory-intensive way to read a frame for every second in an up to 60 second video.
-
getting a `InValid URL` when I send a voice message
9 septembre 2023, par AmmadWhen I try to send voice messages I always get invalid url error with. I am using whisper to convert the audio to text but for some reason I cannot seem to pass the file to the whisper. It worked when I used this in java script but not in typescript for some reason


async function createFile(path: string): Promise<file> {
 const response = await fetch(path);
 const data = await response.blob();
 
 // Extract file name from the path
 const fileName = path.split('/').pop() || 'unknown';
 
 // Extract file extension and determine MIME type
 const fileExtension = fileName.split('.').pop()?.toLowerCase() || '';
 const mimeTypes: Record = {
 'mp3': 'audio/mpeg',
 // Add more mappings as needed
 };
 const fileType = mimeTypes[fileExtension] || 'application/octet-stream';
 
 const metadata = {
 type: fileType
 };
 
 return new File([data], fileName, metadata);
}

async function sendAudioForTranscription(file_path:string) {
 try {
 
 // const audioData = fs.createReadStream(file_path);
 const audioFile = await createFile(file_path)

 const response = await openai.createTranscription(audioFile, "whisper-1");
 const transcribed = response.data.text;

 return transcribed;
 } catch (error) {
 console.error("Error transcribing the audio:", error);
 return null;
 }
}
</file>


I am new to this so any help would be appreciated. This is the error


Error transcribing the audio: TypeError: Failed to parse URL from src\audio_files\false_xxxxxxxxx8@c.us_B161BC6FA04DB01B8B31F5E0F83EDAD5.mp3
 at Object.fetch (node:internal/deps/undici/undici:11576:11)
 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
 [cause]: TypeError [ERR_INVALID_URL]: Invalid URL
 at new NodeError (node:internal/errors:405:5)
 at new URL (node:internal/url:778:13)
 at new Request (node:internal/deps/undici/undici:7132:25)
 at fetch2 (node:internal/deps/undici/undici:10715:25)
 at Object.fetch (node:internal/deps/undici/undici:11574:18)
 at fetch (node:internal/process/pre_execution:270:25)
 at C:\Users\Ammad Ali\Documents\Documents\alex-whatsapp-bot\build\openai\transcript.js:28:32
 at C:\Users\Ammad Ali\Documents\Documents\alex-whatsapp-bot\build\openai\transcript.js:8:71
 at new Promise (<anonymous>)
 at __awaiter (C:\Users\Ammad Ali\Documents\Documents\alex-whatsapp-bot\build\openai\transcript.js:4:12)
 at createFile (C:\Users\Ammad Ali\Documents\Documents\alex-whatsapp-bot\build\openai\transcript.js:27:12)
 at Object.<anonymous> (C:\Users\Ammad Ali\Documents\Documents\alex-whatsapp-bot\build\openai\transcript.js:49:37)
 at Generator.next (<anonymous>)
 at C:\Users\Ammad Ali\Documents\Documents\alex-whatsapp-bot\build\openai\transcript.js:8:71
 at new Promise (<anonymous>) {
 input: 'src\\audio_files\\false_xxxxxxxxx8@c.us_B161BC6FA04DB01B8B31F5E0F83EDAD5.mp3',
 code: 'ERR_INVALID_URL'
 }
}
</anonymous></anonymous></anonymous></anonymous>


To get a response back in voice message


-
Anomalie #4425 (Nouveau) : Des bots chinois comptabilisés dans les statistiques
21 janvier 2020Bonjour,
Je reporte ici un message trouvé sur la liste user.
Le fichier /ecrire/inc_version.php inclut un certain nombre de bots à ne pas comptabiliser. Je suggère d’ajouter une liste de bots chinois et russes :
Mb2345Browser
LieBaoFast
zh-CN
MicroMessenger
zh_CN
KinzaCes bots explosent littéralement mes stats avec des dizaines de milliers de visites comptabilisées.
J’ai fait l’ajout manuellement mais la prochaine mise-à-jour de SPIP les effacera.
Merci
Guilain
Au passage, je suggère de faire comme avec : https://zone.spip.net/trac/spip-zone/browser/spip-zone/_core_/plugins/statistiques/engines-list.txt
Donc, une liste qui soit maintenue dans un fichier texte, facile à mettre à jour.