Open tsukinoinaba opened 1 month ago
It seems that yt-dlp is able to handle downloading livestreams, even in the future. This would be a valuable addition to the functionality of MochiFeed and is worth investigating further.
https://www.reddit.com/r/youtubedl/comments/1bglnu6/is_it_possible_to_download_a_youtube_livestream/
Not sure if the GUI lets you but ytdlp can (most of the time). just do the usual ytdlp "URL" command. if you want to start from the beginning then also
--live-from-start
, and if the stream is scheduled you can also use--wait-for-video MIN[-MAX]
before hand and it'll wait for it to go live then start downloading.
Cause
Upcoming livestreams and premieres are also listed on a channel's RSS feed, so MochiFeed will also include them in the list of videos it creates.
Consequences
As these videos are the newest, they will be stored in the memory file. As a result, this prevents them from appearing in the list of videos after the affected videos have been published, as MochiFeed considers it to be an old video that it has already seen. Thus, manual intervention is required (e.g. editing the memory file, using yt-dlp manually, going to YouTube) for these videos.
One minor consequence is yt-dlp printing errors (from failing to get the video duration), breaking up the list of videos and making it generally unsightly. Another one is that this behaviour may cause confusion or increase the risk of user error, as these videos cannot be downloaded yet.
Proposed solution
These videos should not be used as the newest video for the memory file, so as to address the main problem. This can be done by bringing the video duration fetch earlier, which also doubles as a validation check.
These videos should also be excluded from the list of videos available for download, which can be done after the aforementioned validation check. It will also be beneficial to create a separate section, which is used to inform the user of these upcoming videos.