Open githubarooski opened 3 months ago
for now I'm just hard coding it like this, but any tips on fixing it properly would be appreciated
$ cat /etc/supervisor/conf.d/video_looper.conf
# Supervisord configuration to run video looper at boot and
# ensure it runs continuously.
[program:video_looper]
command=/bin/bash /usr/bin/omxplayer -o both --win "0 0 1600 1200" -g --loop /home/pi/video/video.mp4
#command=python3 -u -m Adafruit_Video_Looper.video_looper
autostart=true
autorestart=unexpected
startsecs=5
Hi have you tried adding --win "0 0 1600 1200"
to the videolooper.ini? there is a setting called extra_args that is passed to omxplayer and I think this is exactly what you need in this case...
Hi have you tried adding
--win "0 0 1600 1200"
to the videolooper.ini? there is a setting called extra_args that is passed to omxplayer and I think this is exactly what you need in this case...
Thanks for your quick response. If you read my report, you can see that I've added the argument to the extra_args config and your script is adding those arguments correctly.
Can you help me figure out how to get omxplayer to generate a log file when it is called from your script? I add the -g
to the extra_args, but I can't find the log file anywhere.
sorry for missing that.. please check the output of the videolooper log file like described here: https://github.com/adafruit/pi_video_looper?tab=readme-ov-file#troubleshooting maybe we can also see the omxplayer output there
hm, I read your post now properly - not sure why you would get a black screen as far as I can see pivideolooper runs omxplayer exactly like you so there is no reason why it would not display an image... not that it should matter (because it works with directly calling omx) what OS are you using? is the screen connected to a normal hdmi output?
Using HDMI0 of a raspberry pi 4 connected to the HDMI input of a very niche e-ink monitor from philips.
Here are the only active entries in my config.txt which I pulled from a similar monitor's info via WaveShare.
max_usb_current=1
hdmi_group=2
hdmi_force_hotplug=1
hdmi_mode=87
hdmi_timings=1600 1 64 192 144 1200 1 4 5 41 0 0 0 60 0 150000000 1
nothing is written to video_looper-stderr..
supervisord.log
2024-05-03 19:55:50,631 INFO waiting for video_looper to die
2024-05-03 19:55:50,664 WARN received SIGTERM indicating exit request
2024-05-03 19:55:51,863 INFO stopped: video_looper (exit status 0)
2024-05-03 19:55:52,321 CRIT Supervisor is running as root. Privileges were not dropped because no user is specified in the config file. If you intend to run as root, you can set user=root in the config file to avoid this message.
2024-05-03 19:55:52,321 INFO Included extra file "/etc/supervisor/conf.d/video_looper.conf" during parsing
2024-05-03 19:55:52,343 INFO RPC interface 'supervisor' initialized
2024-05-03 19:55:52,344 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2024-05-03 19:55:52,344 INFO supervisord started with pid 9882
2024-05-03 19:55:53,349 INFO spawned: 'video_looper' with pid 9885
2024-05-03 19:55:58,916 INFO success: video_looper entered RUNNING state, process has stayed up for > than 5 seconds (startsecs)
video_looper-stdout constantly repeats the same log entry 5 times per second:
==> video_looper-stdout---supervisor-_9joFZ.log <==
[2024-05-03 19:56:56.891073] Playing movie: video.mp4 (video) (endless loop)
[2024-05-03 19:56:57.075756] Playing movie: video.mp4 (video) (endless loop)
[2024-05-03 19:56:57.260718] Playing movie: video.mp4 (video) (endless loop)
[2024-05-03 19:56:57.479736] Playing movie: video.mp4 (video) (endless loop)
[2024-05-03 19:56:57.671416] Playing movie: video.mp4 (video) (endless loop)
Oh, and I'm using your distro .zip file directly for the install, not compiling it myself.
hm yes the playing movie entry appears because omxplayer is constantly crashing so pi_video_looper is starting the "next" video... basically pi_video_looper is just a "fancy" process launcher so if you can run omxplayer manually I cant think of a reason why it would not run over pi_video_looper.... what if you remove the -g from custom_args?
removing -g doesn't fix the issue. the only tiny outlier I can think of is that when I initially configured the OS, I set the username as an alternative username. I subsequently added the pi
user back to the OS and the script is now running out of /home/pi/ like it expects to.
$ grep extra_args /home/pi/pi_video_looper/assets/video_looper.ini
extra_args = --no-osd --audio_fifo 0.01 --video_fifo 0.01 --align center --font-size 55
root@hostname:/var/log/supervisor# tail -f *
==> supervisord.log <==
2024-06-03 15:40:37,807 INFO Included extra file "/etc/supervisor/conf.d/video_looper.conf" during parsing
2024-06-03 15:40:37,875 INFO RPC interface 'supervisor' initialized
2024-06-03 15:40:37,875 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2024-06-03 15:40:37,876 INFO supervisord started with pid 468
2024-06-03 15:40:38,884 INFO spawned: 'video_looper' with pid 478
2024-06-03 15:40:44,299 INFO success: video_looper entered RUNNING state, process has stayed up for > than 5 seconds (startsecs)
2024-06-03 15:44:36,104 INFO waiting for video_looper to stop
2024-06-03 15:44:36,496 INFO stopped: video_looper (exit status 0)
2024-06-03 15:44:36,514 INFO spawned: 'video_looper' with pid 7071
2024-06-03 15:44:42,419 INFO success: video_looper entered RUNNING state, process has stayed up for > than 5 seconds (startsecs)
==> video_looper-stderr---supervisor-RdMFA9.log <==
==> video_looper-stdout---supervisor-jott80.log <==
[2024-06-03 15:44:50.560425] Playing movie: video.mp4 (video) (endless loop)
[2024-06-03 15:44:50.964147] Playing movie: video.mp4 (video) (endless loop)
[2024-06-03 15:44:51.382080] Playing movie: video.mp4 (video) (endless loop)
[2024-06-03 15:44:51.795857] Playing movie: video.mp4 (video) (endless loop)
[2024-06-03 15:44:52.188375] Playing movie: video.mp4 (video) (endless loop)
tldr, I reformatted the drive with balena etcher which doesn't give you all the tweaking options that the raspberry pi imager provides and now it's working as expected. I think it was the extra settings portion of the raspberry pi imager which dorked everything up.
Ok, sorry for the many notifications, but I was wrong, this is still a problem, even with a fresh install, then upgrade to 1.0.18 with install.sh
Can you try testing on your end passing a custom resolution via extra_args?
If I call omxplayer directly with my custom resolution, it works fine. If I use your script to call omxplayer with the same arguments, it just shows a black screen and it seems to keep crashing based on looking at
ps aux
If I kill your script and then run it manually, I see this:
You can see that the script is using my custom args successfully from your config file:
But nothing appears on my screen and I can't find the omxplayer.log file on the filesystem anywhere, so I don't think it's creating the log file, even though I am passing it
-g
in the custom arguments config.When I run the command manually, the video plays just fine
When I run my omxplayer command manually and create a log file, I see this in the log file