
Recherche avancée
Médias (1)
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (46)
-
Keeping control of your media in your hands
13 avril 2011, parThe 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 (...) -
Les tâches Cron régulières de la ferme
1er décembre 2010, parLa gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
Le super Cron (gestion_mutu_super_cron)
Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...) -
Soumettre améliorations et plugins supplémentaires
10 avril 2011Si vous avez développé une nouvelle extension permettant d’ajouter une ou plusieurs fonctionnalités utiles à MediaSPIP, faites le nous savoir et son intégration dans la distribution officielle sera envisagée.
Vous pouvez utiliser la liste de discussion de développement afin de le faire savoir ou demander de l’aide quant à la réalisation de ce plugin. MediaSPIP étant basé sur SPIP, il est également possible d’utiliser le liste de discussion SPIP-zone de SPIP pour (...)
Sur d’autres sites (5662)
-
Making ffmpeg/javacv less verbose in java
16 octobre 2022, par lejlotI have a Java application that uses
ffmpeg
library andjavacv
to load and process video files.


I am currently using following code, for loading
videofile
to my data container.


public boolean add(String videofile) {
 FrameGrabber g = new OpenCVFrameGrabber( videofile );
 try{ 
 g.start();
 }
 catch(Exception e){
 g = new FFmpegFrameGrabber( videofile );
 try {
 g.start();
 }catch(Exception x){
 return false;
 }
 }
 grabbers.add( new Pair(videofile, g) );
 frames.add( 0 );
 preprocessed=false;
 return true; 
 }




Each time video is loaded, a library outputs a lot of meta information regarding video itself :





Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/lejlot/data/test.mp4' : 
 Metadata :
 major_brand : isom
 minor_version : 512
 compatible_brands : isomiso2mp41
 encoder : Lavf53.21.1 Duration : 00:04:36.27, start : 0.000000, bitrate : 305 kb/s
 Stream #0:0(und) : Video : mpeg4 (Simple Profile) (mp4v / 0x7634706D), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 303 kb/s, 20,85
 fps, 30 tbr, 1k tbn, 1k tbc
 Metadata :
 handler_name : VideoHandler





which obviously I do not want to see. I cannot (do not want) to modify the libraries source codes, but rather modify my own so it can intercept this log and discard it.



As far I tried to temporarly block the stdout/stderr streams through



private static final devnull = new PrintStream(new OutputStream() {
 @Override
 public void write(int b) {
 //DO NOTHING
 }
 @Override
 public void write(byte[] b,int x,int y){
 }
 });

 /**
 * Blocks messages to stdout
 */
 public static void silentStdOut(){
 System.setOut(devnull);
 }

 /**
 * Blocks messages to stderr
 */
 public static void silentStdErr(){
 System.setErr(devnull);
 }




but it does not seem to help, log message is still displayed



public boolean add(String videofile) {
 Utils.silentStdErr();
 Utils.silentStdOut();
 FrameGrabber g = new OpenCVFrameGrabber( videofile );
 try{ 
 g.start();
 }
 ,,,




"Raw" ffmpeg can be set to be less verbose using



ffmpeg -loglevel panic




but neither
OpenCVFrameGrabber
notFFmpegFrameGrabber
give access to the tool's parameters.


To sum up - how can I discard these log messages without modifing the libraries' source codes ?


-
Making ffmpeg/javacv less verbose in java
27 août 2013, par lejlotI have a Java application that uses
ffmpeg
library andjavacv
to load and process video files.I am currently using following code, for loading
videofile
to my data container.public boolean add(String videofile) {
FrameGrabber g = new OpenCVFrameGrabber( videofile );
try{
g.start();
}
catch(Exception e){
g = new FFmpegFrameGrabber( videofile );
try {
g.start();
}catch(Exception x){
return false;
}
}
grabbers.add( new Pair(videofile, g) );
frames.add( 0 );
preprocessed=false;
return true;
}Each time video is loaded, a library outputs a lot of meta information regarding video itself :
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/lejlot/data/test.mp4' :
Metadata :
major_brand : isom
minor_version : 512
compatible_brands : isomiso2mp41
encoder : Lavf53.21.1 Duration : 00:04:36.27, start : 0.000000, bitrate : 305 kb/s
Stream #0:0(und) : Video : mpeg4 (Simple Profile) (mp4v / 0x7634706D), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 303 kb/s, 20,85
fps, 30 tbr, 1k tbn, 1k tbc
Metadata :
handler_name : VideoHandlerwhich obviously I do not want to see. I cannot (do not want) to modify the libraries source codes, but rather modify my own so it can intercept this log and discard it.
As far I tried to temporarly block the stdout/stderr streams through
private static final devnull = new PrintStream(new OutputStream() {
@Override
public void write(int b) {
//DO NOTHING
}
@Override
public void write(byte[] b,int x,int y){
}
});
/**
* Blocks messages to stdout
*/
public static void silentStdOut(){
System.setOut(devnull);
}
/**
* Blocks messages to stderr
*/
public static void silentStdErr(){
System.setErr(devnull);
}but it does not seem to help, log message is still displayed
public boolean add(String videofile) {
Utils.silentStdErr();
Utils.silentStdOut();
FrameGrabber g = new OpenCVFrameGrabber( videofile );
try{
g.start();
}
,,,"Raw" ffmpeg can be set to be less verbose using
ffmpeg -loglevel panic
but neither
OpenCVFrameGrabber
notFFmpegFrameGrabber
give access to the tool's parameters.To sum up - how can I discard these log messages without modifing the libraries' source codes ?
-
tls : Remove all the local polling loops
10 novembre 2011, par Martin Storsjö