
Recherche avancée
Médias (91)
-
DJ Z-trip - Victory Lap : The Obama Mix Pt. 2
15 septembre 2011
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Matmos - Action at a Distance
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
DJ Dolores - Oslodum 2004 (includes (cc) sample of “Oslodum” by Gilberto Gil)
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Danger Mouse & Jemini - What U Sittin’ On ? (starring Cee Lo and Tha Alkaholiks)
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Cornelius - Wataridori 2
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
The Rapture - Sister Saviour (Blackstrobe Remix)
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (74)
-
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" (...) -
Le profil des utilisateurs
12 avril 2011, parChaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)
Sur d’autres sites (9982)
-
Revision 4831 : on ajoute ts et mts comme documents vidéos avec des infos supp donc ...
28 janvier 2011, par kent1 — Logon ajoute ts et mts comme documents vidéos avec des infos supp donc Petits ajouts également pour mieux styler les blocs de docs
-
Firebase Function using ffmpeg successful with emulator, out of memory when deployed
25 septembre 2024, par flyingL123I need some help. I have a
.mov
file in Firebase Storage. The file is 25 seconds long and106 MB
. I wrote a callable Firebase function that usesffmpeg
to convert the file to a.mp4
file and save it to Firebase Storage. When I test the function using the Functions emulator, it works without issue. The function returns successfully and I see the converted file appear in storage. The converted video is about6 MB
and plays correctly when dowloaded.

When I deploy this function and run it in production on the exact same video file, the function fails with :




'Memory limit of 256 MiB exceeded with 407 MiB used. Consider
increasing the memory limit, see
https://cloud.google.com/functions/docs/configuring/memory'




As a test, I edited the function and changed its allocated memory to
1 GiB
. Then I test the function again in production. Now I receive the same error :



'Memory limit of 1024 MiB exceeded with 1029 MiB used. Consider
increasing the memory limit, see
https://cloud.google.com/functions/docs/configuring/memory'




This is my function code :


const {initializeApp} = require("firebase-admin/app");
const {onCall} = require("firebase-functions/v2/https");
const { getStorage, getDownloadURL } = require('firebase-admin/storage');

initializeApp();

exports.convertVideo = onCall((request) => {
 const ffmpegPath = require('@ffmpeg-installer/ffmpeg').path;
 const ffmpeg = require('fluent-ffmpeg');
 ffmpeg.setFfmpegPath(ffmpegPath);
 const originalLocation = request.data.originalLocation;
 const convertedLocation = request.data.convertedLocation;
 const originalVideoFile = getStorage().bucket().file(originalLocation);
 const newVideoFile = getStorage().bucket().file(convertedLocation);

 return new Promise(async (resolve, reject) => {
 await originalVideoFile.download({destination: '/tmp/original'}).catch(console.error);
 
 ffmpeg('/tmp/original')
 .addOutputOptions('-movflags +frag_keyframe+separate_moof+omit_tfhd_offset+empty_moov')
 .format('mp4')
 .on('error', (err) => {
 console.log(err);
 })
 .pipe(newVideoFile.createWriteStream())
 .on('error', (err) => {
 console.log(err);
 })
 .on('close', async () => {
 fs.unlink('/tmp/original', (err) => {
 if (err) throw err;
 });
 const convertedUrl = await getDownloadURL(newVideoFile);
 resolve([convertedLocation, convertedUrl]);
 });
 });
});



I am sending a test request to the Function emulator using curl :


curl -d '{"data": {"originalLocation": "customer_videos/original_video.mov", "convertedLocation": "customer_videos/converted/original_video.mp4"}}' -H "Content-Type: application/json" http://127.0.0.1:5001/foo/bar/convertVideo



This works correctly. I send the same request to the deployed function, and receive the out of memory error.


curl -d '{"data": {"originalLocation": "customer_videos/original_video.mov", "convertedLocation": "customer_videos/converted/original_video.mp4"}}' -H "Content-Type: application/json" https://convertvideo-foobarbaz-uc.a.run.ap



Can somebody please help me understand why this is happening ? I didn't think I was doing anything too memory intensive, especially since it works correctly using the emulator.


-
what is AV_SAMPLE_FMT_FLT
21 décembre 2020, par GoluSwrContext *swr_ctx = swr_alloc_set_opts(NULL, 
 AV_CH_LAYOUT_STEREO,
 AV_SAMPLE_FMT_FLT,
 sample_rate,
 pCodecParameters->channel_layout, 
 
 pCodecParameters->format,
 pCodecParameters->sample_rate, 
 0,
 NULL);



what exactly AV_SAMPLE_FMT_FLT is ? i already read docs but i want to know that what is float layout means in the context of Audio. How actually binary data of audio will look in that format.