Livestreamer works either capturing the stream into an mp4 file, or using it in the normal way to open a media player (VLC for example).
Code:
livestreamer "hlsvariant://url of the m3u8 file" best
OR
Code:
livestreamer "hlsvariant://url of the m3u8 file" best -o nameOfFile.mp4