[FFmpeg-user] HLS setting NAME in EXT-X-MEDIA

Alessandro Molon alex.molon at vision247.com
Tue Jan 21 11:35:57 EET 2020


Hi Guys,

Does anybody know If there is a way to set a specific value of NAME in EXT-X-MEDIA with the HLS muxer?

My command line is:

/usr/src/ffmpeg-4.2.2/ffmpeg -hwaccel cuvid -c:v h264_cuvid -i INPUT.ts \
-filter_complex "[0]split=5[inter-SD][inter-SDh][inter-FHD][inter-HD][inter-SDq];[inter-SD]hwupload,scale_npp=640:480:format=yuv420p,hwdownload[vout-SD];[inter-SDh]hwupload,scale_npp=480:320:format=yuv420p,hwdownload[vout-SDh];[inter-FHD]hwupload,scale_npp=1920:1080:format=yuv420p,hwdownload[vout-FHD];[inter-HD]hwupload,scale_npp=1280:720:format=yuv420p,hwdownload[vout-HD];[inter-SDq]hwupload,scale_npp=320:240:format=yuv420p,hwdownload[vout-SDq]" \
-c:v h264_nvenc -preset:v fast -g:v 50 -flags +cgop -c:a aac \
-map [vout-SD] -map [vout-SDh] -map [vout-FHD] -map [vout-HD] -map [vout-SDq] \
-b:v:0 800k \
-b:v:1 500k \
-b:v:2 2000k -profile:v:2 high -level:v:2 4.1 \
-b:v:3 1200k -profile:v:3 high -level:v:3 4.1 \
-b:v:4 300k \
-map 0:a:0 -map 0:a:0 -map 0:a:1 -map 0:a:1 \
-b:a:0 128k -b:a:1 64k -b:a:2 128k -b:a:3 64k \
-metadata:s:a:0 language=eng -metadata:s:a:1 language=eng \
-metadata:s:a:2 language=fre -metadata:s:a:3 language=fre \
-var_stream_map "a:0,agroup:HIGH_BR,language:ENG,name:audio_en_hi a:2,agroup:HIGH_BR,language:FRE,name:audio_fr_hi a:1,agroup:LOW_BR,language:ENG,name:audio_en_lo a:3,agroup:LOW_BR,language:FRE,name:audio_fr_lo v:0,agroup:LOW_BR,name:Video_SD v:1,agroup:LOW_BR,name:Video_SDh v:2,agroup:HIGH_BR,name:Video_FHD v:3,agroup:HIGH_BR,name:Video_HD v:4,agroup:LOW_BR,name:Video_SDq" \
-f hls -hls_playlist_type vod -hls_time 10 -hls_list_size 0 -hls_allow_cache 1 -master_pl_name master.m3u8 \
-hls_segment_filename alextest1/%v/chunk-%08d.ts alextest1/%v/playlist.m3u8

The comman more or less does what I need,
but the NAME value is always set as "audio_1, audio_2...." and so on.

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="group_HIGH_BR",NAME="audio_0",DEFAULT=YES,LANGUAGE="ENG",URI="AEN128/playlist.m3u8"
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="group_HIGH_BR",NAME="audio_1",DEFAULT=NO,LANGUAGE="FRE",URI="AFR128/playlist.m3u8"
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="group_LOW_BR",NAME="audio_2",DEFAULT=NO,LANGUAGE="ENG",URI="AEN64/playlist.m3u8"
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="group_LOW_BR",NAME="audio_3",DEFAULT=NO,LANGUAGE="FRE",URI="AFR64/playlist.m3u8"
#EXT-X-STREAM-INF:BANDWIDTH=950400,RESOLUTION=640x480,CODECS="avc1.4d401e,mp4a.40.2",AUDIO="group_LOW_BR"
Video_SD/playlist.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=620400,RESOLUTION=480x320,CODECS="avc1.4d4015,mp4a.40.2",AUDIO="group_LOW_BR"
Video_SDh/playlist.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=2340800,RESOLUTION=1920x1080,CODECS="avc1.640029,mp4a.40.2",AUDIO="group_HIGH_BR"
Video_FHD/playlist.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=1460800,RESOLUTION=1280x720,CODECS="avc1.640029,mp4a.40.2",AUDIO="group_HIGH_BR"
Video_HD/playlist.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=400400,RESOLUTION=320x240,CODECS="avc1.4d400d,mp4a.40.2",AUDIO="group_LOW_BR"
Video_SDq/playlist.m3u8

I would like to be able to set the value with something else, eg. the language (NAME="English" or NAME="French") but I didn't find any information about that.

Thanks in advance 

Alex Molon


More information about the ffmpeg-user mailing list