PDA

View Full Version : syphon to octows2811 (via movie2serial)



ianwinters
03-30-2013, 08:30 PM
I should say I'm relatively new to working in processing & with the teensy 3.0. But -- I just received the first batch of teensy 3's a few days ago and have found the new octo library quite amazing, and have a setup of about 800 ws2811's working happily.

I've run into problems on my next step -- sending a live video stream from other software (isadora & jitter) by replacing the movie player in Paul's movie2serial sketch with a Syphon feed.

While I can get it to compile I'm generating serial port lock errors and a null pointer exception that I can't find, and, know I'm running up against my very rudimentary processing knowledge.

My concern is that changing from using the movie function to using the syphon feed (which is a Pgraphics & canvas subclass without a defined framerate) has some underlying incompatibility I don't know about...

If anyone has any feedback about whether my approach is headed in the right direction it'd be much appreciated.

And if anyone wants to look at my somewhat clumsy code changes I'll happily post once I've had another try at finding the missing constructor.

thanks!

PaulStoffregen
03-31-2013, 02:17 AM
So far, I haven't tried to do anything other than play files. But I'm planning to look at this soon.

If you'd like to discuss it here, please post your code and an exact copy of the error.

ianwinters
03-31-2013, 09:25 PM
Hello Paul -- thanks for taking look.

I've gotten a little farther -- I'm getting one frame to come through syphon before a "port in use exception". it looks almost like the serial initialization is running twice as the list of serial ports prints once, then I get syphon frame, then a second listing of serial ports and the list of exception errors.

The exact error trace is:

Serial Ports List:
[0] "/dev/tty.Bluetooth-PDA-Sync"
[1] "/dev/cu.Bluetooth-PDA-Sync"
[2] "/dev/tty.Bluetooth-Modem"
[3] "/dev/cu.Bluetooth-Modem"
[4] "/dev/tty.usbmodem12341"
[5] "/dev/cu.usbmodem12341"
Serial Ports List:
[0] "/dev/tty.Bluetooth-PDA-Sync"
[1] "/dev/cu.Bluetooth-PDA-Sync"
[2] "/dev/tty.Bluetooth-Modem"
[3] "/dev/cu.Bluetooth-Modem"
[4] "/dev/tty.usbmodem12341"
[5] "/dev/cu.usbmodem12341"
RXTX uucp_lock() /var/lock/LK.074.018.006 is there
gnu.io.PortInUseException: Unknown Application
at gnu.io.CommPortIdentifier.open(CommPortIdentifier. java:354)
at processing.serial.Serial.<init>(Serial.java:178)
at processing.serial.Serial.<init>(Serial.java:120)
at movie2serial_syphon.serialConfigure(movie2serial_s yphon.java:225)
at movie2serial_syphon.setup(movie2serial_syphon.java :101)
at processing.core.PApplet.handleDraw(PApplet.java:22 41)
at processing.opengl.PGL$PGLListener.display(PGL.java :3240)
at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawa bleHelper.java:573)
at jogamp.opengl.GLDrawableHelper.display(GLDrawableH elper.java:558)
at jogamp.opengl.GLAutoDrawableBase$2.run(GLAutoDrawa bleBase.java:286)
at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDraw ableHelper.java:1021)
at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawable Helper.java:896)
at com.jogamp.newt.opengl.GLWindow.display(GLWindow.j ava:545)
at processing.opengl.PGL.requestDraw(PGL.java:1197)
at processing.opengl.PGraphicsOpenGL.requestDraw(PGra phicsOpenGL.java:1550)
at processing.core.PApplet.run(PApplet.java:2140)
at java.lang.Thread.run(Thread.java:680)
Serial port /dev/tty.usbmodem12341 does not exist or is non-functional
Available Syphon servers:


I've attached the version of your movie2serial that I've been trying to modify, with comments on what I've changed preceded by "***"

The only additional required library is the codeanticode.syphon library at http://code.google.com/p/syphon-implementations/downloads/detail?name=Syphon%20for%20Processing%202.0%20Publ ic%20Beta%202%20r7.zip&can=2&q=

355

If you want to use a simple syphon testing server. Run the syphon "simple server" app included in the syphon library, and change the server name in line 64 of movie to serial to "Processing Server".

Thanks again for any thoughts / assistance.

Ian

ianwinters
04-19-2013, 11:54 PM
Hello Paul,


Wanted to pass on a video link https://vimeo.com/64370740 to the first prototype of the project I was looking at using Syphon with. It's now up and going as a temporary sculpture at the Djerassi Arts program - there's a bit showing low-res video, and some as pure light as a color test. It's running on Teensy 3.0s & your octows2811 library, with video being processed in isadora and sent over a serial connection to the teensies. The speed and framesync portion of the library turned out to be really useful.

Once my code is a little more stable I'll post it to share.

Thanks again for a great library!

Ian

donFirefly
05-02-2013, 06:44 AM
Hey Ian, I am actually in the process of developing a project quite similar to this however I was initially planning on using the infrared camera on a Kinect. I was wondering if you could either post your fixed code here or email it to me (don't really mind if it is in an unstable state). Curious to see what you did to get it fixed since I am in a similar boat as you with minimal coding experience.

hunter
05-03-2013, 04:55 PM
Hey Guys,
I too am working on a large 160x80 mobile video wall for this year's burn. It uses a kinect, reacts to music (via minim), plays video clips, etc... You'll find the code here: https://github.com/hluisi/LEDWall/tree/master/processing/LEDWall

Please note that the code is far done, has very few comments, and is a bit of a mess at the moment. But you may (or may not) find useful.

ianwinters: I've made few small mods to paul's movie2serial. Looking at the serial and wall files may help u.

donFirefly: the kinect file may help

-H

**edit added the right link :)

PaulStoffregen
05-03-2013, 05:34 PM
Awesome. I really want to see some pics of those 12800 LEDs!!!!

I'm working on an exhibit for Maker Faire, writing new code directly in C using the Linux v4l2 library. It's able to update all 1920 LEDs at 30 frames/sec using 20% CPU on a Beaglebone Black. It runs about 10% CPU when only reading the webcam and not transmitting anything, so about half that CPU time is the webcam's 320x240 reception, YUV-RGB conversion & scaling down to 60x32 size, and the other half seems to be converting the OctoWS2811's format and transmitting.

I'm adding code now to read animated GIF files and display them as an overlay when triggered. Will publish all this code as open source in a couple weeks.

sumotoy
05-03-2013, 11:14 PM
Paul, you convinced me! I got a beaglebone v6 time ago and I wasn't really impressed, in particular because beagle forum it's a mess and full of un-answered questions and also expensive and no video support (strangely in the site they claim HDMI support!?!?). Now they come out with this Beaglebone Black that on paper it's really interesting and surprisely cheap!!! I just got mine from mouser, really exciting to see your contribution!!
Hunter, it looks amazing what you've done! I really want to see a video or a picture!! And of course I love kinect (apart microsoft's always twisted way to provide code support).

hunter
05-04-2013, 08:47 PM
Parts get here Monday. Photos and videos soon :)

hunter
05-12-2013, 09:16 PM
Here are a few photos as promised. Still have a lot to do. More to come...

https://plus.google.com/photos/103265059475645622476/albums/5877189985949666897

Sebastian Wangler
06-26-2017, 09:39 AM
Hi

I am currently working on a "large" LED-Wall project. It is built of 4 panels (50x125cm) each with its own power source and each carrying 592 LEDs.
I managed to get a nice video feed through movie2serial (processing 3.3.1)

What I would like to do: use syphon to send video from any video remote-software (resolume, millumin...) to processing, read the frames and convert them to octows2811 raw data in order to send them to my teensy 3.2 board.

What I found: skript which is reading syphon frames: https://github.com/Syphon/Processing/tree/master/examples/ReceiveFrames

-> can somebody help me to combine the receiveframes skript with the movie2serial?

Thanks a lot!

Cheers Sebastian