m1k1o / go-transcode

On-demand transcoding origin server for live inputs and static files in Go using ffmpeg. Also with NVIDIA GPU hardware acceleration.
Apache License 2.0
208 stars 38 forks source link

Custom m3u8 for map audio #27

Open rudnypc opened 2 years ago

rudnypc commented 2 years ago

When video has multiple audio, maybe it would be nice if we can choose the best audio language, the ffprobe can give all index audio.

rudnypc commented 2 years ago

Generate m3u8 for custom video, audio and subtitle index could be nice too.

m1k1o commented 2 years ago

As separate manifest? E.g. profile-eng.m3u8 or joined together in one playlist as multiple audios?

rudnypc commented 2 years ago

It's a nice idea, but how it will work if the video has multiple audios in english or unknow language? What do you think in profile-eng-00.m3u8, profile-eng-01.m3u8 and, profile-ger-00.m3u8, profile-por-00.m3u8, profile-UNK-00.m3u8, profile-UNK-02.m3u8?

unk=unknow

I'm thinking if will be easy at the transcode to know the right index to use.

m1k1o commented 2 years ago

Yes, I agree, stream index could be used. And then maybe either using filter options as query parameters or in the name of manifest.

rudnypc commented 2 years ago

profile-0.m3u8 profile-1.m3u8 profile-2.m3u8

0,1,2.. is the index. Inside the master playlist, you could put the language name/details.