I have video in HLS format. And I would like to save it to disk. I want to see it with VLC offline with no adds. 🙂
Is there a simple way to do it? ( I am using Linux mint so it easy to run scripts)
Thanks in advance.
Advertisement
Answer
The tricky part is to find the cookie given to you by the browser (e.g acl/hmac). So I run another script to catch this data ( while running web-browser to see the video).
sudo tcpdump -nl -w - -i eth0 port 80 | grep -a "i/VOD/KESHET/next_star" | grep -a "3.0.3"
Once you have cookie you can close the browser and download the video without commercials via ffmpeg
For example I download with:
ffmpeg -i "http://makostore-vh.akamaihd.net/i/VOD/KESHET/next_star/S02/Next_star2_08_VOD_5hxs9/Next_star2_08_VOD_5hxs9_,500,850,1200,.mp4.csmil/master.m3u8?hdnea=st=1428177094~exp=1428177994~acl=/*~hmac=30272f825e6dba5e876536f50b0903fe7d669c33e3543bb6cdfced3731777c47&hdcore=3.0.3" -vcodec copy -acodec copy ch7_s2.ts
For Windows user you can read the cookie using wireshark.