Recherche avancée

Médias (1)

Mot : - Tags -/ipad

Autres articles (50)

  • Publier sur MédiaSpip

    13 juin 2013

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

  • Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs

    12 avril 2011, par

    La manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
    Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras.

  • Possibilité de déploiement en ferme

    12 avril 2011, par

    MediaSPIP peut être installé comme une ferme, avec un seul "noyau" hébergé sur un serveur dédié et utilisé par une multitude de sites différents.
    Cela permet, par exemple : de pouvoir partager les frais de mise en œuvre entre plusieurs projets / individus ; de pouvoir déployer rapidement une multitude de sites uniques ; d’éviter d’avoir à mettre l’ensemble des créations dans un fourre-tout numérique comme c’est le cas pour les grandes plate-formes tout public disséminées sur le (...)

Sur d’autres sites (10032)

  • ffplay : added option always on top for video window

    13 mai 2019, par Daniel Kucera
    ffplay : added option always on top for video window
    

    Reviewed-by : Marton Balint <cus@passwd.hu>
    Signed-off-by : Daniel Kucera <github@danman.eu>

    • [DH] doc/ffplay.texi
    • [DH] fftools/ffplay.c
  • Promise chaining and resolution

    23 janvier 2019, par Shourya Sharma

    I am trying to convert videos one by one with the help of promises. i am using ffmpeg for conversion and multer for uploading multiple files.

    multer uploads multiple files at once after which i have to chain the conversions one by one. as of now it just converts the 1st file.

    i thought chaining of promises ..like in an array should work but i am confused if i can define new promises in an array as ffmpeg also returns a promise

    My router :

    const router = require('express').Router();
    const multer = require('multer');
    const ffmpeg = require('ffmpeg');

    let str;
    const storage = multer.diskStorage({
     destination: (req, file, cb) => {
       cb(null, './uploads');
     },
     filename: (req, file, cb) => {
       str = file.originalname.replace(/\.[^/.]+$/, "");
       str = str.replace(/[^a-z0-9+]+/gi, '_') + '.' + file.originalname.replace(/^.*\./, '');
       cb(null, str);
     }
    });

    const upload = multer({ storage: storage }).array('files', 12);

    router.post('/upload', (req, res, next) => {
     // req.files is an array of files
     // req.body will contain the text fields, if there were any
     function uploadFile() {
       return new Promise((resolve, reject) => {
         upload(req, res, (err) => {
           if (err) {
             res.send(err) // Pass errors to Express.
             reject(`Error: Something went wrong!`);
           } else if (req.files == undefined) {
             res.send(`No File selected.`);
             resolve();
           } else if (!err &amp;&amp; req.files.length > 0) {
             res.status(201).send(`${req.files.length} File(s): ${req.files} uploaded successfully.`);
             console.log('uploaded');
             resolve();
           }
         });
       });
     }

     uploadFile().then(() => {
       try {
         var process = new ffmpeg('./uploads/' + str);
         process.then(function (video) {
           console.log('The video is ready to be processed');
           video.addCommand('-hide_banner', '');
           video.addCommand('-y', '');
           video.addCommand('-c:a', 'aac');
           video.addCommand('-ar', '48000');
           video.addCommand('-c:v', 'h264');
           video.addCommand('-profile:v', 'main');
           video.addCommand('-crf', '20');
           video.addCommand('-sc_threshold', '0');
           video.addCommand('-g', '50');
           video.addCommand('-keyint_min', '50');
           video.addCommand('-hls_time', '4');
           video.addCommand('-hls_playlist_type', 'vod');
           video.addCommand('-vf', 'scale=-2:720');
           video.addCommand('-b:v', '1400k');
           video.addCommand('-maxrate', '1498k');
           video.addCommand('-bufsize', '2100k');
           video.addCommand('-b:a', '128k');
           video.save('./converted/' + str, function (error, file) {
             if (!error)
               console.log('Video file: ' + file);
           });
           }, function (err) {
             console.log('Error: ' + err);
           });
       } catch (e) {
         console.log(e.code);
         console.log(e.msg);
       }
     }).catch((err) => {
       console.log(Error, err);
     });
    });

    module.exports = router;
  • Discord bot not playing any audio

    7 mars 2023, par Markix

    I'm making a discord music bot with Discord.js v14, @discordjs/voice, and Typescript and I have this play command but it doesn't seem to be working. It successfully joins, throws no exceptions but... no audio.

    &#xA;

    This is my code :

    &#xA;

    import { CommandInteraction, SlashCommandBuilder } from "discord.js";&#xA;import { joinVoiceChannel, createAudioPlayer, getVoiceConnections, StreamType, AudioPlayerStatus } from "@discordjs/voice";&#xA;import { createAudioResource } from "@discordjs/voice";&#xA;import ytdl from &#x27;ytdl-core&#x27;;&#xA;&#xA;module.exports = {&#xA;    data: new SlashCommandBuilder()&#xA;        .setName(&#x27;play&#x27;)&#xA;        .setDescription(&#x27;Play př&#xED;kaz&#x27;)&#xA;        .addStringOption(option => &#xA;            option&#xA;                .setName("link")&#xA;                .setDescription("Youtube link!")&#xA;                .setRequired(false)&#xA;        ),&#xA;&#xA;async execute(interaction: CommandInteraction) {&#xA;        const link = interaction.options.get(&#x27;link&#x27;)?.value?.toString();&#xA;        const player = createAudioPlayer();&#xA;        const resource = createAudioResource(ytdl(`${link}`, { filter: "audioonly" }), { inlineVolume: 1.0, inputType: StreamType.WebmOpus });&#xA;&#xA;    player.play(resource);&#xA;&#xA;    const connection = joinVoiceChannel({&#xA;        channelId: "775815628619251743",&#xA;        guildId: "775761665786511370",&#xA;        adapterCreator: interaction.guild?.voiceAdapterCreator,&#xA;        selfMute?: false,&#xA;        selfDeaf: false&#xA;    });&#xA;&#xA;    const subscription = connection.subscribe(player);&#xA;    interaction.reply("Now playing: .-.");&#xA;}&#xA;

    &#xA;

    This is "dependencies" in my package.json

    &#xA;

      "dependencies": {&#xA;    "@discordjs/builders": "^1.2.0",&#xA;    "@discordjs/rest": "^1.5.0",&#xA;    "@discordjs/voice": "^0.14.0",&#xA;    "@types/express": "^4.17.14",&#xA;    "discord.js": "^14.4.0",&#xA;    "dotenv": "^16.0.2",&#xA;    "express": "^4.18.1",&#xA;    "ffmpeg": "^0.0.4",&#xA;    "ffmpeg-static": "^5.1.0",&#xA;    "libsodium-wrappers": "^0.7.11",&#xA;    "opusscript": "^0.0.8",&#xA;    "sequelize": "^6.23.2",&#xA;    "sqlite3": "^5.1.2",&#xA;    "ts-node": "^10.9.1",&#xA;    "ytdl-core": "^4.11.2"&#xA;  }&#xA;

    &#xA;

    (And yes I also have ffmpeg installed globally)

    &#xA;

    markix@pop-os-lenovo-laptop:~$ apt list --installed | grep -i ffmpeg &#xA;&#xA;WARNING: apt does not have a stable CLI interface. Use with caution in scripts.&#xA;&#xA;chromium-codecs-ffmpeg-extra/jammy,now 1:85.0.4183.83-0ubuntu2 amd64 [installed,upgradable to: 1:85.0.4183.83-0ubuntu2.22.04.1]&#xA;ffmpeg/jammy-security,jammy-updates,now 7:4.4.2-0ubuntu0.22.04.1 amd64 [installed,automatic]&#xA;

    &#xA;

    What am I doing wrong ?

    &#xA;