Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Youtube Livestream-Record doesn't stop after Stream-End #24154

Closed
Finalsharex opened this issue Feb 27, 2020 · 0 comments
Closed

Youtube Livestream-Record doesn't stop after Stream-End #24154

Finalsharex opened this issue Feb 27, 2020 · 0 comments

Comments

@Finalsharex
Copy link

@Finalsharex Finalsharex commented Feb 27, 2020

Checklist

  • I'm asking a question
  • I've looked through the README and FAQ for similar questions
  • I've searched the bugtracker for similar questions including closed ones

Question

Hey Guys,

I'm working on an automated bash script to record youtube streams and save them.

#! /bin/bash
NOW=$( date '+%F_%H:%M:%S' )

while true;
do
dir=/
name=XXX_$NOW
name=$name
youtube-dl --exec './record.sh' -c -i -f 94 youtube.com/channel/XXX/live -o "$dir/$name.mp4";
sleep $[((400 + RANDOM % 200))]s
done;

Everything is working fine so far, but i'm running into an issue when the stream is supposed to end.
Instead of ending the record and saving everything in my mp4 it just loops seeming endlessly with this message:
Image
I can end this with Ctrl+C and it writes the file just fine, but since it's supposed to be automated this doesn't work.

I already tried with socket-timeout and many other variables, but seems like nothing helps.
If i replace the Stream-URL with a video it works. It downloads the video, saves it and runs that script again with a random 400-600s timer till the broadcaster starts streaming again
Is anyone familiar with this case?

@dstftw dstftw closed this Feb 27, 2020
@dstftw dstftw added the incomplete label Feb 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.