picam icon indicating copy to clipboard operation
picam copied to clipboard

Text overlay (subtitle) with HLS

Open neon29 opened this issue 3 years ago • 2 comments

To add subtitle I have proceeded as follows:

Modify my run_picam.sh:

sudo bash /home/pi/make_dirs.sh
sudo touch /home/pi/picam/hooks/subtitle
sudo cat  /home/pi/picam/sub  > /home/pi/picam/hooks/subtitle
sudo /home/pi/picam/picam -o /run/shm/hls --alsadev hw:1,0

where cat contains:


text=♨☀♻♥⚠
font_file=/home/pi/NotoSansCJKjp-Regular.otf
pt=120
layout_align=middle,center
letter_spacing=40

I can then watch and listen to my stream at http://ip_address/hls/index.m3u8 for example thanks to VLC. However, I do not see any subtitle.

Does subtitles are expected to work with HLS?

neon29 avatar Mar 05 '21 20:03 neon29

@neon29 Yes, subtitles work with HLS. Have you put a font file /home/pi/NotoSansCJKjp-Regular.otf? If not, you can download the file from https://github.com/googlefonts/noto-cjk/raw/main/NotoSansCJKjp-Regular.otf

iizukanao avatar Mar 16 '21 14:03 iizukanao

Got the same problem. Tried vlc and webstream via nginx. ` text=TEST font_file=/home/pi/Sentinel-Medium.otf pt=18 layout_align=middle,center

`

al3xt3ch avatar May 08 '21 14:05 al3xt3ch