# /usr/local/bin/ffmpeg -i "https://streams.wilmaa.com/m3u8/get?channelId=nrj_12" -map p:2:0 -map p:2:3
with ffmpeg you have to manually count the number. don't use the number that appears on the result of the playlist. first number is 0 .
ex
program 4
metadata:
variant_bitrate : 2326000
Stream #0:1(fr): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 127 kb/s (default)
metadata:
variant_bitrate : 4426000
comment : French
Stream #0:2(un): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 127 kbps
metadata:
variant_bitrate : 4426000
comment : Undetermined
Stream #0:7: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p, 720x404 [SAR 1:1 DAR 180:101], 25 fps, 25 tbr, 90k tbn, 50 tbc
to select the program 4 with propper audio/video you will map as follow -map p:4:0 -map p:4:2 (and not 1 &7)
also streamlink could be easier to use in that case , just by selecting the quality needed ex 404p . but I rely more on ffmpeg as it is a lot less cpu consuming