Author Topic: playing video on a raster display  (Read 1947 times)

Offline Steve Gase

  • Sr. Member
  • ****
  • Posts: 2915
    • WinterLightShow in Georgetown, TX
playing video on a raster display
« on: August 28, 2013, »
unlike LSP's ability to play video on a TV monitor, I'd like to use nutcracker to play video segments on a raster (matix) display of RGB pixels.


Unless the feature already exists natively, here is what I attempted...


1. Found a video (cartoon, animation, or high-contrast video)
2. used a conversion tool to create an animated gif.
3. loaded the animated gif into the "Pictures" effect within nutcracker


What I am seeing is a slow display that is too large for my raster display.


I think if the following was done, it might complete the desired effect:


1. resize the incoming gif size to the dimensions of the target raster ( i think 3 options would be useful... A) resize so that the all pixels are shown -- largest source is applied to smallest target) or B) resize on the horizontal dimension, or C) resize on the vertical dimension  [i'm suggesting that the image can be clipped to trim excess horizontal or vertical areas...]
2. center the image to the target display


thoughts?


my objective is to find a simple way to create monster (or santa) face animations on a raster display.  if the source is already synced to music, it avoids the need for Papagayo, etc.
You are not allowed to view links. Register or Login  |  110K channels, 50K lights  |  Nutcracker, Falcon, DLA, HolidayCoro

Offline smeighan

  • Moderator
  • Sr. Member
  • *****
  • Posts: 2285
    • Nutcracker RGB Sequence Builder
Re: playing video on a raster display
« Reply #1 on: August 28, 2013, »
You are not allowed to view links. Register or Login
unlike LSP's ability to play video on a TV monitor, I'd like to use nutcracker to play video segments on a raster (matix) display of RGB pixels.


Unless the feature already exists natively, here is what I attempted...


1. Found a video (cartoon, animation, or high-contrast video)
2. used a conversion tool to create an animated gif.
3. loaded the animated gif into the "Pictures" effect within nutcracker


What I am seeing is a slow display that is too large for my raster display.


I think if the following was done, it might complete the desired effect:


1. resize the incoming gif size to the dimensions of the target raster ( i think 3 options would be useful... A) resize so that the all pixels are shown -- largest source is applied to smallest target) or B) resize on the horizontal dimension, or C) resize on the vertical dimension  [i'm suggesting that the image can be clipped to trim excess horizontal or vertical areas...]
2. center the image to the target display


thoughts?


my objective is to find a simple way to create monster (or santa) face animations on a raster display.  if the source is already synced to music, it avoids the need for Papagayo, etc.

Did you try the movie feature of nutcracker?

1 ) use ffmpeg to convert movie (mp4, avi, mov,mvi,.etc) into a set fo jpg images.

Ffmpeg -i cartoon.mp4 -s 50x25 cartoon-%d.jpg

If you had a ten second cartoon with 30 frames per sec then the ffmpeg command would make 300 jpg files, cartoon-1. Jpg, cartoon-2.jpg .etc. the original frames will be resized to 50 pixels by 25.

Now open the cartoon-1.jpg file in pictures. When you press play nutcracker will flip through all 300 images. You can control playback speed.

Thanks.
Sean
Littleton, CO
Latest releases You are not allowed to view links. Register or Login
xLights/Nutcracker Forum You are not allowed to view links. Register or Login
Fbook You are not allowed to view links. Register or Login

Offline Steve Gase

  • Sr. Member
  • ****
  • Posts: 2915
    • WinterLightShow in Georgetown, TX
Re: playing video on a raster display
« Reply #2 on: August 28, 2013, »
No, I did not try that, but that sounds perfect! 

I'll give it a try tonight when i'm back home.

Thanks sean!!
You are not allowed to view links. Register or Login  |  110K channels, 50K lights  |  Nutcracker, Falcon, DLA, HolidayCoro

Offline Steve Gase

  • Sr. Member
  • ****
  • Posts: 2915
    • WinterLightShow in Georgetown, TX
Re: playing video on a raster display
« Reply #3 on: August 28, 2013, »
Oh... Is everything bound to 30fps?  With normal 50ms rate being used, will nutcracker make all of the adjustments automatically?
You are not allowed to view links. Register or Login  |  110K channels, 50K lights  |  Nutcracker, Falcon, DLA, HolidayCoro

Offline smeighan

  • Moderator
  • Sr. Member
  • *****
  • Posts: 2285
    • Nutcracker RGB Sequence Builder
Re: playing video on a raster display
« Reply #4 on: August 28, 2013, »
You are not allowed to view links. Register or Login
Oh... Is everything bound to 30fps?  With normal 50ms rate being used, will nutcracker make all of the adjustments automatically?

you get 30 images per second, when you adjust the speed slider i think it skips some frames. I know when i watch a movie of my sons running i can make the playback play at exactly the original speed. i can also slow the playback to about 2x slower and maybe 5x faster than the original speed.
Sean
Littleton, CO
Latest releases You are not allowed to view links. Register or Login
xLights/Nutcracker Forum You are not allowed to view links. Register or Login
Fbook You are not allowed to view links. Register or Login

Offline Steve Gase

  • Sr. Member
  • ****
  • Posts: 2915
    • WinterLightShow in Georgetown, TX
Re: playing video on a raster display
« Reply #5 on: August 28, 2013, »
Perfect!


I had to play a bit to get the sizing right, but it is certainly doable.


I took video from youtube.com using the ssyoutube.com service.
The result for this source video was 640x360.


My target matrix is 30x24.


When I used ffmpeg to convert to 30x24, the resulting images had the top part of the image cropped out...  it confined the horizontal dimension to 30, but the scaling resulted in the top 1/3 being cropped.


Next I tried a conversion to 30x16, and the resulting image was complete -- but scrunched... source video had croppable areas to the left and right -- and they were still showing, but I only used 16 of the 24 rows.


Finally, I tried 42x24 and got what I needed!  The vertical part of the video used all 24 rows.  If I set Nutcracker movement to "none", then the image was centered in the matrix and the sides were properly cropped out of the view.


So... some fiddling is needed based on source dimensions and your desire where to see cropping, but now that I have my process down there is no end to what can be done with the capability.


Thanks!!
You are not allowed to view links. Register or Login  |  110K channels, 50K lights  |  Nutcracker, Falcon, DLA, HolidayCoro