mediamtx icon indicating copy to clipboard operation
mediamtx copied to clipboard

Add support for ulaw in HLS

Open bryandario8 opened this issue 1 year ago • 1 comments

Describe the feature

Hi, It is possible to add in a new release that HLS supports ulaw audio codec, such as G711?

In any case, I would like to know the reason why the latest releases do not include this audio codec.

bryandario8 avatar Oct 05 '23 16:10 bryandario8

Hello, the reason is simply that HLS uses MP4 and MP4 doesn't support the G711 codec.

G711 can be easily converted to PCM, but hls.js and Firefox don't support PCM inside MP4 yet.

It can also be converted into FLAC, which is not supported by RTSP.

If you need an immediate solution, you can convert the audio track from G711 to AAC with FFmpeg by following instructions in the README.

aler9 avatar Oct 05 '23 16:10 aler9