Recherche avancée

Médias (2)

Mot : - Tags -/media

Autres articles (44)

  • Pas question de marché, de cloud etc...

    10 avril 2011

    Le 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, par

    MediaSPIP 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 2013

    Jolie 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 Degawa
    avdevice/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 with

    ffmpeg-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>

    • [DH] libavdevice/decklink_dec.cpp
  • Download billboard hot 100 (but only 50) mp3 files

    4 mars 2021, par Atlas

    Yo 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.

    &#xA;

    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)

    &#xA;

    const { getChart } = require("billboard-top-100");&#xA;const ffmpeg = require("fluent-ffmpeg");&#xA;const { mkdir } = require("fs");&#xA;const ytdl = require("ytdl-core");&#xA;const YT = require("scrape-youtube").default;&#xA;&#xA;getChart(&#x27;hot-100&#x27;, (err, chart) => {&#xA;    if(err) console.log(err);&#xA;    chart.songs.length = 50;&#xA;    for (var i = 0; i &lt; chart.songs.length; i&#x2B;&#x2B;) {&#xA;        var song = chart.songs[i];&#xA;        song.artist = song.artist.replace("Featuring", "feat.");&#xA;        var name = `${song.artist} - ${song.title}`;&#xA;        YT.search(name).then(res => {&#xA;            downloadVideo(res.videos[0].link, name).then(_ => { console.log(""); }).catch(console.log);&#xA;        }).catch(err => console.log(err));&#xA;    };&#xA;});&#xA;&#xA;function downloadVideo(url, name) {&#xA;    return new Promise((resolve, reject) => {&#xA;        var stream = ytdl(url, { filter: "audioonly", quality: "highestaudio" });&#xA;        var start = Date.now();&#xA;&#xA;        ffmpeg(stream)&#xA;            .audioBitrate(128)&#xA;            .save(`${__dirname}/${new Date().getWeek()}/${name}.mp3`)&#xA;            .on("end", _ => {&#xA;                console.log(`Downloaded "${name}.mp3" - Took ${(Date.now() - start) / 1000} seconds.`);&#xA;                resolve(`${name}.mp3`);&#xA;            })&#xA;            .on("error", _ => reject("something went wong"));&#xA;    });&#xA;}&#xA;&#xA;Date.prototype.getWeek = function() {&#xA;  var onejan = new Date(this.getFullYear(),0,1);&#xA;  return Math.ceil((((this - onejan) / 86400000) &#x2B; onejan.getDay()&#x2B;1)/7);&#xA;}&#xA;

    &#xA;

  • How to convert a continues stream of images to h264 stream in realtime

    29 mars 2021, par Eytan Manor

    So 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) :

    &#xA;

    // patches/canvas.js&#xA;const { Canvas } = require(&#x27;canvas&#x27;);&#xA;const execa = require(&#x27;execa&#x27;);&#xA;const $ffmpeg = require(&#x27;ffmpeg-static&#x27;);&#xA;&#xA;Canvas.prototype.captureStream = function captureStream(frameRate = 24) {&#xA;  const refreshRate = 1000 / frameRate;&#xA;&#xA;  const encoding = execa($ffmpeg, [&#xA;    &#x27;-f&#x27;, &#x27;image2pipe&#x27;,&#xA;    &#x27;-r&#x27;, frameRate,&#xA;    &#x27;-vcodec&#x27;, &#x27;mjpeg&#x27;,&#xA;    &#x27;-s&#x27;, `${this.width}x${this.height}`,&#xA;    &#x27;-i&#x27;, &#x27;-&#x27;,&#xA;    &#x27;-vcodec&#x27;, &#x27;libx264&#x27;,&#xA;    &#x27;-preset&#x27;, &#x27;veryfast&#x27;,&#xA;    &#x27;-crf&#x27;, &#x27;18&#x27;,&#xA;    &#x27;-pix_fmt&#x27;, &#x27;yuv420p&#x27;,&#xA;    &#x27;-b:v&#x27;, &#x27;500k&#x27;,&#xA;    &#x27;-bufsize&#x27;, &#x27;600k&#x27;,&#xA;    &#x27;-vprofile&#x27;, &#x27;baseline&#x27;,&#xA;    &#x27;-tune&#x27;, &#x27;zerolatency&#x27;,&#xA;    &#x27;-g&#x27;, &#x27;60&#x27;,&#xA;    &#x27;-r&#x27;, frameRate,&#xA;    &#x27;-s&#x27;, `${this.width}x${this.height}`,&#xA;    &#x27;-f&#x27;, &#x27;rawvideo&#x27;,&#xA;    &#x27;-&#x27;,&#xA;  ], {&#xA;    stdio: &#x27;pipe&#x27;,&#xA;  });&#xA;&#xA;  let lastFeed = Date.now();&#xA;&#xA;  const feed = () => {&#xA;    const jpegStream = this.jpegStream();&#xA;&#xA;    jpegStream.on(&#x27;data&#x27;, (data) => {&#xA;      encoding.stdin.push(data);&#xA;    });&#xA;&#xA;    jpegStream.on(&#x27;end&#x27;, () => {&#xA;      const now = Date.now();&#xA;      const timeSpan = Math.max(refreshRate - (now - lastFeed), 0);&#xA;      lastFeed = now;&#xA;&#xA;      setTimeout(feed, timeSpan);&#xA;    });&#xA;  };&#xA;&#xA;  feed();&#xA;&#xA;  return encoding.stdout;&#xA;};&#xA;&#xA;module.exports = require(&#x27;canvas&#x27;);&#xA;

    &#xA;

    Any suggestions on how to make it work ?

    &#xA;