Stream processes

30 views
Skip to first unread message

jammin radio

unread,
Nov 11, 2024, 7:21:26 PM11/11/24
to mists...@googlegroups.com
can you please give me an example for multiple resolution options.
1080 - 720 640 ect 

kind regards

Balder Vietor

unread,
Nov 27, 2024, 8:22:55 AM11/27/24
to mists...@googlegroups.com
Hey there,

Apologies for the long wait, I missed your question, so hopefully I'm still somewhat on time.

We've got an article on the question here:

Using the code there for 720p, 480p and 360p you can adapt that to fit the other resolutions:
```
ffmpeg -loglevel quiet -hide_banner -fflags nobuffer -i - -map v:0 -map v:0 -map v:0 -map v:0 -map a:0 -c:v:0 copy -c:v:1 h264 -b:v:1 2000k -s:v:1 1280x720 -c:v:2 h264 -b:v:2 1000k -s:v:2 854x480 -c:v:3 h264 -b:v:3 500k -s:v:3 640x360 -c:a:0 copy -force_key_frames source -bf 0 -cluster_time_limit 0 -preset ultrafast -f matroska -
```

The thing would be to add a `-map v:0` per resolution you want to add, and make sure to set the `-b:v:# ` and `-s:v:#` per additional quality.

Here would be one for 1080p, 720p and 480p (imo the 360p is a bit redundant). 

```
ffmpeg -loglevel quiet -hide_banner -fflags nobuffer -i - -map v:0 -map v:0 -map v:0 -map v:0 -map a:0 -c:v:0 copy -c:v:1 h264 -b:v:1 5000k -s:v:1 1920x1080 -c:v:2 h264 -b:v:2 2000k -s:v:2 1280x720 -c:v:3 h264 -b:v:3 1000k -s:v:3 854x480 -c:a:0 copy -force_key_frames source -bf 0 -cluster_time_limit 0 -preset ultrafast -f matroska -
```

Do note that this task can be heavy on the CPU, so if hardware encoding such as `nvenc` or `h264_qsv` is available you will most likely want to consider it.

With kind regards,

Balder Viëtor
Head of Testing

MistServer


--
You received this message because you are subscribed to the Google Groups "Mistserver.org" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mistserver+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/mistserver/CAD%3DndbnoHe67XmeFxq%3D%2BDCfdh9Y83vccKy_FgMRN%3DFE15d%3D1FQ%40mail.gmail.com.

jammin radio

unread,
Nov 29, 2024, 1:29:44 PM11/29/24
to mists...@googlegroups.com
bit confused on where to imput the data on the panel and the guied is not vert strait forward , if you have not done it before 

kind regards

Balder Vietor

unread,
Dec 3, 2024, 3:55:12 AM12/3/24
to mists...@googlegroups.com
Heya,

There's 2 methods, you can set it up as a bash script by adding the header:

```
#!/bin/bash

ffmpeg -loglevel quiet -hide_banner -fflags nobuffer -i - -map v:0 -map v:0 -map v:0 -map v:0 -map a:0 -c:v:0 copy -c:v:1 h264 -b:v:1 5000k -s:v:1 1920x1080 -c:v:2 h264 -b:v:2 2000k -s:v:2 1280x720 -c:v:3 h264 -b:v:3 1000k -s:v:3 854x480 -c:a:0 copy -force_key_frames source -bf 0 -cluster_time_limit 0 -preset ultrafast -f matroska -

```
Name this script encoding.sh  and put it anywhere you like. Then as a stream process add it to the stream by linking to the script:
image.png

The other option would be using it directly as executable:

image.png

Which can make it slightly harder to see what it is doing. So I usually go for the bash script method.

Optional, setting the masks

You might want to hide the original quality as well:
image.png

This would hide it from viewers, but not from recording or processing.

While the added tracks you will probably want to hide from processing, to avoid encoding using a lesser quality:
image.png

Your interface might look a bit different. That's because we're close to releasing a new one.


With kind regards,

Balder Viëtor
Head of Testing

MistServer

Reply all
Reply to author
Forward
0 new messages