5

I'm using youtube-dl to download a live stream and I'd like to be able to limit the time of the download, closing the connection once that time has elapsed. Is there a built in way to close the connection and save the file? I don't see anything in on the manpage but maybe I'm missing something. I'm using Ubuntu 14.04. Thanks.

1 Answer 1

1

Hack-around solution: Use two terminal sessions, one for youtube-dl, and the other for sleep followed by sending SIGINT to youtube-dl.

Ex:

Terminal 1:

youtube-dl <url>

Terminal 2:

sleep 300; kill -SIGINT $(pgrep youtube-dl)

Specifically, SIGINT is the signal sent by ctrl+c, so this simulates ctrl+c'ing the youtube-dl process after the elapsed time.

2

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .