
Recherche avancée
Autres articles (28)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...) -
Publier sur MédiaSpip
13 juin 2013Puis-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
Sur d’autres sites (4488)
-
Grab frame from video (as Inputstream) using JavaCV in Java
23 janvier 2020, par Praveen GopalI 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. -
Grab frame from video using JavaCV
26 août 2020, par Praveen GopalI 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(); 
 } 



-
Issues with Discord JS Music Bot
5 décembre 2020, par ThresioI 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 !