Encoding introduction
Here we will be describing what encoding is, when you should encode and what encoders you can use with MistServer. If you're looking for a guide and examples handling encoding please visit the encoding guide.
What is encoding?
Any change needed to be made to the video or audio data itself will need to be done through encoding. This is done by uncompressing the video or audio data and then recompressing it. Generally speaking encoding comes with loss of information and thus loss of quality. This is not always a bad thing however as raw video tends to go into bandwidth usage of gigabits per second and this would be severely impractical for internet usage.
When do I need encoding?
You will need encoding every time a video or audio track needs an adjustment that cannot be handled by changing the container or protocol. Typically these would mean changes to one of the following:
Video
- Codec
- Resolution
- Quality
- Bitrate
Audio
- Codec
- Channels
- Sample rate
It's important to note that this does not necessarily mean you're also editing the original video/audio track. Encoding can just as easily mean adding an extra video or audio quality based on the original one rather than replacing it.
Encoders included in MistServer
MistProcAV
This would be the most efficient encoder currently implemented within MistServer, however it requires being compiled for your current operating system. This means you will have to build it yourself in order to use it. MistProcAV is build upon libAV and uses a limited set of codecs and options that we consider best practices for MistServer & streaming in general.
MistProcFFMPEG
This calls upon an installed version of FFmpeg to run encoding with. It's quite limited and not in active development since the development of MistProcAV. However this one does work simply by having FFmpeg installed.
MistProcMKVExec
This is the flexible encoder endpoint that can work with any encoder capable of ingesting and outputing Matroska video data. When using this encoder any command you pass it will be ran and fed Matroska video. MistServer then expects to receive Matroska video back as the ingest for an additional/edited video or audio track.
Typically it is expected you're using either CLI FFmpeg or Gstreamer in combination with this process.
MistProcLivepeer
This is our implementation for using encoding through the Livepeer network, though a fair warning they have redirected their focus towards AI tasks rather than video encoding. So this does not see much development/maintaining work.