iizukanao / picam

Audio/video recorder for Raspberry Pi with language agnostic API
GNU Lesser General Public License v2.1
490 stars 78 forks source link

Subtitles #162

Open planet4 opened 3 years ago

planet4 commented 3 years ago

I am about to give up. When running Picam manually subtitles works fine but after using init.d and a restart it does not work at all. I have tried all kind of tricks just to add a title next to the time. What have I missed? Must Picam use system.d instead? What is the proper way of autostarting picam?

iizukanao commented 3 years ago

@planet4 Do you do cd to picam directory before you execute picam command? Also, if possible, please share your script here.

alemelis commented 3 years ago

@planet4 sleep did the trick for me

this is my script to run picam on my raspberrypi

/home/pi/picam/picam -o /run/shm/hls \
    --vfr \
    --autoex \
    --time \
    --alsadev hw:1,0 &
sleep 3

touch /home/pi/hooks/subtitle
sleep 10

cat /home/pi/subs > /home/pi/hooks/subtitle

hope it helps!

(possibly related to #158 ?)