1

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.

user4223883
  • 330
  • 1
  • 4
  • 8
  • I know it's an old question, but just letting you know there's now a Chrome extension which lets you save HLS videos https://chrome.google.com/webstore/detail/hls-video-saver/pibndofbpkoaipoidbkephfhhnapkccn – tube-builder Jan 26 '17 at 13:18

1 Answers1

3

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.

Denilson Sá Maia
  • 47,466
  • 33
  • 109
  • 111
eduard
  • 309
  • 3
  • 9