Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Record a livestream off of Youtube?

Options
  • 28-05-2019 10:46pm
    #1
    Registered Users Posts: 13,825 ✭✭✭✭


    I have a problem in that there are one or two Youtube streamers who I like to watch, but who do not archive their streams. This means that unless I am able to watch the stream at the time, I can't see it at all.

    What I'd like to be able to do is record the stream DVR-style for later playback at my convenience, because sometimes I'm just not in a position to watch it at the time. I'd like a utility that just pulls the stream data down to disk and saves it as a video file.

    * I don't want to have to use screen-capture software unless this is the only option available.

    * I know about youtube-dl, but can't find any up-to-date documentation on how to make livestream capture work with it.

    * I have a Synology NAS, android phone or windows laptop that could be used for the purpose.

    Any ideas?


Comments

  • Registered Users Posts: 14,011 ✭✭✭✭Johnboy1951


    If the stream can be viewed with VLC then it can be recorded by VLC.


  • Registered Users Posts: 13,825 ✭✭✭✭briany


    If the stream can be viewed with VLC then it can be recorded by VLC.

    YouTube livestreams cannot be viewed with VLC.


  • Registered Users Posts: 14,011 ✭✭✭✭Johnboy1951


    To use youtube-dl try the following using the NASA live stream as an example
    youtube-dl --list-formats [url]https://www.youtube.com/watch?v=4993sBLAzGA[/url]
    

    which gives the following (amongst other output)

    Then (selecting the best quality) do
    youtube-dl -f 96 [url]https://www.youtube.com/watch?v=4993sBLAzGA[/url]
    

    which will record the stream to a file
    NASA Live - Earth From Space - Nasa Live Stream _ ISS LIVE FEED - ISS Tracker + Live Chat-4993sBLAzGA.mp4

    At least it did so here. ;)


  • Registered Users Posts: 13,825 ✭✭✭✭briany


    To use youtube-dl try the following using the NASA live stream as an example
    youtube-dl --list-formats [url]https://www.youtube.com/watch?v=4993sBLAzGA[/url]
    

    which gives the following (amongst other output)



    Then (selecting the best quality) do
    youtube-dl -f 96 [url]https://www.youtube.com/watch?v=4993sBLAzGA[/url]
    

    which will record the stream to a file


    At least it did so here. ;)

    Thanks very much, that's helpful information. One more thing - where does Youtube-dl save to? If I Google that question, the answer seems to be that it saves to the folder where the yt-dl exe is stored, but I see no video file show up there, even after I stop the download of the stream. If I try to specify my own download path with the -o switch, I just get a permission denied error, even if I specify the same path as my yt-dl exe, run the prompt as admin, and have the yt-dl location on the desktop. Any ideas?


  • Registered Users Posts: 14,011 ✭✭✭✭Johnboy1951


    briany wrote: »
    Thanks very much, that's helpful information. One more thing - where does Youtube-dl save to? If I Google that question, the answer seems to be that it saves to the folder where the yt-dl exe is stored, but I see no video file show up there, even after I stop the download of the stream. If I try to specify my own download path with the -o switch, I just get a permission denied error, even if I specify the same path as my yt-dl exe, run the prompt as admin, and have the yt-dl location on the desktop. Any ideas?

    I am unsure how it behaves in your OS environment.
    Here it will save to the same location that it is run from.
    youtube-dl --version
    2019.04.24
    


  • Advertisement
  • Registered Users Posts: 13,825 ✭✭✭✭briany


    I am unsure how it behaves in your OS environment.
    Here it will save to the same location that it is run from.
    youtube-dl --version
    2019.04.24
    

    Mine's from 2019.05.20


  • Registered Users Posts: 13,825 ✭✭✭✭briany


    Figured it out, I think. Silly me, I wasn't including the filename and extension in the -o path. Must have been thinking that a filename and extension would automatically be created. The other thing I had to do was download and extract ffmpeg and put the ffmpeg exe in the Youtube-dl folder.


  • Registered Users Posts: 4,130 ✭✭✭smuggler.ie


    briany wrote: »
    Thanks very much, that's helpful information. One more thing - where does Youtube-dl save to? If I Google that question, the answer seems to be that it saves to the folder where the yt-dl exe is stored, but I see no video file show up there, even after I stop the download of the stream. If I try to specify my own download path with the -o switch, I just get a permission denied error, even if I specify the same path as my yt-dl exe, run the prompt as admin, and have the yt-dl location on the desktop. Any ideas?
    Don't know why, but by default it goes to C:\ users \ yourusername


  • Registered Users Posts: 13,825 ✭✭✭✭briany


    One other small thing. I can record to the end of the stream, but the recording doesn't stop when the stream does. It just keeps giving a "last message repeated _ times" message. What switch could I use to tell youtube-dl to finish recording and save the video when the stream ends? I control + c'd out of the recording, but I think I may have done that one too many times as I appear to have requested an immediate exit from the recording.


  • Registered Users Posts: 14,011 ✭✭✭✭Johnboy1951


    briany wrote: »
    One other small thing. I can record to the end of the stream, but the recording doesn't stop when the stream does. It just keeps giving a "last message repeated _ times" message. What switch could I use to tell youtube-dl to finish recording and save the video when the stream ends? I control + c'd out of the recording, but I think I may have done that one too many times as I appear to have requested an immediate exit from the recording.

    I used Ctrl+C to end the recording and it was saved.

    I did not investigate any other means of ending the recording.

    I did not try a live stream that had a specified end time.

    Maybe a cron job to end the recording after a specified time?


  • Advertisement
  • Registered Users Posts: 13,825 ✭✭✭✭briany


    I used Ctrl+C to end the recording and it was saved.

    I did not investigate any other means of ending the recording.

    I did not try a live stream that had a specified end time.

    Maybe a cron job to end the recording after a specified?

    I used ctrl+c on another recording and it was fine. I think I was a bit overzealous with it on the latter one, causing a forced exit, rather than a graceful one. It's more for set-it-and-forget-it recording, to be able to let the recording end without user intervention.


  • Registered Users Posts: 14,011 ✭✭✭✭Johnboy1951


    briany wrote: »
    I used ctrl+c on another recording and it was fine. I think I was a bit overzealous with it on the latter one, causing a forced exit, rather than a graceful one. It's more for set-it-and-forget-it recording, to be able to let the recording end without user intervention.

    If there are repeated messages at the end of a stream that are specific to its finishing, then the output of youtube-dl could be monitored and after a specified number of those messages were received, automatically issue a command to cease the recording.

    I have never seen such a message as I have never before recorded a live stream that ended.

    If you care to post a link to a live stream that will end at a specific time then I could see what the output would be.


  • Registered Users Posts: 13,825 ✭✭✭✭briany


    If there are repeated messages at the end of a stream that are specific to its finishing, then the output of youtube-dl could be monitored and after a specified number of those messages were received, automatically issue a command to cease the recording.

    I have never seen such a message as I have never before recorded a live stream that ended.

    If you care to post a link to a live stream that will end at a specific time then I could see what the output would be.

    I follow the Viper Higgins livestreams on Youtube. Those are the ones I want to record, but I don't necessarily know when they'll be on. I just get a little push notification when he goes live, and then work from there. Don't really know anything about the schedules of other livestreams. Next time I get a notification of one of his streams, I can post the link here and you can monitor the output of when it gets to the end, if you like. He generally streams for between 1 to 2 hours of going live.


  • Registered Users Posts: 14,011 ✭✭✭✭Johnboy1951


    briany wrote: »
    I follow the Viper Higgins livestreams on Youtube. Those are the ones I want to record, but I don't necessarily know when they'll be on. I just get a little push notification when he goes live, and then work from there. Don't really know anything about the schedules of other livestreams. Next time I get a notification of one of his streams, I can post the link here and you can monitor the output of when it gets to the end, if you like. He generally streams for between 1 to 2 hours of going live.

    No guarantees, but yes do post it ..... I might be on here during that time and be able to check.


  • Registered Users Posts: 13,825 ✭✭✭✭briany


    No guarantees, but yes do post it ..... I might be on here during that time and be able to check.

    Stream's live now.


  • Registered Users Posts: 14,011 ✭✭✭✭Johnboy1951


    I downloaded it and let it run well past the end of the stream.
    When I stopped it, the recorded file remained ...... but it is not playable ..... apparently has no video in the file at all.
    mediainfo ./Test*.mp4
    General
    Complete name                            : ./Test Drivetime-wchJPkCToaY.mp4
    Format                                   : MPEG-4
    Format profile                           : Base Media
    Codec ID                                 : isom (isom/iso2/avc1/mp41)
    File size                                : 20.3 MiB
    

    It would appear that the end of the stream would need to be known so that the recording could be stopped in good time.


  • Registered Users Posts: 13,825 ✭✭✭✭briany


    I downloaded it and let it run well past the end of the stream.
    When I stopped it, the recorded file remained ...... but it is not playable ..... apparently has no video in the file at all.
    mediainfo ./Test*.mp4
    General
    Complete name                            : ./Test Drivetime-wchJPkCToaY.mp4
    Format                                   : MPEG-4
    Format profile                           : Base Media
    Codec ID                                 : isom (isom/iso2/avc1/mp41)
    File size                                : 20.3 MiB
    

    It would appear that the end of the stream would need to be known so that the recording could be stopped in good time.

    Yeah, that's my result as well. What about a switch to record the video in chunks of about 5 minutes a piece? At least that way you wouldn't get a totally unusable video file.


  • Registered Users Posts: 14,011 ✭✭✭✭Johnboy1951


    briany wrote: »
    Yeah, that's my result as well. What about a switch to record the video in chunks of about 5 minutes a piece? At least that way you wouldn't get a totally unusable video file.

    I don't know .... this is my first experience with live stream recording ;)

    I would first be inclined to try using the youtube-dl option "--no-part" to see if that might fix the loss of content in the file.
    It would be much simpler if it overcame the problem.

    This format of command
    youtube-dl --no-part -f 96 https://www.youtube.com/watch?v=4993sBLAzGA
    

    It would have to be checked of course, after a stream ended .....


  • Registered Users Posts: 13,825 ✭✭✭✭briany


    I don't know .... this is my first experience with live stream recording ;)

    I would first be inclined to try using the youtube-dl option "--no-part" to see if that might fix the loss of content in the file.
    It would be much simpler if it overcame the problem.

    This format of command
    youtube-dl --no-part -f 96 https://www.youtube.com/watch?v=4993sBLAzGA
    

    It would have to be checked of course, after a stream ended .....

    Thanks for the suggestion. Unfortunately, I added this switch to a livestream recording that ended, but it gave me the same error when I tried to ctrl+c out of the stream, and the same unusable video file :(


  • Registered Users Posts: 14,011 ✭✭✭✭Johnboy1951


    briany wrote: »
    Thanks for the suggestion. Unfortunately, I added this switch to a livestream recording that ended, but it gave me the same error when I tried to ctrl+c out of the stream, and the same unusable video file :(

    Pity :(

    I guess the best option then is to stop the recording every, say, 15 mins or so, rename recording, and start recording again.


  • Advertisement
Advertisement