If you have the .key, edit the m3u8 to point the the key locally on your machine so instead of "https://49.40.0.149/streams_live/History_HD/History_HD_1200-1503604608000.key" change it to like C:\history.key or whatever. Then you need to find the actual url of the .ts files, Set it playing legitimatly then press F12 in your browser of check fiddler to get the url of the .ts files so when you find
Http://Some_Url_here.com/History_HD_...03605052000.ts you can then do a find and replace in the m3u8 so it actually points to the .ts files. so for example you would do a
find for
/History
and replace it with
Http://Some_Url_here.com/History
for all instances.
When you have done that you should have a .key file locally, a m3u8 that points to your keyfile and an m3u8 that actually points to the .ts files.
Then you can get ffmpeg and just do this
ffmpeg -i whatever.m3u8 -vcodec copy -acodec copy output.mp4