
Recherche avancée
Médias (1)
-
La conservation du net art au musée. Les stratégies à l’œuvre
26 mai 2011
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (54)
-
Multilang : améliorer l’interface pour les blocs multilingues
18 février 2011, parMultilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela. -
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 -
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
Sur d’autres sites (11155)
-
How to extract video clip from larger video based on specific time and duration
26 juillet 2022, par user19019404I have video clips that get created. Each video is recorded for 5 minutes and starts at a time e.g. 10:01:20 to 10:06:19 then the next video from 10:06:20 etc. These videos are recorded at a specific frame rate, be it 5 frames or 30 frames (its dependent on the platform making the recording). The net result is NOT a 5 minute video clip but might be a 2 minute video clip (where everyone moves very quickly in the view as a result of the frame rates). I cannot restrict a 1 to 1 recording as these are generated by external systems.


I need to extract specific portions out of the video. For example I need to extract from 10:03:10 to 10:03:35 (25 seconds). This would equate to 10 seconds into the video up to 14 seconds into the video, in those 4 seconds of video, 25 real world seconds are displayed.


My question is do you have any guidance as to how I can calculate that each second of recording actually means 10 or 12 seconds in real life, therefore go to this frame and record to this frame for example.


I have been looking at cv2.CAP_PROP_FPS to get the video frame rates, CAP_PROP_POS_MSEC and CAP_PROP_FRAME_COUNT and believe the answer might lie there, but not sure.


The thinking being if I work out the frame rate of the video, the total frames then I can divide the one by the other to get to how many frames make up real world seconds (this is where I fail). This way I can run from frame to frame as a result.


Thank you


-
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


-
How to put a video inside a frame and record whole thing as a video ?
7 octobre 2024, par crysisI have a video. I want to create a new video such that the video plays inside a frame similar to this screenshot. Loom recording does this. Most of the screen recorders do this.




This screenshot is of the video. This is done in most of the screen recorders. Here is what I'm thinking


- 

- render video on a canvas with the background.
- Play the video
- Use mediarecorder API to record a new video.








I don't have good understanding of frontend development. Is that how it is generally done or I need to use ffmpeg ? I would really appreciate any guidance here.