Recherche avancée
Médias (91)
-
Richard Stallman et le logiciel libre
19 octobre 2011, par
Mis à jour : Mai 2013
Langue : français
Type : Texte
-
Stereo master soundtrack
17 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Audio
-
Elephants Dream - Cover of the soundtrack
17 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Image
-
#7 Ambience
16 octobre 2011, par
Mis à jour : Juin 2015
Langue : English
Type : Audio
-
#6 Teaser Music
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#5 End Title
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
Autres articles (3)
-
Pas question de marché, de cloud etc...
10 avril 2011Le vocabulaire utilisé sur ce site essaie d’éviter toute référence à la mode qui fleurit allègrement
sur le web 2.0 et dans les entreprises qui en vivent.
Vous êtes donc invité à bannir l’utilisation des termes "Brand", "Cloud", "Marché" etc...
Notre motivation est avant tout de créer un outil simple, accessible à pour tout le monde, favorisant
le partage de créations sur Internet et permettant aux auteurs de garder une autonomie optimale.
Aucun "contrat Gold ou Premium" n’est donc prévu, aucun (...) -
Selection of projects using MediaSPIP
2 mai 2011, parThe examples below are representative elements of MediaSPIP specific uses for specific projects.
MediaSPIP farm @ Infini
The non profit organizationInfini develops hospitality activities, internet access point, training, realizing innovative projects in the field of information and communication technologies and Communication, and hosting of websites. It plays a unique and prominent role in the Brest (France) area, at the national level, among the half-dozen such association. Its members (...) -
Keeping control of your media in your hands
13 avril 2011, parThe vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)
Sur d’autres sites (500)
-
Empty error object produced by ffprobe in Google Cloud Function
20 septembre 2023, par willbattelUpdate : After more digging I found an open GitHub issue where others appear to be encountering the same behavior.



I have a Google Cloud Function (2nd gen) in which I am trying to use
ffprobe
to get metadata from a video file stored in a Google Cloud Storage bucket. It is my understanding that I can generate a signed url and, by passing that directly to ffprobe, avoid loading the entire video file into memory. I generate a signed url and pass it toffprobe
, and then parse the output like so :

import ffmpeg from 'fluent-ffmpeg'
import ffprobeStatic from 'ffprobe-static'

async function getVideoData(srcFile: File) {
 const [signedUrl] = await srcFile.getSignedUrl({
 action: 'read',
 expires: (new Date()).getMilliseconds() + 60_000,
 })

 const videoData: ffmpeg.FfprobeData = await new Promise((resolve, reject) => {
 ffmpeg.setFfprobePath(ffprobeStatic.path)
 ffmpeg.ffprobe(signedUrl, (err, data) => {
 if (err) {
 reject(err)
 }
 else {
 resolve(data)
 }
 })
 })

 return videoData
}



This code works (with the same signed URL) locally on my macOS machine, but does not when deployed in a 2nd generation Google Cloud Function. In the latter case,
data
isundefined
anderr
is{}
.

My main question is how to properly use
ffprobe
in 2nd gen Google Cloud Functions. I have tried to research this but documentation on ffmpeg/ffprobe on GCP is sparse. I'm also trying to figure out exactly why the error objecterr
is empty...it's not very helpful 😅

Additional info :


- 

- Environment : Google Cloud Functions 2nd Gen
- Runtime : Node 20
- "ffprobe-static" : "3.1.0",
- "fluent-ffmpeg" : "2.1.2"










Thanks in advance.


-
Firebase cloud function fluent-ffmpeg resize and convert
16 août 2023, par RomeoIn the firebase cloud functions I upload a video in
.webm
format, I want to resize it and convert it to.mp4
.
I am able to generate a file, and reupload the generated file to the firebase storage bucket.

Problem is : the file is unreadable.
How can I assess the file integrity and attributes before and after conversion ?


this is the code of my firebase cloud function :


/**
 * When a video is uploaded in the Storage bucket,
 * generate a resizing and if it's a webm file convert in mp4.
 */

export const resizeVideo = functions.storage.object().onFinalize(async (object) => {
 console.log(`Processing file: ${object.name}`);
 const tempFilePath = path.join(os.tmpdir(), object.name + "");
 const resizedTempFilePath = path.join(os.tmpdir(), "resized_" + object.name?.replace("webm", "mp4"));
 if (object.name?.includes("resized_")) {
 console.log("Already resized");
 return false;
 }
 return new Promise(()=>{
 ffmpeg(tempFilePath)
 .format("mp4")
 .toFormat("mp4")
 .size("1920x1080")
 .videoCodec("libx264")
 .audioCodec("aac")
 .audioBitrate("128k")
 .audioChannels(2)
 .withAudioBitrate("128k")
 .withAudioChannels(2)
 .withAudioCodec("aac")
 .withVideoCodec("libx264")
 .withVideoBitrate("1000k")
 .withSize("1920x1080")
 .outputOptions([
 '-c:v libx264',
 '-c:a aac',
 '-pix_fmt yuv420p',
 '-profile:v main',
 '-level 3.1',
 '-movflags +faststart',
 '-max_muxing_queue_size 9999',
 ])
 .output(resizedTempFilePath)
 .save(resizedTempFilePath)
 .on("error", function(err: { message: any; }, stdout: any, stderr: any) {
 console.log("Error on resize ", err.message);
 console.log("stdout ", stdout);
 console.log("stderr ", stderr);
 })
 .on("end", function() {
 console.log("Finished resizing! ", resizedTempFilePath);
 fs.readdirSync(os.tmpdir()).forEach((file) =>{
 if (file === ("resized_" + object.name?.replace("webm", "mp4"))){
 console.log(`${resizedTempFilePath} created!`);
 admin.storage().bucket().upload(path.join(os.tmpdir(), "resized_" + object.name), {
 destination: "resized_" + object.name?.replace("webm", "mp4"),
 metadata: {
 contentType: "video/mp4",
 },
 }).then(() => {
 console.log(`Uploaded ${resizedTempFilePath}`);
 }
 ).catch((err) => {
 console.log(`Error on upload ${resizedTempFilePath}`, err);
 }
 );
 }
 });
 });
 });
});



-
Convert webm to mp4 on with spawn ffmpeg on firebase cloud function returning failed with code 1
11 novembre 2022, par findevIn a google cloud function, i'm trying to convert a donwloaded .webm file from cloud storage to .mp4 format with this code


var mp4FilePath = path.join(os.tmpdir(), mediaId+'.mp4')
await spawn('ffmpeg', [
 '-i',
 downloadedFilePath,
 '-c copy',
 mp4FilePath,
]); 



I keep receiving the following error


Error: `ffmpeg -i /var/folders/h2/p35j0p3s4zq9ktyqhdx3qb9h0000gn/T/ghE1HQP1x9m2XLaxEx43_raw.webm -c copy /var/folders/h2/p35j0p3s4zq9ktyqhdx3qb9h0000gn/T/test.mp4` failed with code 1



I'm able to create thumbnails so the source file is downloaded correctly.