aboutsummaryrefslogtreecommitdiff
path: root/README.md
blob: 031a76e358e18085ce9f7a47d5f7bfde6fb498f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# 6.8301 Project

## Installation

```sh
pip install -r requirements.txt
```

If you get an error about importing `creedsolo`, try running:

```sh
pip install --upgrade reedsolo --no-binary "reedsolo" --no-cache --config-setting="--build-option=--cythonize" --use-pep517 --isolated --pre --verbose --force-reinstall
```

If you're using your phone as a webcam, install scrcpy with `pacman -S v4l2loopback-dkms scrcpy linux-headers` on Arch Linux or the equivalent command for your distro. Also, remember to install the correct headers for your kernel. Then, run `sudo modprobe v4l2loopback`.

## Usage

Encode: `python encoder.py -i in`

Play video (SEIZURE WARNING): `mpv --scale=nearest --fullscreen --loop --no-keepaspect vid.mkv`

Copy the flags printed by the encoder and pass them to the decoder: `python decoder.py FLAGS`

Formatting: `black -l 120 *.py`

Use phone as webcam for higher quality video: `scrcpy --no-audio --v4l2-sink=/dev/video4 --video-source=camera --no-video-playback --camera-size 1920x1080 --camera-fps 60`

## Results

| Height | Width | ECC level | Bandwidth (bps) |
| --- | --- | --- | --- |
| 150 | 240 | 0.2 | 2088632 |
| 160 | 256 | 0.2 | 2242199 |