Recherche avancée

Médias (0)

Mot : - Tags -/content

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (69)

  • Organiser par catégorie

    17 mai 2013, par

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

    Utilité
    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 (...)

  • Demande de création d’un canal

    12 mars 2010, par

    En fonction de la configuration de la plateforme, l’utilisateur peu avoir à sa disposition deux méthodes différentes de demande de création de canal. La première est au moment de son inscription, la seconde, après son inscription en remplissant un formulaire de demande.
    Les deux manières demandent les mêmes choses fonctionnent à peu près de la même manière, le futur utilisateur doit remplir une série de champ de formulaire permettant tout d’abord aux administrateurs d’avoir des informations quant à (...)

Sur d’autres sites (1860)

  • Which directory should i put FFmpeg ? [duplicate]

    25 juillet 2020, par Panda Gaming23

    I am making a discord bot and I get the following error

    


    node:4) UnhandledPromiseRejectionWarning: Error: FFmpeg/avconv not found!

2020-07-25T01:00:13.991518+00:00 app[worker.1]:     at Function.getInfo (/app/node_modules/prism-media/src/core/FFmpeg.js:130:11)

2020-07-25T01:00:13.991519+00:00 app[worker.1]:     at Function.create (/app/node_modules/prism-media/src/core/FFmpeg.js:143:38)

2020-07-25T01:00:13.991519+00:00 app[worker.1]:     at new FFmpeg (/app/node_modules/prism-media/src/core/FFmpeg.js:44:27)

2020-07-25T01:00:13.991520+00:00 app[worker.1]:     at AudioPlayer.playUnknown (/app/node_modules/discord.js/src/client/voice/player/BasePlayer.js:47:20)

2020-07-25T01:00:13.991520+00:00 app[worker.1]:     at VoiceConnection.play (/app/node_modules/discord.js/src/client/voice/util/PlayInterface.js:71:28)

2020-07-25T01:00:13.991522+00:00 app[worker.1]:     at play (/app/commands/play.js:14:34)

2020-07-25T01:00:13.991522+00:00 app[worker.1]:     at /app/commands/play.js:42:5

2020-07-25T01:00:13.991522+00:00 app[worker.1]:     at processTicksAndRejections (internal/process/task_queues.js:97:5)

2020-07-25T01:00:13.991629+00:00 app[worker.1]: (node:4) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 6)



    


    Here is the code

    


    const ytdl = require("ytdl-core");
const Discord = require("discord.js");

var servers = {};

module.exports = {
  name: "play",
  description: "this is a music play command!",
  execute(message, args) {
  
  function play(connection, message) {
        var server = servers[message.guild.id];
        
        server.dispatcher = connection.play(ytdl(server.queue[0], {filter: "audioonly"}));
        
        server.queue.shift();
        
        server.dispatcher.on("end", function () {
            if(server.queue[0]){
                play(connection, message);
            }
            else {connection.disconnect();}
        })
    }
    if (!args[0]) {
      message.channel.send("you need to provide a link!");
      return;
    }

    if (!message.member.voice.channel) {
      message.channel.send("you must be in ||a|| voice channel to play the bot!");
      return;
    }

    if (!servers[message.guild.id]) servers[message.guild.id] = { queue: [] };
    
    var server = servers[message.guild.id];
    
    server.queue.push(args[0]);
     
    if (!message.member.voice.connection) message.member.voice.channel.join().then(function(connection) {
    play(connection, message);
    })
  },
};


    


    I would like to know which directory I should put FFmpeg.

    


    I would also like to know if the FFmpeg executable has to be in a folder or compressed or if i can just place the executable in a certain directory

    


    I am hosting my bot using Heroku on a Mac using Discord.js V12

    


    Please help.

    


    Thanks !

    


  • ffmpeg -ss then apply filter then concat producing timestamp errors

    6 août 2020, par Bob Ramsey

    Using ffmpeg, I have split a file into multiple parts using -ss. Then I apply a filter to some of the files, then concat the files back together. When I do that, I get : Non-monotonous DTS in output stream 0:0 ; previous : 341334, current : 340526 ; changing to 341335. This may result in incorrect timestamps in the output file. The output file plays, but there are noticeable skips where the files are joined.

    


    Here's how I am splitting the file :

    


    ffmpeg -i full_source.mp4 -ss 0 -to 14.264250 -c copy  01-plain.mp4
ffmpeg -i full_source.mp4 -ss 14.264250 -to 18.435083 -c copy  01-filtered.mp4

ffmpeg -i full_source.mp4 -ss 18.435083 -to 29.988292 -c copy  02-plain.mp4
ffmpeg -i full_source.mp4 -ss 29.988292 -to 31.865167 -c copy  02-filtered.mp4
...
ffmpeg -i full_source.mp4 -ss 0 -to 14.264250 -c copy  10-plain.mp4
ffmpeg -i full_source.mp4 -ss 234.484203 -to 300.000 -c copy  10-filtered.mp4


    


    Then I apply a different drawtext filter on each of the 10 filtered files and save them with a new name, like :

    


    ffmpeg -hide_banner -loglevel warning -y -i 01-filtered.mp4 -filter_complex "drawtext=fontfile=calibri.ttf:fontsize=24:fontcolor=white:x=300:y=500:text='hello world'" -crf 15 01-filtered-complete.mp4


    


    Finally, I join all of the plain and complete files back together like this :

    


    ffmpeg  -f concat -safe 0 -i mylist.txt -c:a copy -c:v copy  outfile.mp4


    


    And that's where the timing error comes in. I've tried adding -vsync drop in the concat command, but that didn't really work either. Same version of ffmpeg does the split, the filter, and the concat. I've tried different versions, everything from 20170519 to one from May 2020 with the same result. Always making sure that all three steps are done by the same version of ffmpeg.

    


    The only thing I can see is that ffprobe shows a duration of 14.27 for 01-plain.mp4 when it should be 14.264250. All of the other files show a similar rounding difference. The files are 23.98 fps. If I do all of my filters in really long command without splitting the file, I can use the more precise numbers with no problem. It just takes 10 times as long. This is all scripted, it happens a couple of hundred times a day and time is money, so I can't take 10 times as long to do each file.

    


    Any ideas ? Thanks in advance !

    


  • How can I simply do color interpolation on this image and then save the image ? With RGBA channels as example

    24 août 2020, par karl-police

    So I got this GIF here :

    


    


    As you can see, it has Red, Green and Blue in it. And it also has a full transparency in it. This was composed together with FFMPEG out of images that looked exactly like that.

    


     

    


    Then, with FFMPEG I "decomposed" the RGB and Alpha channels using the filter "extractplanes".

    


    The gallery of that, in correct order starting from up to down, can be found here :

    


    https://imgur.com/a/WN0aGuW

    


    I am not sure if this actually helps me or if I'm supposed to decompose them. Because apperantly now, after decomposing them, I'm supposed to modify them, but I'm not really sure how. It's like how do I modify the red channel that only has black and white, so all at the end, will match to the specified HEX color that I want it to be to.

    


     

    


    Now, my question is. How do I exactly make the color changing happen ? Can I do this simply with JavaScript ? Is it possible to do with FFMPEG, if possible without ImageMagicks ? Maybe a programming language where not much installation is needed to do that ?

    


    What I understood is that. These channels basically contain values from 0 to 255 with black and white. I think the "brightness" is that what 0 and 255. So something inbetween, would be like grey.

    


    So basically, like we do (255,0,0) for red. In these channels, if I want red somewhere I need to put one fully white pixel on the red channel and on all the other channels, there has to be a fully black pixel.

    


    That's the concept. Now is the question, how can I do this ?

    


     

    


    At the end I want to make it look like this one as example :

    


    


    This is from a game. So basically that's how it looks like in the game. And the game files only use these RGBA template sprites.

    


     

    


    I asked a similar question here : How to change colors of an image using RGBA and more channels independently of their color

    


    But somehow, I might didn't seem to explain it that well.

    


     

    


    I made a thing here to test around with things. I guess that's nearly close, but the lines are kinda weird. jsfiddle.net/qsgazubk