video wall of desktop
in
Contributed Library Questions
•
1 year ago
Hi, i'm not very experienced with GStreamer(GSvideo) and want to know if there's a simple way to stream your desktop? I want to combine the maybe the syphon library, GSvideo and modul8, to create a videowall that hopefully runs stable :) So i thought using the processing library in OSX should be best. I've seen the video whale project and a example sketch of an videowall in python. I've allready figured out how to get desktop input:
- import java.awt.Color;
- import java.awt.Font;
- import java.awt.Graphics2D;
- import java.awt.image.BufferedImage;
- import java.io.File;
- import java.io.IOException;
- import javax.imageio.ImageIO;
- import java.awt.AWTException;
- import java.awt.Robot;
- import java.awt.event.KeyEvent;
- import java.awt.*;
- import java.awt.image.*;
- import javax.swing.*;
- //Robot objRobot = new Robot ();
- //BufferedImage objBufferedImage = objRobot.createScreenCapture(objRectArea);
- //
- //prinltn(objBufferedImage);
- //Define the area we want to save
- int counter = 0;
- void draw(){
- Robot objRobot = null;
- try
- {
- objRobot = new Robot();
- } catch(Exception ex)
- {
- }
- Dimension screenDim = Toolkit.getDefaultToolkit().getScreenSize();
- BufferedImage objBufferedImage = objRobot.createScreenCapture(new Rectangle(0, 0, (int)screenDim.getWidth(), (int)screenDim.getHeight()));
- int areaToExportWidth = 1024;
- int areaToExportHeight = 768;
- //Create the image
- BufferedImage exportImage =objRobot.createScreenCapture(new Rectangle(0, 0, (int)screenDim.getWidth(), (int)screenDim.getHeight()));
- //Get graphics - Get the layer we can actually draw on
- Graphics2D imageGraphics = (Graphics2D) exportImage.getGraphics();
- //Cleanup after ourselves
- imageGraphics.dispose();
- //Setup to write the BufferedImage to a file
- String pathToFile = "/Users/martijnmellema/Documents/Processing/- minor/ typografie 2";
- File outputDirectory = new File(pathToFile);
- File outputFile = new File(pathToFile+"\\"+counter+"MyImage.png");
- //Here we make sure the directory exists.
- /*
- * Returns TRUE if:
- * The directory is MISSING
- * and/or the directory IS NOT a directory
- */
- if(!outputDirectory.exists() || !outputDirectory.isDirectory()){
- outputDirectory.mkdirs(); //Make the directory
- } // Else do nothing
- //Write the file
- try { //Attempt the write
- ImageIO.write(exportImage, "png", outputFile);
- } catch (IOException e) { //For some reason it failed so...
- e.printStackTrace(); //... why did it fail?
- }
- counter++;
- }
- import codeanticode.gsvideo.*;
- GSPipeline pipeline;
- void setup() {
- size(640, 480);
- pipeline = new GSPipeline(this, "osxvideosrc ! tee name=videoout ! queue ! videorate ! video/x-raw-yuv,width=640,height=480 ! queue ! xvidenc ! queue ! muxout. pulsesrc ! audio/x-raw-int,rate=22000,channels=1,width=16 ! queue ! muxout. avimux name=muxout ! filesink location=video.avi videoout. ! queue ! ffmpegcolorspace");
- pipeline.play();
- }
- void draw() {
- if (pipeline.available()) {
- pipeline.read();
- image(pipeline, 0, 0);
- }
- }
So 'im wondering how to combine this?
I've allready installed GStreamer on the other computer, that has Windows XP.
1