ytarchive : How to use it.

Nov 21st, 2021 (edited)
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Assuming you have Windows 10 here.
  3. Download ytarchive executable from github and put it in a folder.
  4. Download fresh ffmpeg.exe from ffmpeg.org and put it in the same folder.
  5. If you have membership and would like to download members-only streams, install Get cookies.txt addon from google chrome store in your Chrome/Edge browser, get on youtube.com, log in under your account with Moomers membership and hit "export" button in addon. You'll get a txt file, rename it cookies.txt for convenience and place it in the same folder you place everything in.
  6. Install Windows Terminal from the MS Win store, navigate to the folder you placed everything in, press right mouse button and "Run in Windows Terminal". It will open a command line interface window.
  7. There, type in:
  8. ytarchive -c cookies.txt -v -t -r 60 https://www.youtube.com/channel/UC3n5uGu18FoCy23ggWWp8tA/live best
  9. and press Enter.
  11. Voila, ytarchive is monitoring her channel for frames every 60 seconds and will start recording in best available quality when she streams right away. You can also point it at already present frame directly:
  12. ytarchive -c cookies.txt -v -t [frame URL]
  14. You can monitor its progress in the Windows Terminal as it goes, important bit is to have the number of audio and video fragments be no more than one off from the "max sequence" number by the end of the download, otherwise something in the video will be screwed up somewhere (off by one because sequence starts counting from 0, fragments start from 1).
  15. Once it is done downloading, it will say "Merging files", this is the part where you wait for the finalized download to appear in your folder. Depending on your PC specs and length of the stream this may take quite a while, so don't bother it while it works.
  17. Automated downloading on Windows:
  19. ytarchive will quit after downloading a stream. To continue stream downloads indefinitely, you can run ytarchive within an infinite loop in a batch script. Open Notepad and write the following.
  21. :loop
  22. <your ytarchive command goes here>
  23. goto loop
  25. That is ":loop", not a typo. Save as a .bat file (for example, mumei.bat) in your ytarchive folder. Now instead of running the ytarchive command, run mumei.bat instead. Press Ctrl-C at any time to stop it. Running ytarchive in non-interactive mode (by specifying the video format at the end of your command, for example "best") is recommended.
  27. This should get you started and give me some peace of mind in case I forget to do the thing or unable to. Nobody will save those guerilla streams if we don't, hooman.
RAW Paste Data