Skip to content

Commit

Permalink
screenshot
Browse files Browse the repository at this point in the history
  • Loading branch information
dudash committed Feb 6, 2022
1 parent c9e3124 commit 0d591c2
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 48 deletions.
2 changes: 1 addition & 1 deletion .clivrt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
signalinghosturl = wss://signaling-s-dudash-dev.apps.sandbox.x8i5.p1.openshiftapps.com
autoanswer = true
loglevel = WARN
videostyle = just-ascii
videostyle = ascii-color
webcam = /dev/video0
framerate = 30
video_size = 800x600
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,33 @@
# clivrt
CLI app to do video calls but from the terminal. Just fun little project that let's you chat with friends in a retro kidna way - while staying in your CLI.

![Screenshot](docs/clivrtsmilethumbsup.png?raw=true)

## How to use this
TBD

## CLI reference
TBD

### Config File
If file is is located in the same folder as the cli executable and named `.clivrt`, it will be used for default config. Here's an example:
```
[DEFAULT]
signalinghosturl = wss://signaling-s-dudash-dev.apps.sandbox.x8i5.p1.openshiftapps.com
autoanswer = true
loglevel = WARN
videostyle = just-ascii
webcam = /dev/video0
framerate = 30
video_size = 800x600
```
* signalinghosturl = Which server to connect to for finding/connecting/chatting with peers (note once a peer connection is established this is no longer required for video chat). Must begin with ws:// or wss://
* loglevel = [INFO, DEBUG, WARN, ERROR, CRITICAL] how much log data to display
* videostyle = [just-ascii, ascii-color, filled-ascii]
* webcam = Path to your webcam. Some examples: [linux: /dev/video0, windows: video=Integrated Camera, mac: default:none]
* framerate = outgoing video framerate
* video_size = outgoing video resolution

## For Developers and Architects

### About WebRTC
Expand All @@ -19,6 +41,8 @@ The main reasons WebRTC was picked for this are:
The supported platform is currently just linux. If you're on windows you can use WSL.
This project uses pipenv for dependency management.

[even more info here](./docs/README-buildnotes.md)

### Contributing
TBD

Expand Down
94 changes: 47 additions & 47 deletions docs/README-buildnotes.md
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
# Build Notes
Some random notes on building - this is all in progess and subject to change

## About requirements.txt
We don't really use this anymore - switched to Pipfile. Keeping it here for posterity by running:
`pipenv lock -r > requirements.txt`

## Manually creating a release
2022-02-03: There were a bunch of odd errors using pyinstaller which look like bug with the latest release. For now I have switched to using the dev release, which you can see in the Pipfile (`pyinstaller = {file = "https://github.com/pyinstaller/pyinstaller/archive/develop.zip"}`)

The way to create a release:
`pyinstaller --add-data .clivrt:. --onefile clivrt.py`

Which dumps clivrt into `./dist/clivrt`

## Building on a Jetson Nano (arm64)
I've been experimenting with building this on a [NVIDIA Jetson Nano](https://developer.nvidia.com/embedded/jetson-nano-developer-kit). Here are some extra steps you'll need to take to get that going.
(Note: I'm not sure these are the *best* way to get it working, but it *is* what I did)


* Setup Python 3.8
```
sudo apt-get install python3-pip python3.8 python3.8-dev
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 1
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 2
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 3
sudo update-alternatives --config python3
sudo pip3 install pipenv
```
* Install newer ffmpeg > 4.2+ ([from notes here](https://forums.developer.nvidia.com/t/hardware-accelerated-video-playback-with-l4t-ffmpeg/154019))
```
echo "deb https://repo.download.nvidia.com/jetson/ffmpeg main main" | sudo tee -a /etc/apt/sources.list
echo "deb-src https://repo.download.nvidia.com/jetson/ffmpeg main main" | sudo tee -a /etc/apt/sources.list
sudo apt update
```

* Install dependencies for aiortc

There seems to be an issue on the jetson with a mismatch in dependencies with NVIDIA's ffmpeg and pyAv - [more details here](https://github.com/PyAV-Org/PyAV/issues/619), looks like I might need to build ffmpeg from source. The challenge will be to ensure I can still leverage any patches/build options NVIDIA added for leveraging their hardware performance.
```
sudo apt-get install libopus-dev libvpx-dev
```

* Build container

This is TBD but using these links might help: https://github.com/dusty-nv/jetson-containers#pre-built-container-images
https://github.com/NVIDIA/nvidia-docker/wiki/NVIDIA-Container-Runtime-on-Jetson
# Build Notes
Some random notes on building - this is all in progess and subject to change

## About requirements.txt
We don't really use this anymore - switched to Pipfile. Keeping it here for posterity by running:
`pipenv lock -r > requirements.txt`

## Manually creating a release
2022-02-03: There were a bunch of odd errors using pyinstaller which look like bug with the latest release. For now I have switched to using the dev release, which you can see in the Pipfile (`pyinstaller = {file = "https://github.com/pyinstaller/pyinstaller/archive/develop.zip"}`)

The way to create a release:
`pyinstaller --add-data .clivrt:. --onefile clivrt.py`

Which dumps clivrt into `./dist/clivrt`

## Building on a Jetson Nano (arm64)
I've been experimenting with building this on a [NVIDIA Jetson Nano](https://developer.nvidia.com/embedded/jetson-nano-developer-kit). Here are some extra steps you'll need to take to get that going.
(Note: I'm not sure these are the *best* way to get it working, but it *is* what I did)


* Setup Python 3.8
```
sudo apt-get install python3-pip python3.8 python3.8-dev
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 1
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 2
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 3
sudo update-alternatives --config python3
sudo pip3 install pipenv
```
* Install newer ffmpeg > 4.2+ ([from notes here](https://forums.developer.nvidia.com/t/hardware-accelerated-video-playback-with-l4t-ffmpeg/154019))
```
echo "deb https://repo.download.nvidia.com/jetson/ffmpeg main main" | sudo tee -a /etc/apt/sources.list
echo "deb-src https://repo.download.nvidia.com/jetson/ffmpeg main main" | sudo tee -a /etc/apt/sources.list
sudo apt update
```

* Install dependencies for aiortc

There seems to be an issue on the jetson with a mismatch in dependencies with NVIDIA's ffmpeg and pyAv - [more details here](https://github.com/PyAV-Org/PyAV/issues/619), looks like I might need to build ffmpeg from source. The challenge will be to ensure I can still leverage any patches/build options NVIDIA added for leveraging their hardware performance.
```
sudo apt-get install libopus-dev libvpx-dev
```

* Build container

This is TBD but using these links might help: https://github.com/dusty-nv/jetson-containers#pre-built-container-images
https://github.com/NVIDIA/nvidia-docker/wiki/NVIDIA-Container-Runtime-on-Jetson

0 comments on commit 0d591c2

Please sign in to comment.