Jump to content
C4 Forums | Control4

touch screen and "now playing" with CD changers


ziocan

Recommended Posts


21 hours ago, Cyknight said:

Nicely done - though your are essentially bypassing the original goal of having this showing under now playing as well as screensavers media art.

;)

 

I installed the screensaver agent, it says I can use pictures from the controller hard drive as a source.

However, it doesn't list that as a selectableoption, it only lists a network share that I use for movies as possible file storage location.

Any hints about how to enable the controller hard drive to the list?

 

Thanks

Rick

 

 

 

 

storage file.jpg

Link to comment
Share on other sites

19 minutes ago, ziocan said:

 

I installed the screensaver agent, it says I can use pictures from the controller hard drive as a source.

However, it doesn't list that as a selectableoption, it only lists a network share that I use for movies as possible file storage location.

Any hints about how to enable the controller hard drive to the list?

 

Thanks

Rick

 

 

 

 

storage file.jpg

While I am just taking a guess here, that is probably referring to older controllers that had internal hard drives for storage (HC-500, for example).

Link to comment
Share on other sites

Never mind, I can duplicate the network storage driver and using SMB protocol....

/control4# smbclient -L localhost
Password: 
Domain=[CONTROL4HOME] OS=[Unix] Server=[Samba 3.0.37]

	Sharename       Type      Comment
	---------       ----      -------
	media           Disk      Media Directory
	db              Disk      Media Database
	drivers         Disk      Driver Directory
	skins           Disk      Skin Directory
	log             Disk      Log Directory
	updatelog       Disk      Update Log direcotry

 

Link to comment
Share on other sites

Guys trying to fool the controller again so that the "random photo screensaver" will  become "show current cover art" :-)

The recent models like HC250 and HC800 _do_ have an internal storage. It's flash, not HD but _can_  be used.... I just mounted my HC800 media folder as a network share by duplicating the network share driver and connecting to my controller's IP address and "media" share as listed above. It just works.

Still have to see if my idea is feasible (random pictures screen saver which actually only chooses the same picture over and over, except I will update that picture with the current album playing's cover art)

Link to comment
Share on other sites

10 hours ago, Cyknight said:

Not just unstable, that memory if memory serves (no pun intended) is used as volatile memory, using it for 'storage' and exterior read access is liable to create issues.

I installed tons of extra utilities on the controller, no problem at all. There is a lot of free space in the HC800.

Only possible instability you can have is if you happen to fill the available space, because driver sandboxes reside on the same filesystem.

I am not going to upload anything anyway. I will try to build a link to the current playing CD's artwork file, which will be repointed each time the disc is changed.  I'll let you know if I succeed.

Link to comment
Share on other sites

5 hours ago, ziocan said:

I installed tons of extra utilities on the controller, no problem at all. There is a lot of free space in the HC800.

Only possible instability you can have is if you happen to fill the available space, because driver sandboxes reside on the same filesystem.

I am not going to upload anything anyway. I will try to build a link to the current playing CD's artwork file, which will be repointed each time the disc is changed.  I'll let you know if I succeed.

HAH!, then your system must not be all that large, because I was pushing 'room' on mine ;)

Happy hunting!

Link to comment
Share on other sites

15 minutes ago, Cyknight said:

HAH!, then your system must not be all that large, because I was pushing 'room' on mine ;)

 

Right!! Only 2 rooms,  not large at all. Agree, YMMV. But then, with large installations, you have multiple controllers to hack into :-)

Link to comment
Share on other sites

3 hours ago, ziocan said:

Right!! Only 2 rooms,  not large at all. Agree, YMMV. But then, with large installations, you have multiple controllers to hack into :-)

Not really. First I'm not so sure you'd be able to 'call' secondary controllers, second because if planned from the start it is entirely possible to have an EA5 (or HC800) as your only and only true controller, supplemented by i/o extenders as needed running a HUGE system.

It would also not need to be big as far as rooms etc goes, it will depend on what drivers you have (new c4z drivers with icons take up MUCH more space for example), but also the existing size of your media library (800 CDs and/or DVD is not a large number at all depending on who you're asking.....)

Link to comment
Share on other sites

It all depends what you mean with "call"....  there is only one director of course, so you can only "call" primaries but again the fantasy is the limit :-)

Drivers using new media proxy have html files and images loaded on the controller I see... but it would be easy to trick a controller to use external storage even for internal things like drivers sandboxes or even internal www server. 

I know, 800 slots is poor man's Collection ... but isn't people getting rid of changers anyway ;-)

And oh the screensaver trick works perfecto!!

 

Basically, I set up an extra instance of the network storage driver, then I connected to a share on the controller itself, on localhost (127.0.0.1) .

Then I went to media section of composer and uploaded a single image - a random one, it doesn't matter what.

Composer creates several images out of this one, and uploads them all on the controller in /mnt/media/control4_pictures/control4_pictures.

Two steps were needed on controller to enable current cover art to become my screen saver:

- add one more line in nowplaying.cgi script (new version attached below), which basically copies the image that I send to the popup when track changes also to a file named /mnt/media/control4_pictures/control4_pictures/800x480/nowplaying.jpg

- replace the image file that composer uploaded with a symbolic link to nowplaying.jpg:

/mnt/media/control4_pictures/control4_pictures/800x480# ls -l
-rw-r-----    1 root     root          5199 Apr 27 21:16 nowplaying.jpg
lrwxrwxrwx    1 root     root            14 Apr 27 20:12 nowplaying_C4ef5c1cbe-1231-4fb1-91b3-82fd14c8c1c8.jpg -> nowplaying.jpg

Basically what happens is, when the screensaver kicks in, it thinks that it has a slideshow of pictures available. In fact it has a slideshow, but it only contains one picture. The trick is that I change this picture each time the cover art changes. I was not sure that the director was re-sending the picture again and again in this particular situation with only one picture, but it does :-) So when cover art changes the new one is sent, and at next loop of the navigator's screen saver, the new cover will show up. 

Not sure I will use the screen saver though. If I decide to, I might need to upload to the controller the linux pbm suite so I can scale up the cover and also add track information to the image :-)

 

#!/bin/sh
#
ALBUM_ROOT=/mnt/media/images/album
cover_path=$(cat /control4/drivers/lua/sandbox/*/now_playing_cover.txt)
echo -e "Content-type: image/jpeg\r\n"
cat $ALBUM_ROOT/$cover_path.jpg
cp $ALBUM_ROOT/$cover_path.jpg /mnt/media/control4_pictures/control4_pictures/800x480/nowplaying.jpg
exit 0

 

 

IMG_4868.JPG

Link to comment
Share on other sites

There you go. Font is the default netpbm one but can be easily improved.

Screenshoot + upgraded nowplaying.cgi script. Also had to modify driver to write out track info in a file,  I was only dumping artwork path).

 

#!/bin/sh
#
ALBUM_ROOT=/mnt/media/images/album
SS_DIR=/mnt/media/control4_pictures/control4_pictures/800x480
cover_path=$(cat /control4/drivers/lua/sandbox/*/now_playing_cover.txt)
line1=$(cat /control4/drivers/lua/sandbox/*/now_playing_info.txt | head -1)
line2=$(cat /control4/drivers/lua/sandbox/*/now_playing_info.txt | tail -1)
echo -e "Content-type: image/jpeg\r\n"
cat $ALBUM_ROOT/$cover_path.jpg
cat $ALBUM_ROOT/$cover_path.jpg | jpegtopnm 2>/dev/null | pnmscale -height 320 > $SS_DIR/cover.pnm
pbmtext -builtin bdf "$line1" | ppmchange rgb:0/0/0 rgb:ff/ff/0 rgb:ff/ff/ff rgb:0/0/0 | pnmscale 3  > $SS_DIR/cdinfo1.pbm
pbmtext -builtin bdf "$line2" | ppmchange rgb:0/0/0 rgb:ff/ff/0 rgb:ff/ff/ff rgb:0/0/0 | pnmscale 2 > $SS_DIR/cdinfo2.pbm
pnmcat -black -tb $SS_DIR/cdinfo1.pbm $SS_DIR/cdinfo2.pbm $SS_DIR/cover.pnm | pnmtojpeg -quality=100 > $SS_DIR/nowplaying.jpg
exit 0

 

IMG_4872.JPG

Link to comment
Share on other sites

I have installed a better font :)

I noticed, however, that the screen saver alternates between two different sizes of the image. I have added a screenshot of both. It alternates every time it loops (I set it to change picture every 15 seconds).  Having never tried the picture screensaver with the Agent before, can you confirm that this is somewhat normal?

Thanks

Rick

 

IMG_4873.JPG

IMG_4874.JPG

Link to comment
Share on other sites

Hmmm... I will check resolution of the generated image, however, before the upscaling/labelling thing, the cover art was displayed as a tiny image and this makes me think the screensaver will just fetch the image from the specified folder (named after the resolution, in this case 800x480) and display it. After all, this makes sense: Composer is creating versions of images for all the resolution types, why should the screen saver (or the navigator itself for that matter) have to resize them?  The images are supposed to be properly sized by Composer at time of upload.

I suspect that the saver sees that I only have a single picture in the show, and therefore thinks that this single picture will not save the screen at all, since it would never be changing (well in its mind at least). Therefore, it zooms in  and out the single picture in order to try to save screen from burn out. If this theory is correct (and it would be a clever idea from C4 anyway) this means that creating two "fake" images instead of one should stop this zooming thing.  I'll try this later this evening, when I'll be home.

 

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.