
Recherche avancée
Médias (91)
-
Head down (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Echoplex (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Discipline (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Letting you (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
1 000 000 (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
999 999 (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
Autres articles (93)
-
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 -
Les formats acceptés
28 janvier 2010, parLes commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
ffmpeg -codecs ffmpeg -formats
Les format videos acceptés en entrée
Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
Les formats vidéos de sortie possibles
Dans un premier temps on (...) -
MediaSPIP Player : problèmes potentiels
22 février 2011, parLe lecteur ne fonctionne pas sur Internet Explorer
Sur Internet Explorer (8 et 7 au moins), le plugin utilise le lecteur Flash flowplayer pour lire vidéos et son. Si le lecteur ne semble pas fonctionner, cela peut venir de la configuration du mod_deflate d’Apache.
Si dans la configuration de ce module Apache vous avez une ligne qui ressemble à la suivante, essayez de la supprimer ou de la commenter pour voir si le lecteur fonctionne correctement : /** * GeSHi (C) 2004 - 2007 Nigel McNie, (...)
Sur d’autres sites (10994)
-
Saving Video From URL as MP3 in Firebase Storage
4 janvier 2024, par Christopher FrydryckI am working on a problem I have been stumped on the past couple days. I am using Node.js with Express (v4.18.2) to eventually create a Firebase deployment that can take in a video URL and output an audio mp3 to the Firebase Firestore. I have made some progress, but am still unsuccessful in some areas.


I cannot save the file locally using fs, but for this example I have shown that it works with FS. I am successfully saving a local .mp3 file.


First a few functions I have :


async function downloadVideo(videoUrl) {
 try {
 const response = await axios.get(videoUrl, {
 responseType: 'stream',
 });
 
 if (response.status === 200) {
 return response.data;
 } else {
 throw new Error('Failed to fetch the video');
 }
 } catch (error) {
 throw new Error('Error fetching the video: ' + error.message);
 }
 }



async function extractAudioFromVideo(videoUrl) {
 try {
 const videoStream = await downloadVideo(videoUrl);
 
 // Create a PassThrough stream to pipe the video data
 const passThrough = new PassThrough();
 videoStream.pipe(passThrough);

 const outputFile = 'output.mp3';
 const outputStream = fs.createWriteStream(outputFile);
 
 return new Promise((resolve, reject) => {
 const audioBuffers = [];

 passThrough.on('data', chunk => {
 audioBuffers.push(chunk)
 outputStream.write(chunk); // Write chunks to a local file
 });
 
 passThrough.on('error', err => {
 reject(err);
 });
 

 ffmpeg()
 .input(passThrough)
 .output('/dev/null') // Null output as a placeholder
 .outputOptions('-vn') // Extract audio only
 .noVideo()
 .audioQuality(0)
 .audioCodec('libmp3lame') // Set audio codec
 .format('mp3')
 .on('end', () => {
 const audioBuffer = Buffer.concat(audioBuffers)
 if (audioBuffer.length > 0) {
 resolve(audioBuffer);
 } else {
 reject(new Error('Empty audio buffer'));
 }
 })
 .on('error', err => reject(err))
 .run();
 })
 } catch (error) {
 throw new Error('Error extracting audio: ' + error.message);
 }
 }



async function saveAudioToFirebase(audioBuffer, fileName) {
 try {
 let storage = admin.storage()
 let storageRef = storage.bucket(serviceAccount.storage_bucket_content)
 const file = storageRef.file(fileName) // Specify the desired file name here

 const renamedFileName = fileName.replace(/\.[^/.]+$/, '.mp3'); // Change the file extension to .mp3
 
 await file.save(audioBuffer, {
 metadata: {
 contentType: 'audio/mpeg', // Adjust the content type as needed
 },
 });

 await file.setMetadata({
 contentType: 'audio/mpeg'
 })

 await file.move(renamedFileName); // Rename the file with the .mp3 extension
 
 console.log('Audio saved to Firebase Storage.');
 } catch (error) {
 console.error('Error saving audio to Firebase Storage:', error);
 }
 }




What works :


- 

- Downloading the video via Axios
- Saving to Firebase storage (no intializing or pointer issues to Firebase)
- Outputting a local .mp3 file called "output.mp3"
- I am able to log the result of
extractAudioFromVideo
and get a buffer logged in my terminal










What doesn't work :


- 

- Saving a file to Firebase Storage that is an .mp3. It says ".mp3" in the url and it has a content type of 'audio/mpeg' but it is in fact an .mp4. Still has video and plays video in the browser window.




I am willing to use other libraries like tmp if suggested and the solution works.


-
Unable to play video from firebase cloud storage download url on Iphone Safari [closed]
26 janvier 2024, par Acid CodergetDownloadURL(ref)
 .then(url => {
 //... save the url to state
 })



front end : React



 <source src="{videoURL}" type="video/mp4"></source>
 



work fine on PC and Android, but on Iphone Safari, only 1 out of 10 videos can be played




all video are from the same source, going through same compression, from mp4 to mp4


import ffmpeg from 'fluent-ffmpeg'

 ffmpeg(inputPath)
 .output(outputPath)
 .videoCodec('libx264')
 .audioCodec('aac')
 .on('end', () => {
 // ...
 })
 .on('error', err => {
 // ...
 })
 .run()



-
aarch64 : Manually tweak vertical alignment/indentation in tx_float_neon.S
17 octobre 2023, par Martin Storsjöaarch64 : Manually tweak vertical alignment/indentation in tx_float_neon.S
Favour left aligned columns over right aligned columns.
In principle either style should be ok, but some of the cases
easily lead to incorrect indentation in the surrounding code (see
a couple of cases fixed up in the preceding patch), and show up in
automatic indentation correction attempts.Signed-off-by : Martin Storsjö <martin@martin.st>