How to keep a YouTube playlist synced to a local folder as mp3 files?












2















Is it possible to keep a public YouTube playlist synced to a local folder as mp3 files?



Key characteristics:




  • Add mp3 file to local folder, if new video is added to the playlist

  • Delete mp3 file in local folder, if respective video is removed from the playlist










share|improve this question



























    2















    Is it possible to keep a public YouTube playlist synced to a local folder as mp3 files?



    Key characteristics:




    • Add mp3 file to local folder, if new video is added to the playlist

    • Delete mp3 file in local folder, if respective video is removed from the playlist










    share|improve this question

























      2












      2








      2








      Is it possible to keep a public YouTube playlist synced to a local folder as mp3 files?



      Key characteristics:




      • Add mp3 file to local folder, if new video is added to the playlist

      • Delete mp3 file in local folder, if respective video is removed from the playlist










      share|improve this question














      Is it possible to keep a public YouTube playlist synced to a local folder as mp3 files?



      Key characteristics:




      • Add mp3 file to local folder, if new video is added to the playlist

      • Delete mp3 file in local folder, if respective video is removed from the playlist







      sync youtube youtube-dl






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Sep 25 '15 at 20:16









      orschiroorschiro

      5,067644101




      5,067644101






















          2 Answers
          2






          active

          oldest

          votes


















          0














          This is more of a workaround than a direct answer, but if you are ok with occasionally re-downloading some of the older playlist files you can set up a cronjob to find and delete files in a target directory using find.



          You should review the playlist and estimate how long files usually stay on it before disappearing, and use that number of days for your variable. Here in my example I chose 30 days.



          Here's an example Bash script for cron to run as an @daily job:



          #! /bin/bash

          # Delete all files in a directory older than 30 days
          # (careful, this is recursive and will delete files in subdirectories)
          find /PATH/TO/youtube-dl-playlist-files -mtime +30 -delete


          Any files still on the playlist but older than 30 days will be deleted, and youtube-dl will re-download them when you run it next. This isn't optimal but it may be good enough.






          share|improve this answer































            0














            You can either use this GitHub repo, which seems to do exactly what you want.

            Or you can use plain youtube-dl with --download-archive, as seen in youtube-dl's man page, although this will not remove any videos:




            How do I download only new videos from a playlist?

            Use download-archive feature. With this feature you should initially download the complete playlist with --download-archive path/to/download/archive/file.txt that will record identifiers of all the videos in a special file. Each subsequent run with the same --download-archive will download only new videos and skip all videos that have been downloaded before. Note that only successful downloads are recorded in the file.

            For example, at first,
            youtube-dl --download-archive archive.txt "https://www.youtube.com/playlist?list=PLwiyx1dc3P2JR9N8gQaQN_BCvlSlap7re"

            will download the complete PLwiyx1dc3P2JR9N8gQaQN_BCvlSlap7re playlist and create a file archive.txt. Each subsequent run will only download new videos if any:
            youtube-dl --download-archive archive.txt "https://www.youtube.com/playlist?list=PLwiyx1dc3P2JR9N8gQaQN_BCvlSlap7re"







            share|improve this answer























              Your Answer








              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "89"
              };
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function() {
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled) {
              StackExchange.using("snippets", function() {
              createEditor();
              });
              }
              else {
              createEditor();
              }
              });

              function createEditor() {
              StackExchange.prepareEditor({
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              imageUploader: {
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              },
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              });


              }
              });














              draft saved

              draft discarded


















              StackExchange.ready(
              function () {
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f678456%2fhow-to-keep-a-youtube-playlist-synced-to-a-local-folder-as-mp3-files%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              0














              This is more of a workaround than a direct answer, but if you are ok with occasionally re-downloading some of the older playlist files you can set up a cronjob to find and delete files in a target directory using find.



              You should review the playlist and estimate how long files usually stay on it before disappearing, and use that number of days for your variable. Here in my example I chose 30 days.



              Here's an example Bash script for cron to run as an @daily job:



              #! /bin/bash

              # Delete all files in a directory older than 30 days
              # (careful, this is recursive and will delete files in subdirectories)
              find /PATH/TO/youtube-dl-playlist-files -mtime +30 -delete


              Any files still on the playlist but older than 30 days will be deleted, and youtube-dl will re-download them when you run it next. This isn't optimal but it may be good enough.






              share|improve this answer




























                0














                This is more of a workaround than a direct answer, but if you are ok with occasionally re-downloading some of the older playlist files you can set up a cronjob to find and delete files in a target directory using find.



                You should review the playlist and estimate how long files usually stay on it before disappearing, and use that number of days for your variable. Here in my example I chose 30 days.



                Here's an example Bash script for cron to run as an @daily job:



                #! /bin/bash

                # Delete all files in a directory older than 30 days
                # (careful, this is recursive and will delete files in subdirectories)
                find /PATH/TO/youtube-dl-playlist-files -mtime +30 -delete


                Any files still on the playlist but older than 30 days will be deleted, and youtube-dl will re-download them when you run it next. This isn't optimal but it may be good enough.






                share|improve this answer


























                  0












                  0








                  0







                  This is more of a workaround than a direct answer, but if you are ok with occasionally re-downloading some of the older playlist files you can set up a cronjob to find and delete files in a target directory using find.



                  You should review the playlist and estimate how long files usually stay on it before disappearing, and use that number of days for your variable. Here in my example I chose 30 days.



                  Here's an example Bash script for cron to run as an @daily job:



                  #! /bin/bash

                  # Delete all files in a directory older than 30 days
                  # (careful, this is recursive and will delete files in subdirectories)
                  find /PATH/TO/youtube-dl-playlist-files -mtime +30 -delete


                  Any files still on the playlist but older than 30 days will be deleted, and youtube-dl will re-download them when you run it next. This isn't optimal but it may be good enough.






                  share|improve this answer













                  This is more of a workaround than a direct answer, but if you are ok with occasionally re-downloading some of the older playlist files you can set up a cronjob to find and delete files in a target directory using find.



                  You should review the playlist and estimate how long files usually stay on it before disappearing, and use that number of days for your variable. Here in my example I chose 30 days.



                  Here's an example Bash script for cron to run as an @daily job:



                  #! /bin/bash

                  # Delete all files in a directory older than 30 days
                  # (careful, this is recursive and will delete files in subdirectories)
                  find /PATH/TO/youtube-dl-playlist-files -mtime +30 -delete


                  Any files still on the playlist but older than 30 days will be deleted, and youtube-dl will re-download them when you run it next. This isn't optimal but it may be good enough.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Oct 28 '18 at 11:40









                  Tom BrossmanTom Brossman

                  8,8531149114




                  8,8531149114

























                      0














                      You can either use this GitHub repo, which seems to do exactly what you want.

                      Or you can use plain youtube-dl with --download-archive, as seen in youtube-dl's man page, although this will not remove any videos:




                      How do I download only new videos from a playlist?

                      Use download-archive feature. With this feature you should initially download the complete playlist with --download-archive path/to/download/archive/file.txt that will record identifiers of all the videos in a special file. Each subsequent run with the same --download-archive will download only new videos and skip all videos that have been downloaded before. Note that only successful downloads are recorded in the file.

                      For example, at first,
                      youtube-dl --download-archive archive.txt "https://www.youtube.com/playlist?list=PLwiyx1dc3P2JR9N8gQaQN_BCvlSlap7re"

                      will download the complete PLwiyx1dc3P2JR9N8gQaQN_BCvlSlap7re playlist and create a file archive.txt. Each subsequent run will only download new videos if any:
                      youtube-dl --download-archive archive.txt "https://www.youtube.com/playlist?list=PLwiyx1dc3P2JR9N8gQaQN_BCvlSlap7re"







                      share|improve this answer




























                        0














                        You can either use this GitHub repo, which seems to do exactly what you want.

                        Or you can use plain youtube-dl with --download-archive, as seen in youtube-dl's man page, although this will not remove any videos:




                        How do I download only new videos from a playlist?

                        Use download-archive feature. With this feature you should initially download the complete playlist with --download-archive path/to/download/archive/file.txt that will record identifiers of all the videos in a special file. Each subsequent run with the same --download-archive will download only new videos and skip all videos that have been downloaded before. Note that only successful downloads are recorded in the file.

                        For example, at first,
                        youtube-dl --download-archive archive.txt "https://www.youtube.com/playlist?list=PLwiyx1dc3P2JR9N8gQaQN_BCvlSlap7re"

                        will download the complete PLwiyx1dc3P2JR9N8gQaQN_BCvlSlap7re playlist and create a file archive.txt. Each subsequent run will only download new videos if any:
                        youtube-dl --download-archive archive.txt "https://www.youtube.com/playlist?list=PLwiyx1dc3P2JR9N8gQaQN_BCvlSlap7re"







                        share|improve this answer


























                          0












                          0








                          0







                          You can either use this GitHub repo, which seems to do exactly what you want.

                          Or you can use plain youtube-dl with --download-archive, as seen in youtube-dl's man page, although this will not remove any videos:




                          How do I download only new videos from a playlist?

                          Use download-archive feature. With this feature you should initially download the complete playlist with --download-archive path/to/download/archive/file.txt that will record identifiers of all the videos in a special file. Each subsequent run with the same --download-archive will download only new videos and skip all videos that have been downloaded before. Note that only successful downloads are recorded in the file.

                          For example, at first,
                          youtube-dl --download-archive archive.txt "https://www.youtube.com/playlist?list=PLwiyx1dc3P2JR9N8gQaQN_BCvlSlap7re"

                          will download the complete PLwiyx1dc3P2JR9N8gQaQN_BCvlSlap7re playlist and create a file archive.txt. Each subsequent run will only download new videos if any:
                          youtube-dl --download-archive archive.txt "https://www.youtube.com/playlist?list=PLwiyx1dc3P2JR9N8gQaQN_BCvlSlap7re"







                          share|improve this answer













                          You can either use this GitHub repo, which seems to do exactly what you want.

                          Or you can use plain youtube-dl with --download-archive, as seen in youtube-dl's man page, although this will not remove any videos:




                          How do I download only new videos from a playlist?

                          Use download-archive feature. With this feature you should initially download the complete playlist with --download-archive path/to/download/archive/file.txt that will record identifiers of all the videos in a special file. Each subsequent run with the same --download-archive will download only new videos and skip all videos that have been downloaded before. Note that only successful downloads are recorded in the file.

                          For example, at first,
                          youtube-dl --download-archive archive.txt "https://www.youtube.com/playlist?list=PLwiyx1dc3P2JR9N8gQaQN_BCvlSlap7re"

                          will download the complete PLwiyx1dc3P2JR9N8gQaQN_BCvlSlap7re playlist and create a file archive.txt. Each subsequent run will only download new videos if any:
                          youtube-dl --download-archive archive.txt "https://www.youtube.com/playlist?list=PLwiyx1dc3P2JR9N8gQaQN_BCvlSlap7re"








                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Jan 13 at 17:00









                          MeowxiikMeowxiik

                          1




                          1






























                              draft saved

                              draft discarded




















































                              Thanks for contributing an answer to Ask Ubuntu!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid



                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.


                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function () {
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f678456%2fhow-to-keep-a-youtube-playlist-synced-to-a-local-folder-as-mp3-files%23new-answer', 'question_page');
                              }
                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

                              Mangá

                               ⁒  ․,‪⁊‑⁙ ⁖, ⁇‒※‌, †,⁖‗‌⁝    ‾‸⁘,‖⁔⁣,⁂‾
”‑,‥–,‬ ,⁀‹⁋‴⁑ ‒ ,‴⁋”‼ ⁨,‷⁔„ ‰′,‐‚ ‥‡‎“‷⁃⁨⁅⁣,⁔
⁇‘⁔⁡⁏⁌⁡‿‶‏⁨ ⁣⁕⁖⁨⁩⁥‽⁀  ‴‬⁜‟ ⁃‣‧⁕‮ …‍⁨‴ ⁩,⁚⁖‫ ,‵ ⁀,‮⁝‣‣ ⁑  ⁂– ․, ‾‽ ‏⁁“⁗‸ ‾… ‹‡⁌⁎‸‘ ‡⁏⁌‪ ‵⁛ ‎⁨ ―⁦⁤⁄⁕