doc: Update build & usage instructions

This commit is contained in:
Glenn Y. Rolland 2023-02-05 16:35:35 +01:00
parent 3c2c7fc3de
commit d52d116e8c

View file

@ -2,51 +2,70 @@
# FOSDEM Recorder
A tool to schedule FOSDEM recordings and help you record the 5+ talks you
wanted to attend at the same time. Only for the impatient who can't wait for
the official videos to be made available.
wanted to attend at the same time.
Only for the impatient who can't wait for the official videos to be made
available (usually this happens a few days after the event).
## Installation
Install project dependencies
If you have Crystal 1.7+ installed on your system:
$ bundle install
shards install
shards build
sudo cp bin/fosdem-recorder /usr/local/bin/fosdem-recorder
If you don't have crystal, you can also build it with docker:
docker run --name fosdem-recorder \
-v $(pwd):/app crystallang/crystal:1.7.1 \
sh -c "cd /app && shards install && shards build"
docker cp fosdem-recorder:/app/bin/fosdem-recorder fosdem-recorder
docker rm fosdem-recorder
mv fosdem-recorder /usr/local/bin/fosdem-recorder
## Usage
Get information about given URL
### Get information about given URL
$ fosdem_recorder info URL
Schedule video download for given URL
$ fosdem_recorder download URL
Real example
Syntax:
```shell-session
$ bundle exec fosdem-recorder info https://fosdem.org/2021/schedule/event/sca_weclome/
* title = FOSDEM 2021 - Software Composition Analysis Devroom Welcome
* start = 14:00
* stop = 14:05
* diff = 00:05:00
* url = https://stream.fosdem.org/dcomposition.m3u8
$ bundle exec fosdem-recorder info https://fosdem.org/2021/schedule/event/sca_weclome/
[... schedules the download with 'at'... ]
[... downloads the file with 'ffmpeg'... ]
[... a MP4 file will be created once the video is downloaded ...]
$ fosdem-recorder info EVENT_URL
```
Real example:
## Development
```shell-session
$ fosdem-recorder info https://fosdem.org/2023/schedule/event/nasa/
Loading data from https://fosdem.org/2023/schedule/event/nasa/
FOSDEM 2023 - Open Source Software at NASA
* event start = 2023-02-05 17:00:00 +01:00
* event stop = 2023-02-05 17:50:00 +01:00
* event length = 00:51:00 (from now: 01:20:00)
* stream url = https://stream.fosdem.org/janson.m3u8
```
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
### Schedule video download for given URL
Syntax:
```shell-session
$ fosdem-recorder download EVENT_URL
```
Real example:
```shell-session
$ fosdem-recorder download https://fosdem.org/2023/schedule/event/nasa/
Loading data from https://fosdem.org/2023/schedule/event/nasa/
Command: echo ffmpeg -i https://stream.fosdem.org/janson.m3u8 -c copy -bsf:a aac_adtstoasc -movflags frag_keyframe+empty_moov+default_base_moof+faststart -t 01:19:00 "FOSDEM-2023-Open-Source-Software-at-NASA.mp4" | at 17:00 2023-02-05
warning: commands will be executed using /bin/sh
job 635 at Sun Feb 5 17:00:00 2023
```
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/glenux/fosdem-recorder.
Send bug reports and patches by email to <opensource@glenux.net>