Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
echo "Usage: ./videoget <url>"
echo "Press 'CTRL-C' to stop."
endmsg1="If the video ends in .ts, upload to youtube to get it to work."
endmsg2="If the video ends in .mp4, end the stream before it stops."
url=$1
echo $endmsg1
echo $endmsg2
fn input(msg: &str) -> String {
print!("{}", msg);
let mut input = String::new();
io::stdout().flush().unwrap();
io::stdin().read_line(&mut input).unwrap();
input.trim().to_string()
}