This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is just a quick note-to-self. | |
I haven't looked into any details regarding .m3u8, .ts or more compact ffmpeg usage. | |
Originally from here: https://unix.stackexchange.com/questions/687641/how-can-i-download-a-video-from-an-m3u8-file | |
* install ffmpeg | |
* download the .m3u8 file | |
* when logged in on Patreon, on Mac and Safari, this is what you get when you right-click on the embedded player and choose "Download Video" | |
* this should give you a file that can be used as thingy.m3u8 below | |
* download the stream with ffmpeg |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import psutil | |
import time | |
def logDebug(msg): | |
print(time.ctime() + " " + msg) | |
while True: | |
count = 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
INFILE="$@" | |
TEMPFILE=/tmp/$RANDOM | |
echo "processing file: " $INFILE | |
echo "extracting aac" | |
ffmpeg -i "$INFILE" -codec: copy $TEMPFILE.aac | |
echo "stuffing aac into m4a container" | |
ffmpeg -i $TEMPFILE.aac -bsf:a aac_adtstoasc -codec: copy $TEMPFILE.m4a | |
echo "replacing old with new" |