From 0d591c2575dafb955b79b451ae1b0343cb45f64c Mon Sep 17 00:00:00 2001 From: dudash Date: Sun, 6 Feb 2022 13:55:36 -0500 Subject: [PATCH] screenshot --- .clivrt | 2 +- README.md | 24 ++++++++++ docs/README-buildnotes.md | 94 +++++++++++++++++++-------------------- 3 files changed, 72 insertions(+), 48 deletions(-) diff --git a/.clivrt b/.clivrt index f62c636..90317a0 100644 --- a/.clivrt +++ b/.clivrt @@ -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 \ No newline at end of file diff --git a/README.md b/README.md index 698078e..93c9f91 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 diff --git a/docs/README-buildnotes.md b/docs/README-buildnotes.md index 1fd2b2b..4a3b991 100644 --- a/docs/README-buildnotes.md +++ b/docs/README-buildnotes.md @@ -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