FFMPEG
Fix files when seeking is wrong or something
ffmpeg -err_detect ignore_err -i video.mkv -c copy video_fixed.mkv
Download m38u stream
$ ffmpeg -user_agent "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/601.7.8 (KHTML, like Gecko) Version/9.1.3 Safari/537.86.7" -i http://url/index.m3u8 -c copy pd.mkv