• Home
Name Date Size #Lines LOC

..--

cast_core/api/03-May-2024-1,4411,174

common/03-May-2024-7,9255,521

protocol/03-May-2024-969863

receiver/03-May-2024-2,3621,817

sender/03-May-2024-3,4392,560

standalone_receiver/03-May-2024-2,7541,916

standalone_sender/03-May-2024-4,3772,902

streaming/03-May-2024-23,45115,829

test/03-May-2024-844692

third_party/03-May-2024-149

.gitignoreD03-May-202430 32

DEPSD03-May-2024279 1814

README.mdD03-May-20242.6 KiB5543

standalone_e2e.pyD03-May-202413.6 KiB358277

README.md

1# libcast
2
3libcast is an open source implementation of the Cast protocol supporting Cast
4applications and streaming to Cast-compatible devices.
5
6## Using the standalone implementations
7
8To run the standalone sender and receivers together, first you need to install
9the following dependencies: FFMPEG, LibVPX, LibOpus, LibSDL2, LibAOM as well as
10their headers (frequently in a separate -dev package). Currently, it is advised
11that most Linux users compile LibAOM from source, using the instructions at
12https://aomedia.googlesource.com/aom/. Older versions found in many package
13management systems have blocking performance issues, causing AV1 encoding to be
14completely unusable. From here, you just need a video to use with the
15cast_sender, as the cast_receiver can generate a self-signed certificate and
16private key for each session. You can also generate your own RSA private key and
17either create or have the receiver automatically create a self signed
18certificate with that key. If the receiver generates a root certificate, it will
19print out the location of that certificate to stdout.
20
21Note that we assume that the private key is a PEM-encoded RSA private key,
22and the certificate is X509 PEM-encoded. The certificate must also have
23the CA bit set in the basic constraints. The easiest way to test with a key
24and certificate is to use ones generated by the cast_receiver standalone
25application.
26
27## Developer certificate generation and use
28
29The easiest way to generate a private key and certificate is to just run
30the cast_receiver with `-g`, and both should be written out to files:
31
32```
33  $ /path/to/out/Default/cast_receiver -g
34    [INFO:../../cast/receiver/channel/static_credentials.cc(161):T0] Generated new private key for session: ./generated_root_cast_receiver.key
35    [INFO:../../cast/receiver/channel/static_credentials.cc(169):T0] Generated new root certificate for session: ./generated_root_cast_receiver.crt
36```
37
38These generated credentials can be passed in to start a session, e.g.
39```
40./out/Default/cast_receiver -d generated_root_cast_receiver.crt -p generated_root_cast_receiver.key lo0
41```
42
43And then passed to the cast sender to connect and start a streaming session:
44```
45  $ ./out/Default/cast_sender -d generated_root_cast_receiver.crt lo0 ~/video-1080-mp4.mp4
46```
47
48When running on Mac OS X, also pass the `-x` flag to the cast receiver to
49disable DNS-SD/mDNS, since Open Screen does not currently integrate with
50Bonjour.
51
52When connecting to a receiver that's not running on the loopback interface
53(typically `lo` or `lo0`), pass the `-r <receiver IP endpoint>` flag to the
54`cast_sender` binary.
55