
Recherche avancée
Médias (2)
-
SPIP - plugins - embed code - Exemple
2 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
Publier une image simplement
13 avril 2011, par ,
Mis à jour : Février 2012
Langue : français
Type : Video
Autres articles (44)
-
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 (...) -
Encoding and processing into web-friendly formats
13 avril 2011, parMediaSPIP automatically converts uploaded files to internet-compatible formats.
Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
All uploaded files are stored online in their original format, so you can (...) -
Amélioration de la version de base
13 septembre 2013Jolie sélection multiple
Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)
Sur d’autres sites (7102)
-
avdevice/decklink_dec : mark get_frame_timecode and get_bmd_timecode static
6 janvier 2021, par Christopher Degawaavdevice/decklink_dec : mark get_frame_timecode and get_bmd_timecode static
The function is not used anywhere else and is causing mingw-w64 clang
builds to fail withffmpeg-git/libavdevice/decklink_dec.cpp:792:5 : error : no previous prototype for function 'get_bmd_timecode' [-Werror,-Wmissing-prototypes]
int get_bmd_timecode(AVFormatContext *avctx, AVTimecode *tc, AVRational frame_rate, BMDTimecodeFormat tc_format, IDeckLinkVideoInputFrame *videoFrame)Signed-off-by : Christopher Degawa <ccom@randomderp.com>
Signed-off-by : Marton Balint <cus@passwd.hu> -
Download billboard hot 100 (but only 50) mp3 files
4 mars 2021, par AtlasYo yo yo. I got this insane idea to get 50 of the billboard hot 100 songs, download them into mp3 files, and then put them on private online radio.


Problem is, the way I do it doesn't download each file one by one, it puts all the music together in one mp3 file. Here's my code so far (terrible, I know... I just wanna throw this together really quickly)


const { getChart } = require("billboard-top-100");
const ffmpeg = require("fluent-ffmpeg");
const { mkdir } = require("fs");
const ytdl = require("ytdl-core");
const YT = require("scrape-youtube").default;

getChart('hot-100', (err, chart) => {
 if(err) console.log(err);
 chart.songs.length = 50;
 for (var i = 0; i < chart.songs.length; i++) {
 var song = chart.songs[i];
 song.artist = song.artist.replace("Featuring", "feat.");
 var name = `${song.artist} - ${song.title}`;
 YT.search(name).then(res => {
 downloadVideo(res.videos[0].link, name).then(_ => { console.log(""); }).catch(console.log);
 }).catch(err => console.log(err));
 };
});

function downloadVideo(url, name) {
 return new Promise((resolve, reject) => {
 var stream = ytdl(url, { filter: "audioonly", quality: "highestaudio" });
 var start = Date.now();

 ffmpeg(stream)
 .audioBitrate(128)
 .save(`${__dirname}/${new Date().getWeek()}/${name}.mp3`)
 .on("end", _ => {
 console.log(`Downloaded "${name}.mp3" - Took ${(Date.now() - start) / 1000} seconds.`);
 resolve(`${name}.mp3`);
 })
 .on("error", _ => reject("something went wong"));
 });
}

Date.prototype.getWeek = function() {
 var onejan = new Date(this.getFullYear(),0,1);
 return Math.ceil((((this - onejan) / 86400000) + onejan.getDay()+1)/7);
}



-
How to convert a continues stream of images to h264 stream in realtime
29 mars 2021, par Eytan ManorSo basically I have a canvas, that keeps updating itself at a framerate of 24, and I would like to convert the sequence of images that it produces to H264. The ultimate goal is to send it to an RTMP server, but for now this will help me check if things are working properly before piping the output. The canvas API that I'm using (see node-canvas) allows me to capture a JPEG of the entire canvas surface at any given moment. Unfortunately, the input will only be submitted once I end the STDIN, which is not what I want. Instead of processing all the input in a batch, I would like to process incoming JPEGs as I go, so everything can be done live. This is the code snippet that I used to achieve the functionality in question (which unfortunately doesn't work) :


// patches/canvas.js
const { Canvas } = require('canvas');
const execa = require('execa');
const $ffmpeg = require('ffmpeg-static');

Canvas.prototype.captureStream = function captureStream(frameRate = 24) {
 const refreshRate = 1000 / frameRate;

 const encoding = execa($ffmpeg, [
 '-f', 'image2pipe',
 '-r', frameRate,
 '-vcodec', 'mjpeg',
 '-s', `${this.width}x${this.height}`,
 '-i', '-',
 '-vcodec', 'libx264',
 '-preset', 'veryfast',
 '-crf', '18',
 '-pix_fmt', 'yuv420p',
 '-b:v', '500k',
 '-bufsize', '600k',
 '-vprofile', 'baseline',
 '-tune', 'zerolatency',
 '-g', '60',
 '-r', frameRate,
 '-s', `${this.width}x${this.height}`,
 '-f', 'rawvideo',
 '-',
 ], {
 stdio: 'pipe',
 });

 let lastFeed = Date.now();

 const feed = () => {
 const jpegStream = this.jpegStream();

 jpegStream.on('data', (data) => {
 encoding.stdin.push(data);
 });

 jpegStream.on('end', () => {
 const now = Date.now();
 const timeSpan = Math.max(refreshRate - (now - lastFeed), 0);
 lastFeed = now;

 setTimeout(feed, timeSpan);
 });
 };

 feed();

 return encoding.stdout;
};

module.exports = require('canvas');



Any suggestions on how to make it work ?