[ICO]NameLast modifiedSizeDescription
[PARENTDIR]Parent Directory  -  
[DIR]dist/2023-07-11 08:51 -  
[DIR]node_modules/2023-06-13 07:17 -  
[DIR]public/2023-06-13 06:47 -  
[DIR]src/2023-07-11 08:37 -  
[   ]Icon 2023-06-13 06:47 0  
[   ]stream2023-06-13 07:15 0  
[   ]db.json2023-06-13 07:15 18  
[   ]babel.config.js2023-06-13 06:47 73 3e510ca test new git [كارل مبارك]
[   ]vue.config.js2023-06-13 06:47 128 3e510ca test new git [كارل مبارك]
[TXT]requestmp4support.sh2023-06-13 06:47 370 3e510ca test new git [كارل مبارك]
[   ]package.json2023-06-13 06:47 1.7K3e510ca test new git [كارل مبارك]
[TXT]README.md2023-07-11 13:38 3.5Kd768d73 docs [كارل مبارك]
[   ]index.js2023-06-13 06:47 5.5K3e510ca test new git [كارل مبارك]
[   ]package-lock.json2023-07-11 08:37 515K3e510ca test new git [كارل مبارك]
# HNI Livestream

Livestream website for Het Nieuwe Instituut
## Set-up

This platform uses MUX, node, VueJS and WebSockets to leverage a simple yet elegant livestreaming solution:
PRODUCTION:  https://stream.nieuweinstituut.nl 

## Pushing

Any software that can produce an RTMP stream can be used. We reccmend using Open Broadcaster Software ([OBS](https://obsproject.com/)). Some instructions previously developed with Hackers & Designers can be found [here](https://wiki.hackersanddesigners.nl/index.php?title=Live_streaming_setup#OBS).

## Admin & API

The following rules apply to both URLs, but I will use the first one to keep it simple. The admin credentials are:
- username: admin
- password: <sent-to-you-privately>
To get the stream’s public details, go to:  

To get the stream key for OBS, go to:   

To get the entire chat, go to:  

To clear the chat, go to:   

## Recordings

Getting recordings from MUX is not simple. Videos are recorded by default, but are not downloadable as mp4. So we need to (1) make a request from MUX to give us an mp4 version of our asset, (2) wait for it to be ready, and (3) download it.

We will use the file listed above: [requestmp4support.sh](requestmp4support.sh). This script is configured specifically for https://stream.hetnieuweinstituut.nl. 

**Never download and run a bash script from an untrusted source.**

1. First download the file [requestmp4support.sh](requestmp4support.sh) to a folder you can easily access.
2. Open a terminal.
3. Type `cd  ` (including a space after) and drag the containing folder of the file into the terminal. The terminal should show: 
cd /path/to/your/containing/folder
4. Hit enter key. 
5. Type `ls`  and then the enter key. You should see the file listed there.
6. Go to MUX dashboard > video > assets > and make sure you have “production” selected from the top drop down
7. Then in the list of assets, find the video you want to download. Usually it’s the one with the duration of the live event. In case the connection cuts off during the event, sometimes there will be two or three assets that you have to download and stitch together.
8. Copy the **`Asset ID`** to your clipboard.
9. Go back to your terminal and type: 
sh requestmp4support.sh YOUR-ASSET-ID
For example: 
sh requestmp4support.sh O9aiInUMfJlBgCKdgkzoTh5NsC00pQYHhSbiiIOGDUWE
10. Hit enter. This command makes a request to MUX to produce the mp4 version of the video.
11. If it doesnt work let me know pls.
12. Then go back to MUX dashboard > API activity > events. Here you will need to wait for the **`video.asset.static_renditions.ready`** event, which happens when the mp4 asset is ready. It could take up to two hours.
13. When the event is there, you can click on it and find the `playback_id`. This is under:
"playback_ids": [
       "policy": "public",
       "id": "IT'S-HERE-:)"
14. Open **`https://stream.mux.com/YOUR-PLAYBACK_ID/high.mp4`** to download the file in high quality. You can replace 'high' with 'medium' or 'low' as well.
15. Please let me know if something doesn't work.

## Authors & License

[Karl Moubarak](https://moubarak.eu)

This codebase has been initially developed as part of a collaboration between [Hackers & Designers and The Hmm](https://github.com/hackersanddesigners/the-hmm-livestream). The source code is licensed under MIT.