Petter Holt Juliussen • Mail | Mastodon | GitHub | Letterboxd

for later reference.

Streamers

2019-04-04

Livestreamer

Platform File
Windows %AppData%\livestreamer\livestreamerrc
# Stream with configured player
$ livestreamer hds://https://.../playlist.m3u8 best

# Save stream to file
$ livestreamer hlsvariant://https://.../playlist.m3u8 best -o output.mp4

FFmpeg

# Save stream to file
ffmpeg -i https://.../playlist.m3u8 -c copy -bsf:a aac_adtstoasc output.mp4

YT-DL(P)

Vimeo

# Play video, find URL pointing to `master.json` and replace `.json` with `.mpd`
 yt-dlp -o output.mp4 "https://114vod-adaptive.akamaized.net/.../master.mpd"

Facebook

# https://www.facebook.com/nasjonalbiblioteket/videos/747896286376414/

# Note: 1080p is only available if logged in, i.e. using
# https://github.com/lennonhill/cookies-txt to export all cookies to a Netscape HTTP Cookie File

# List formats
$ yt-dlp https://www.facebook.com/nasjonalbiblioteket/videos/747896286376414 \
    -F \
    --cookies cookies.txt

ID                EXT RESOLUTION |   TBR PROTO | VCODEC        VBR ACODEC     ABR  ASR    MORE INFO
----------------- --- ---------- - ----- ----- - ----------- ----- --------- ---- ------- --------------------
549127779934269a  m4a audio only |   65k https |                   mp4a.40.5  65k 48000Hz DASH audio, m4a_dash
1425494051214844v mp4 256x144    |   82k https | avc1.64000C   82k                        DASH video, mp4_dash
574980313958306v  mp4 426x240    |  177k https | avc1.640015  177k                        DASH video, mp4_dash
404275268247796v  mp4 640x360    |  357k https | avc1.64001E  357k                        DASH video, mp4_dash
1052696232311071v mp4 854x480    |  595k https | avc1.64001E  595k                        DASH video, mp4_dash
774969493645165v  mp4 1280x720   | 1157k https | avc1.64001F 1157k                        DASH video, mp4_dash
576458043789365v  mp4 1920x1080  | 5475k https | avc1.4D0028 5475k                        DASH video, mp4_dash
sd                mp4 unknown    |       https | unknown           unknow

# Download video
$ yt-dlp https://www.facebook.com/nasjonalbiblioteket/videos/747896286376414 \
    --format 576458043789365v+549127779934269a \
    --cookies cookies.txt