Recherche avancée

Médias (91)

Autres articles (75)

  • Les vidéos

    21 avril 2011, par

    Comme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
    Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
    Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

Sur d’autres sites (9046)

  • Issues with Discord JS Music Bot

    5 décembre 2020, par Thresio

    I am in the process of creating a Discord bot with JS, giving it management, auto role, etc. I just got to the music section of it and I can't quite figure out whats wrong.

    



    I believe I have installed FFmpeg correctly, as I have access to it from within the terminal. I have also used npm to bring ytdl-core and opusscript into my program.

    



    What this should do is make the bot join the chat, then play the Youtube link. Currently, I am not error checking the second argument as I just wanted to get it working initially. I have implemented several different instances of .toString() and String() however it always gives the same error listed below.

    



    . The program still throws this error :

    



    TypeError [ERR_INVALID_ARG_TYPE]: The "file" argument must be of type string. Received type object
TypeError [ERR_INVALID_ARG_TYPE]: The "file" argument must be of type string. Received type object

C:\Users\Thresio's PC\Desktop\Discord Bot\node_modules\opusscript\build\opusscript_native_wasm.js:8
var Module=typeof Module!=="undefined"?Module:{};var moduleOverrides={};var
key;for(key in Module){if(Module.hasOwnProperty(key))
{moduleOverrides[key]=Module[key]}}Module["arguments"]=
[];Module["thisProgram"]="./this.program";Module["quit"]=function(status,toThrow) {throw
toThrow};Module["preRun"]=[];Module["postRun"]=[];var ENVIRONMENT_IS_WEB=false;var 
ENVIRONMENT_IS_WORKER=false;var ENVIRONMENT_IS_NODE=false;var ENVIRONMENT_HAS_NODE=false;var 
ENVIRONMENT_IS_SHELL=false;ENVIRONMENT_IS_WEB=typeof window==="object";ENVIRONMENT_IS_WORKER=typeof 
importScripts==="function";ENVIRONMENT_HAS_NODE=typeof process==="object"&&typeof 
process.versions==="object"&&typeof 
process.versions.node==="string";ENVIRONMENT_IS_NODE=ENVIRONMENT_HAS_NODE&&!ENVIRONMENT_IS_WEB&&!ENVIRONM
ENT_IS_WORKER;ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;var
scriptDirectory="";function locateFile(path){i
abort(TypeError [ERR_INVALID_ARG_TYPE]: The "file" argument must be of type 
string. Received type object). Build with -s ASSERTIONS=1 for more info. 


    



    Here is my code for calling play :

    



    case 'play':

            function play(connection, message){
                var server = servers[message.guild.id];

                server.dispatcher = connection.playStream(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[1]){
                message.channel.send('You need to provide a link!');
                return;
            }

            if(!message.member.voiceChannel){
                message.channel.send('You must be in a voice channel to play music!');
                return;
            }

            if(!servers[message.guild.id]) servers[message.guild.id] = {
                queue: []
            }

            var server = servers[message.guild.id];

            server.queue.push(args[1]);

            if(!message.guild.voiceConnection) message.member.voiceChannel.join().then(function(connection){
                play(connection, message);
            })
            break;


    



    If anyone could assist with this, I would be very grateful.

    



    EDIT : I unfortunately never figured out my main issue, but I have now found code that works (unlike mine :/).
For anyone else having this issue, I suggest using the code found here.
Works like a charm !

    


  • Grab frame from video using JavaCV

    26 août 2020, par Praveen Gopal

    I am using JavaCV to grab frame from Video.

    


    I can grab if video is in absolute path. But if video is in HTTP than JavaCV throw error.

    


        url = new URL("http://www.sample-videos.com/video/mp4/720/SampleVideo.mp4");
    urlConnection = (HttpURLConnection) url.openConnection();
    InputStream inputStream = urlConnection.getInputStream();
    Java2DFrameConverter bimConverter = new Java2DFrameConverter();

    FFmpegFrameGrabber frameGrabber = new FFmpegFrameGrabber(inputStream);

    String output = "C:\\Users\\xxxx\\Downloads\\Test";
    frameGrabber.start();
     Frame frame;  
     double frameRate=frameGrabber.getFrameRate();  
     int imgNum=5;  
     System.out.println("Video has "+frameGrabber.getFrameRate()+" frames and has frame rate of "+frameRate);  
     try {   
       frameGrabber.setFrameNumber(1000);
       frame = frameGrabber.grabKeyFrame();  
       BufferedImage bi = bimConverter.convert(frame);  
       String path = output+File.separator+imgNum+".jpg";  
       ImageIO.write(bi,"png", new File(path));
       frameGrabber.stop();   
       frameGrabber.close();
       frameGrabber.flush();                                                                        
     } catch (Exception e) {  
       e.printStackTrace();  
     } 


    


  • Grab frame from video (as Inputstream) using JavaCV in Java

    23 janvier 2020, par Praveen Gopal

    I am using JavaCV to grab frame from Video.

    I can grab if video is in absolute path. But if video is in HTTP than JavaCV throw error.

       url = new URL("http://www.sample-videos.com/video/mp4/720/SampleVideo.mp4");
       urlConnection = (HttpURLConnection) url.openConnection();
       InputStream inputStream = urlConnection.getInputStream();
       Java2DFrameConverter bimConverter = new Java2DFrameConverter();

       FFmpegFrameGrabber frameGrabber = new FFmpegFrameGrabber(inputStream);

       String output = "C:\\Users\\xxxx\\Downloads\\Test";
       frameGrabber.start();
        Frame frame;  
        double frameRate=frameGrabber.getFrameRate();  
        int imgNum=5;  
        System.out.println("Video has "+frameGrabber.getFrameRate()+" frames and has frame rate of "+frameRate);  
        try {  
          frameGrabber.setFrameNumber(1000);
          frame = frameGrabber.grabKeyFrame();  
          BufferedImage bi = bimConverter.convert(frame);  
          String path = output+File.separator+imgNum+".jpg";  
          ImageIO.write(bi,"png", new File(path));
          frameGrabber.stop();  
          frameGrabber.close();
          frameGrabber.flush();                                                                        
        } catch (Exception e) {  
          e.printStackTrace();  
        }

    Any help would be helpful.
    Thanks in advance.