Recherche avancée

Médias (91)

Autres articles (75)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

  • Keeping control of your media in your hands

    13 avril 2011, par

    The 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 (...)

  • Participer à sa traduction

    10 avril 2011

    Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
    Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
    Actuellement MediaSPIP n’est disponible qu’en français et (...)

Sur d’autres sites (10547)

  • How to remove ffmpeg artifacts in the output timelapse video ?

    14 avril 2020, par Anthony Kong

    I used a number of jpeg files to create a timelapse video with ffmpeg. Individually they are visually ok.

    



    These source images are captured by a mirrorless DSL camera in JPEG format.

    



    If I upload the timelapsevideo to youtube, the video is clear and without any artifact : https://www.youtube.com/watch?v=Qs-1ahCrb0Y

    



    However if I play the video file locally on MacOS in Photo or Quicktime apps or in iOS, there are artifacts in the video. Here are some of the examples :

    



    1.

    



    enter image description here

    



    2.

    



    enter image description here

    



    This is the ffmpeg command I used to generate the video :

    



    ffmpeg -framerate 30 -pattern_type glob  -i  "DSCF*.JPG" -pix_fmt yuv420p -profile baseline  output.mp4


    



    What additional parameter I can use to remove those artifacts ?

    



    Edit :

    



      

    1. File info
    2. 


    



    enter image description here

    



      

    1. The video plays without issue in VLC.
    2. 


    


  • Anomalie #3407 : La colonne "extension" est vide concernant certaine url distante

    27 mars 2015, par Franck Dalot

    Négatif, Maïeul, aucun changement en SPIP 3.1.0-alpha [21961] :-(
    Les deux première ne fonctionnent toujours pas (firefox 36.0.4 et windows 8.1)
    https://www.youtube.com/watch?v=_h1N8MDaVXA
    https://youtu.be/_h1N8MDaVXA
    Et en ajoutant cette adresse dans la médiathèque, cela fonctionne toujours normalement
    http://contrib.spip.net

    Par contre, la médiathèque utilise la version 2.15.1 de mediaelement,
    http://zone.spip.org/trac/spip-zone/browser/_core_/plugins/medias/lib/mejs/mediaelement.js
    La dernière dispo est la 2.16.4
    https://github.com/johndyer/mediaelement/blob/master/changelog.md
    Possible qu’il faudrait faire la mise à jour de la lib également, car même s’il y a résolution de ce bug, il semble que la 2.16.3 en corrige un autre qui concerne youtube et les smartphone sous ios et android

  • Node js async/await promise problem with ytdl and ffmpeg

    31 août 2020, par WorkoutBuddy

    I built a simple youtube downloader cli. It looks like this (without any arg parsing for easier reproduction) :

    


    const ytdl = require('ytdl-core');
const config = require('config');
const progressBar = require('./progressBar');
const logger = require('./logger');
const ffmpeg = require('fluent-ffmpeg');

const url = 'https://www.youtube.com/watch?v=Np8ibIagn3M';

const getInfo = async (url) => {
    logger.info(`Getting metadata for ${url}`);
    const response = await ytdl.getBasicInfo(url);
    const info = response.videoDetails.title;
    logger.info(`Title: ${info}`);
    return info;
};

const getStream = async (url) => {
    logger.info(`Downloading from ${url} ...`);

    let allReceived = false;
    return new Promise((resolve, reject) => {
        const stream = ytdl(url, {
            quality: 'highest',
            filter: (format) => format.container === 'mp4',
        })
            .on('progress', (_, totalDownloaded, total) => {
                if (!allReceived) {
                    progressBar.start(total, 0, {
                        mbTotal: (total / 1024 / 1024).toFixed(2),
                        mbValue: 0,
                    });
                    allReceived = true;
                }
                progressBar.increment();
                progressBar.update(totalDownloaded, {
                    mbValue: (totalDownloaded / 1024 / 1024).toFixed(2),
                });
            })
            .on('end', () => {
                progressBar.stop();
                logger.info('Successfully downloaded the stream!');
            });
        return resolve(stream);
    });
};

const convertToMp3 = async (stream, title) => {
    return new Promise((resolve, reject) => {
        ffmpeg({ source: stream })
            .output(`${config.get('audioDir')}/${title}.mp3`)
            .audioBitrate('192k')
            .run();
        return resolve();
    });
};

const main = async (url) => {
    const info = await getInfo(url);
    console.log('here 1');
    const stream = await getStream(url);
    console.log('here 2');
    await convertToMp3(stream, info);
    console.log('done');
};

main(url);


    


    The output looks like :

    


    ➜ node youtube.js
info:    Getting metadata for https://www.youtube.com/watch?v=Np8ibIagn3M
info:    Title: Tu boca -  (Bachata Remix Dj Khalid)
here 1
info:    Downloading from https://www.youtube.com/watch?v=Np8ibIagn3M ...
here 2
done
[Progress] [████████████████████████████████████████] 100% | Downloaded: 7.15/7.15 MB | Elapsed Time: 5s
info:    Successfully downloaded the stream!


    


    However, I would expect this output :

    


    ➜ node youtube.js
info:    Getting metadata for https://www.youtube.com/watch?v=Np8ibIagn3M
info:    Title: Tu boca -  (Bachata Remix Dj Khalid)
here 1
info:    Downloading from https://www.youtube.com/watch?v=Np8ibIagn3M ...
[Progress] [████████████████████████████████████████] 100% | Downloaded: 7.15/7.15 MB | Elapsed Time: 5s
here 2
info:    Successfully downloaded the stream!
done


    


    I think I have troubles to understand async/await. As far as I understood, promisifying a function allows me wait for the result. However, it seems that it does not work. I do not know why and how to properly debug it.

    


    EDITED :

    


    const getStream = async (url) => {
    logger.info(`Downloading from ${url} ...`);

    let allReceived = false;
    return new Promise((resolve, reject) => {
        const stream = ytdl(url, {
            quality: 'highest',
            filter: (format) => format.container === 'mp4',
        })
            .on('progress', (_, totalDownloaded, total) => {
                console.log('totalDownloaded: ' + totalDownloaded);
                if (!allReceived) {
                    console.log('total: ' + total);
                    progressBar.start(total, 0, {
                        mbTotal: (total / 1024 / 1024).toFixed(2),
                        mbValue: 0,
                    });
                    allReceived = true;
                }
                progressBar.increment();
                progressBar.update(totalDownloaded, {
                    mbValue: (totalDownloaded / 1024 / 1024).toFixed(2),
                });
            })
            .on('end', () => {
                progressBar.stop();
                logger.info('Successfully downloaded the stream!');
                resolve(stream);
            });
    });
};


    


    But now it is like this :

    


    ➜ node youtube.js
info:    Getting metadata for https://www.youtube.com/watch?v=Np8ibIagn3M
info:    Title: Tu boca -  (Bachata Remix Dj Khalid)
here 1
info:    Downloading from https://www.youtube.com/watch?v=Np8ibIagn3M ...
[Progress] [██████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░] 14% | Downloaded: 1.02/7.15 MB | Elapsed Time: 52s


    


    Added console.log :

    


    totalDownloaded: 16384
total: 7493903
[Progress] [░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░] 0% | Downloaded: 0/7.15 MB | Elapsed Time: 0stotalDownloaded: 32768
totalDownloaded: 49152
totalDownloaded: 65536
totalDownloaded: 81920
totalDownloaded: 98304
totalDownloaded: 114688
totalDownloaded: 131072
totalDownloaded: 147456
totalDownloaded: 163840
totalDownloaded: 180224
totalDownloaded: 196608
totalDownloaded: 212992
totalDownloaded: 229376
totalDownloaded: 245760
totalDownloaded: 262144
totalDownloaded: 278528
totalDownloaded: 294912
totalDownloaded: 311296
totalDownloaded: 327680
totalDownloaded: 344064
totalDownloaded: 360448
totalDownloaded: 376832
totalDownloaded: 393216
totalDownloaded: 409600
totalDownloaded: 425984
totalDownloaded: 442368
totalDownloaded: 458752
totalDownloaded: 475136
totalDownloaded: 491520
totalDownloaded: 507904
totalDownloaded: 524288
totalDownloaded: 540672
totalDownloaded: 557056
totalDownloaded: 573440
totalDownloaded: 589824
totalDownloaded: 606208
totalDownloaded: 622592
totalDownloaded: 638976
totalDownloaded: 655360
totalDownloaded: 671744
totalDownloaded: 688128
totalDownloaded: 704512
totalDownloaded: 720896
totalDownloaded: 737280
totalDownloaded: 753664
totalDownloaded: 770048
totalDownloaded: 786432
totalDownloaded: 802816
totalDownloaded: 819200
totalDownloaded: 835584
totalDownloaded: 851968
totalDownloaded: 868352
totalDownloaded: 884736
totalDownloaded: 901120
totalDownloaded: 917504
totalDownloaded: 933888
totalDownloaded: 950272
totalDownloaded: 966656
totalDownloaded: 983040
totalDownloaded: 999424
totalDownloaded: 1015808
totalDownloaded: 1032192
totalDownloaded: 1048576
totalDownloaded: 1064960
[Progress] [██████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░] 14% | Downloaded: 1.02/7.15 MB | Elapsed Time: 25s