
Recherche avancée
Médias (1)
-
The Great Big Beautiful Tomorrow
28 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Texte
Autres articles (76)
-
Organiser par catégorie
17 mai 2013, parDans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...) -
Récupération d’informations sur le site maître à l’installation d’une instance
26 novembre 2010, parUtilité
Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...) -
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 (5286)
-
avformat/mxfenc : Write Audio Ref Level for D10
6 avril 2018, par Michael Niedermayeravformat/mxfenc : Write Audio Ref Level for D10
Signed-off-by : Michael Niedermayer <michael@niedermayer.cc>
- [DH] libavformat/mxfenc.c
- [DH] tests/ref/fate/copy-trac4914
- [DH] tests/ref/fate/mxf-reel_name
- [DH] tests/ref/fate/time_base
- [DH] tests/ref/lavf/mxf
- [DH] tests/ref/lavf/mxf_d10
- [DH] tests/ref/lavf/mxf_dv25
- [DH] tests/ref/lavf/mxf_dvcpro50
- [DH] tests/ref/lavf/mxf_opatom
- [DH] tests/ref/lavf/mxf_opatom_audio
-
Downloading Youtube videos frames with FFMPEG without downloading the entire videos [closed]
11 mars 2023, par zulle99I'm wondering if it is possible to download youtube videos frames using FFMPEG and not opencv without downloading the entire videos first. I'm asking this since it is known that opencv is very slow doing this and takes a huge amount of time if the sequence of videos is big like in my use case.


-
Download youtube video as stream Readable object
26 décembre 2023, par Abraam Emadin this function it download youtube video as a file out.mp4 on hard disk i need to download it as a Readable Object to upload it


private async downloadVideo(videoId: string) {
// Buildin with nodejs
const cp = require('child_process');
const readline = require('readline');
// External modules
const ytdl = require('ytdl-core');
const ffmpeg = require('ffmpeg-static');
// Global constants
const ref = `https://www.youtube.com/watch?v=${videoId}`;
const tracker = {
 start: Date.now(),
 audio: { downloaded: 0, total: Infinity },
 video: { downloaded: 0, total: Infinity },
 merged: { frame: 0, speed: '0x', fps: 0 },
};

// Get audio and video streams
const audio = ytdl(ref, { quality: 'highestaudio' })
 .on('progress', (_, downloaded, total) => {
 tracker.audio = { downloaded, total };
 });
const video = ytdl(ref, { quality: 'highestvideo' })
 .on('progress', (_, downloaded, total) => {
 tracker.video = { downloaded, total };
 });

// Prepare the progress bar
let progressbarHandle = null;
const progressbarInterval = 1000;
const showProgress = () => {
 readline.cursorTo(process.stdout, 0);
 const toMB = i => (i / 1024 / 1024).toFixed(2);

 process.stdout.write(`Audio | ${(tracker.audio.downloaded / tracker.audio.total * 100).toFixed(2)}% processed `);
 process.stdout.write(`(${toMB(tracker.audio.downloaded)}MB of ${toMB(tracker.audio.total)}MB).${' '.repeat(10)}\n`);

 process.stdout.write(`Video | ${(tracker.video.downloaded / tracker.video.total * 100).toFixed(2)}% processed `);
 process.stdout.write(`(${toMB(tracker.video.downloaded)}MB of ${toMB(tracker.video.total)}MB).${' '.repeat(10)}\n`);

 process.stdout.write(`Merged | processing frame ${tracker.merged.frame} `);
 process.stdout.write(`(at ${tracker.merged.fps} fps => ${tracker.merged.speed}).${' '.repeat(10)}\n`);

 process.stdout.write(`running for: ${((Date.now() - tracker.start) / 1000 / 60).toFixed(2)} Minutes.`);
 readline.moveCursor(process.stdout, 0, -3);
};

// Start the ffmpeg child process
const ffmpegProcess = cp.spawn(ffmpeg, [
 // Remove ffmpeg's console spamming
 '-loglevel', '8', '-hide_banner',
 // Redirect/Enable progress messages
 '-progress', 'pipe:3',
 // Set inputs
 '-i', 'pipe:4',
 '-i', 'pipe:5',
 // Map audio & video from streams
 '-map', '0:a',
 '-map', '1:v',
 // Keep encoding
 '-c:v', 'copy',
 // Define output file
 '-f', 'mpegts', // Use MPEG-TS format for streaming
 'out.mp4'
], {
 windowsHide: true,
 stdio: [
 /* Standard: stdin, stdout, stderr */
 'inherit', 'inherit', 'inherit',
 /* Custom: pipe:3, pipe:4, pipe:5 */
 'pipe', 'pipe', 'pipe',
 ],
});
ffmpegProcess.on('close', () => {
 console.log('done');
 // Cleanup
 process.stdout.write('\n\n\n\n');
 clearInterval(progressbarHandle);
});
// Link streams
// FFmpeg creates the transformer streams and we just have to insert / read data
ffmpegProcess.stdio[3].on('data', chunk => {
 // Start the progress bar
 if (!progressbarHandle) progressbarHandle = setInterval(showProgress, progressbarInterval);
 // Parse the param=value list returned by ffmpeg
 const lines = chunk.toString().trim().split('\n');
 const args: any = {};
 for (const l of lines) {
 const [key, value] = l.split('=');
 args[key.trim()] = value.trim();
 }
 tracker.merged = args;
});
audio.pipe(ffmpegProcess.stdio[4]);
video.pipe(ffmpegProcess.stdio[5]);



}`