[FFmpeg-devel] [PATCH] [HLS] Add LANGUAGE attribute to #EXT-X-MEDIA tag for audio-only variant streams.
philippe.symons at gmail.com
Tue Nov 13 00:36:34 EET 2018
This is my first patch to FFMpeg or any open-source project for that
matter. In this patch, I've added the LANGUAGE attribute to the
#EXT-X-MEDIA tag for for audio only variant streams for HLS streams.
This attribute will be added to the output in
avformats' ff_hls_write_audio_rendition() function, if the language code
can be found in the metadata of the variant stream.
The reason why I implemented this, was because I was working with a player
which needs this attribute to determine the language of the audio stream.
After asking the question on StackOverflow (
I noticed that it wasn't implemented.
I've tested these changes with the following command:
ffmpeg -re -i /home/philippe/Videos/example.ts -map 0:v -c:v copy -map 0:a
-c:a copy -f hls -hls_time 6 -hls_list_size 10 -hls_flags
"/var/www/html/live/stream_%v_%d.ts" -var_stream_map "v:0,agroup:lang
a:0,agroup:lang a:1,agroup:lang a:2,agroup:lang a:
3,agroup:lang" -master_pl_name master.m3u8 /var/www/html/live/stream-%v.m3u8
Looking forward to your feedback. I hope it's okay.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 4797 bytes
Desc: not available
More information about the ffmpeg-devel