We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello everyone! I am a student at Penn State University. I am making a project that is a large LED display screen, controlled by a Teensy 3.6 microcontroller. Paul Stoffregen from PJRC Teensy has given me great guidance so far in the project, and has suggested to me that I use a code that he has already had success with for an LED video display, that is made in Processing. It is called movie2serial for converting a video file to the LED display screen. I am however struggling with the addressing for the movie file. I will post the code, so maybe I can get some folks to take a look at this and help me out. These might be pretty basic questions, so I apologize for my lack of understanding, but I am sort of a coding novice!! Thank you so much for anyone willing to view this post and hopefully respond!
2 problems I am having:
1.) I am trying to address the file for the video and I am getting an error. Error is shown in picture.
2.) I am trying to address the COM port that it is plugged into my computer (I'm using Microsoft). I put in "COM4" because that's the location it said in device manager, but I am not sure if it needs more detailed addressing than that.
Answers
Here's the full source code, The writer gave instructions in notes at the beginning as to how to adapt it. NOTE: this is not my work. It belongs to Paul Stoffregen of PJRC
Please edit your post, select your code and hit ctrl+o to format your code. Make sure there is an empty line above and below your code.
This implies the library is not installed. You need to install the library. To do that, open Processing and go to Sketch>>Import Library>>Add library and then search for the video library and install it.
Also, please no screenshots of your code or errors. They are hard to read and they are not searchable in the forum, so other ppl in the community will not be able to reach your post.
Related to the COM port, stick to COM4 if that is what the device manager says where your device is connected. I see you have serialCoinfigure twice (Line 62 and 63) in your code. Is that from the original code or did you add that?
Kf
Hey sorry about that, I am new to this, I will avoid the screenshots. Thanks for the fix though. I formatted the code.
Thank you! I added the library and it looks like the error is gone!! Going to try to finalize this and see if it continues to work.
In regards to the COM ports, yes the original code does include serialConfigure in both lines 62 and 63.
I posted the full original code in the comment above. Maybe that will help shed some light on the ports situation
Any suggestions on what to do for the Ports? I'm using Windows
I don't think these are COM ports' definitions in Windows. I thought you said they were in COM4.
For testing and debugging purposes, you should copy your code and make it more simple. Bring it down to the essentials of communication with the device and some simple operations. It will help with the debugging part. You could also run one of the examples either in the processing foundation page (under libraries >> serial) or available with the serial library in the Processing IDE (Go to File>>Examples>>Libraries>>Serial (I think that is the folder hierarchy...)
One thing about the serialConfig, I think that function allows you to open multiple ports at the same time. I don't think it is valid to open the same port more than once. If you use this code, start by calling serialConfig only once, again for debugging purposes.
Kf
Hey Kf,
I figured it out, it was COM4 but a tiny syntax errorI had made. Unfortunatly I am now getting an error. I have no clue what thus error means??
Error appears as:
** (java.exe:3312): WARNING **: gstvideo: failed to get caps of pad playsink0:video_raw_sink
When running the program, the video player pops up separately but is grayed out, and the above error comes up under the console tab next to errors at the bottom of the Processing window.
You might need to strip down your code to a barely minimum where you test your movie calls. It is easier to debug if you decouple the movie from the serial communication part. An alternative, run the sample code that comes with the video library and test it using your video file.
One thing I can see is that you don't have a call back method for your movie object as presented in the examples. Check here for example: https://processing.org/reference/libraries/video/index.html
Specifically, add this to your code:
Kf