What is B-CAS and Why Do You Need It?
B-CAS (Broadcasting Satellite Conditional Access Systems) is the conditional access system used for encrypted Japanese broadcast TV channels, including most BS and CS satellite channels. To decode these channels, you need a physical B-CAS smart card and a compatible card reader connected to your server.
What is pcscd?
pcscd is the PC/SC Smart Card Daemon โ a Linux service that manages communication between the operating system and smart card readers. Mirakurun uses pcscd internally to interface with the B-CAS card for decrypting encrypted broadcast content.
Option 1 โ Let Mirakurun's Docker Container Run pcscd
The simplest setup is to let Mirakurun's container manage pcscd internally. First, make sure the host pcscd service is stopped and disabled to avoid conflicts:
Then set the environment variable in your docker-compose.yml:
Option 2 โ Use Host pcscd and Mount the Socket
If you prefer to use the host's pcscd service, mount the pcscd socket into the Mirakurun container:
Then disable pcscd inside the container by setting:
Verifying B-CAS Is Working
After setup, try streaming an encrypted BS channel through the Mirakurun API. If the stream plays without scrambling errors, B-CAS decryption is working correctly.