Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output to HDMI ? #131

Open
kazjim opened this issue Sep 5, 2022 · 2 comments
Open

Output to HDMI ? #131

kazjim opened this issue Sep 5, 2022 · 2 comments

Comments

@kazjim
Copy link

kazjim commented Sep 5, 2022

I have a use-case for this where the output would need to go to a standard HDMI attached monitor.
Is this possible with the current version?
thanks

@robweber
Copy link
Collaborator

robweber commented Sep 5, 2022

Kind of, sort of....maybe?

Everything is pretty much focused around using an EPD to output the files, although that doesn't mean with a bit of hackery you couldn't get displaying via HDMI to work. In SlowMovie you could specify a test EPD using -e omni_epd.mock. This will grab a frame and then write it to an image file on the local filesystem. By default this will be called mock_output.png and exist in the working directory. You can overwrite this behavior though.

Once the file is generated you'd need some way of getting it on the screen. There may be an existing app to do this, or you could use some custom Python code. A quick Google search shows a bunch of different ways that could be done. I imagine you're like 90% of the way there if you can figure out that last piece.

@missionfloyd
Copy link
Collaborator

missionfloyd commented Sep 7, 2022

Try fbi or fim.

sudo fbi -T 1 -a --noverbose mock_output.png will display an image fullscreen. Then it should just take a simple shell script to reload the image at regular intervals.

while true
do
    sudo fbi -T 1 -a --noverbose mock_output.png
    sleep 120
    sudo pkill fbi
done

Or put it in slowmovie.py

# Display the image
logger.debug(f"Displaying frame {int(currentFrame)} of {videoFilename} ({(currentFrame/videoInfo['frame_count'])*100:.1f}%)")
subprocess.run(["sudo". "pkill", "fbi"])# kill previous fbi process, if any
epd.display(pil_im)
subprocess.run(["sudo", "fbi", "-T", "1", "-a", "--noverbose", "mock_output.png"])# display new frame

Then set whatever omni-epd options you want (see above, and here). You'll want to at least want to set an output resolution, and I would suggest writing the image to RAM instead of the SD card by setting file=/dev/shm/mock_output.png (remember to change the fbi command accordingly).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants