Changing name of the video while downloading via youtube-dl





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







7















I am trying to download a complete playlist in youtube, while downloading i want to enter serial number while downloading in front of the title of the video,



For example if a playlist has a videos:



A.mp4
E.mp4
K.mp4
C.mp4
B.mp4


I want it to be



1. A.mp4
2. E.mp4
3. K.mp4
4. C.mp4
5. B.mp4.


I tried commands like:



i=0;youtube-dl -cti https://www.youtube.com/playlist?list={(Any Playlist)} -o "{{$i++}%(title)s.%(ext)s}"


but its giving me this error:




youtube-dl: error: using output template conflicts with using title, video ID or auto number




Also, Downloading the whole playlist and then renaming one by one is also not i am searching.



Is there any command which downloads the playlist and renames each video side by side according to my wish?










share|improve this question































    7















    I am trying to download a complete playlist in youtube, while downloading i want to enter serial number while downloading in front of the title of the video,



    For example if a playlist has a videos:



    A.mp4
    E.mp4
    K.mp4
    C.mp4
    B.mp4


    I want it to be



    1. A.mp4
    2. E.mp4
    3. K.mp4
    4. C.mp4
    5. B.mp4.


    I tried commands like:



    i=0;youtube-dl -cti https://www.youtube.com/playlist?list={(Any Playlist)} -o "{{$i++}%(title)s.%(ext)s}"


    but its giving me this error:




    youtube-dl: error: using output template conflicts with using title, video ID or auto number




    Also, Downloading the whole playlist and then renaming one by one is also not i am searching.



    Is there any command which downloads the playlist and renames each video side by side according to my wish?










    share|improve this question



























      7












      7








      7


      2






      I am trying to download a complete playlist in youtube, while downloading i want to enter serial number while downloading in front of the title of the video,



      For example if a playlist has a videos:



      A.mp4
      E.mp4
      K.mp4
      C.mp4
      B.mp4


      I want it to be



      1. A.mp4
      2. E.mp4
      3. K.mp4
      4. C.mp4
      5. B.mp4.


      I tried commands like:



      i=0;youtube-dl -cti https://www.youtube.com/playlist?list={(Any Playlist)} -o "{{$i++}%(title)s.%(ext)s}"


      but its giving me this error:




      youtube-dl: error: using output template conflicts with using title, video ID or auto number




      Also, Downloading the whole playlist and then renaming one by one is also not i am searching.



      Is there any command which downloads the playlist and renames each video side by side according to my wish?










      share|improve this question
















      I am trying to download a complete playlist in youtube, while downloading i want to enter serial number while downloading in front of the title of the video,



      For example if a playlist has a videos:



      A.mp4
      E.mp4
      K.mp4
      C.mp4
      B.mp4


      I want it to be



      1. A.mp4
      2. E.mp4
      3. K.mp4
      4. C.mp4
      5. B.mp4.


      I tried commands like:



      i=0;youtube-dl -cti https://www.youtube.com/playlist?list={(Any Playlist)} -o "{{$i++}%(title)s.%(ext)s}"


      but its giving me this error:




      youtube-dl: error: using output template conflicts with using title, video ID or auto number




      Also, Downloading the whole playlist and then renaming one by one is also not i am searching.



      Is there any command which downloads the playlist and renames each video side by side according to my wish?







      linux video youtube youtube-dl






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 3 at 12:01









      boop

      2,37062562




      2,37062562










      asked Sep 25 '15 at 14:37









      DesmndDesmnd

      65119




      65119
























          5 Answers
          5






          active

          oldest

          votes


















          14














          Sometimes I had headache to rename and sort the files based on the order.



          So to add auto-numbering, use -A like,



          youtube-dl https://www.youtube.com/playlist?list=PLOU2XLYxmsILe6_eGvDN3GyiodoV3qNSC -A


          Or to keep playlist index,



          youtube-dl -o '%(playlist_index)s. %(title)s.%(ext)s' https://www.youtube.com/playlist?list=PLOU2XLYxmsILe6_eGvDN3GyiodoV3qNSC


          This will add nice numbering to the downloaded files.



          And if you are downloading files which is not in playlist, you can add numbers manually to the file,



          youtube-dl -o "1-%(uploader)s%(title)s.%(ext)s" https://youtu.be/862r3XS2YB0


          Here I have manually added 1- to the filename while downloading.






          share|improve this answer


























          • Just saying, -A option is deprecated, now it is recommended to use -o.

            – Erdin Eray
            Sep 8 '17 at 18:07











          • What if you already downloaded a terabyte long playlist and now what to rename the file accordingly? ;) youtube-dl can download playlist metadata, but how to get this metadata in a form that can be used from a script to match already downloaded files and rename them?

            – Andrew Savinykh
            Jan 2 at 20:32



















          6














          Use youtube-dl -o '%(playlist_index)s. %(title)s.%(ext)s' https://www.youtube.com/playlist?list=....






          share|improve this answer



















          • 1





            Sir, thank you it worked but you added playlist index, what if I have to add my own number in front instead the playlist index, what shall I do?

            – Desmnd
            Sep 26 '15 at 5:27



















          2















          The best solution I found is:




          youtube-dl -o "%(playlist_index)s-%(title)s.%(ext)s" <playlist_link>



          For example:



          youtube-dl -o "%(playlist_index)s-%(title)s.%(ext)s" https://www.youtube.com/playlist?list=PLf8i4fc0zJBzLhOe6FwHpGhBDgqwInJWZ





          share|improve this answer































            1














            'outtmpl': 'temp/' + str(i) +'.%(ext)s'






            share|improve this answer































              -1














              you have to put the youtube link in the quotes ""



              example



              youtube-dl -o "%(playlist_index)s-%(title)s.%(ext)s" "https://www.youtube.com/watch?v=ZNObiptSMSI&list=PL08903FB7ACA1C2FB"





              share|improve this answer


























                Your Answer






                StackExchange.ifUsing("editor", function () {
                StackExchange.using("externalEditor", function () {
                StackExchange.using("snippets", function () {
                StackExchange.snippets.init();
                });
                });
                }, "code-snippets");

                StackExchange.ready(function() {
                var channelOptions = {
                tags: "".split(" "),
                id: "1"
                };
                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%2fstackoverflow.com%2fquestions%2f32784639%2fchanging-name-of-the-video-while-downloading-via-youtube-dl%23new-answer', 'question_page');
                }
                );

                Post as a guest















                Required, but never shown

























                5 Answers
                5






                active

                oldest

                votes








                5 Answers
                5






                active

                oldest

                votes









                active

                oldest

                votes






                active

                oldest

                votes









                14














                Sometimes I had headache to rename and sort the files based on the order.



                So to add auto-numbering, use -A like,



                youtube-dl https://www.youtube.com/playlist?list=PLOU2XLYxmsILe6_eGvDN3GyiodoV3qNSC -A


                Or to keep playlist index,



                youtube-dl -o '%(playlist_index)s. %(title)s.%(ext)s' https://www.youtube.com/playlist?list=PLOU2XLYxmsILe6_eGvDN3GyiodoV3qNSC


                This will add nice numbering to the downloaded files.



                And if you are downloading files which is not in playlist, you can add numbers manually to the file,



                youtube-dl -o "1-%(uploader)s%(title)s.%(ext)s" https://youtu.be/862r3XS2YB0


                Here I have manually added 1- to the filename while downloading.






                share|improve this answer


























                • Just saying, -A option is deprecated, now it is recommended to use -o.

                  – Erdin Eray
                  Sep 8 '17 at 18:07











                • What if you already downloaded a terabyte long playlist and now what to rename the file accordingly? ;) youtube-dl can download playlist metadata, but how to get this metadata in a form that can be used from a script to match already downloaded files and rename them?

                  – Andrew Savinykh
                  Jan 2 at 20:32
















                14














                Sometimes I had headache to rename and sort the files based on the order.



                So to add auto-numbering, use -A like,



                youtube-dl https://www.youtube.com/playlist?list=PLOU2XLYxmsILe6_eGvDN3GyiodoV3qNSC -A


                Or to keep playlist index,



                youtube-dl -o '%(playlist_index)s. %(title)s.%(ext)s' https://www.youtube.com/playlist?list=PLOU2XLYxmsILe6_eGvDN3GyiodoV3qNSC


                This will add nice numbering to the downloaded files.



                And if you are downloading files which is not in playlist, you can add numbers manually to the file,



                youtube-dl -o "1-%(uploader)s%(title)s.%(ext)s" https://youtu.be/862r3XS2YB0


                Here I have manually added 1- to the filename while downloading.






                share|improve this answer


























                • Just saying, -A option is deprecated, now it is recommended to use -o.

                  – Erdin Eray
                  Sep 8 '17 at 18:07











                • What if you already downloaded a terabyte long playlist and now what to rename the file accordingly? ;) youtube-dl can download playlist metadata, but how to get this metadata in a form that can be used from a script to match already downloaded files and rename them?

                  – Andrew Savinykh
                  Jan 2 at 20:32














                14












                14








                14







                Sometimes I had headache to rename and sort the files based on the order.



                So to add auto-numbering, use -A like,



                youtube-dl https://www.youtube.com/playlist?list=PLOU2XLYxmsILe6_eGvDN3GyiodoV3qNSC -A


                Or to keep playlist index,



                youtube-dl -o '%(playlist_index)s. %(title)s.%(ext)s' https://www.youtube.com/playlist?list=PLOU2XLYxmsILe6_eGvDN3GyiodoV3qNSC


                This will add nice numbering to the downloaded files.



                And if you are downloading files which is not in playlist, you can add numbers manually to the file,



                youtube-dl -o "1-%(uploader)s%(title)s.%(ext)s" https://youtu.be/862r3XS2YB0


                Here I have manually added 1- to the filename while downloading.






                share|improve this answer















                Sometimes I had headache to rename and sort the files based on the order.



                So to add auto-numbering, use -A like,



                youtube-dl https://www.youtube.com/playlist?list=PLOU2XLYxmsILe6_eGvDN3GyiodoV3qNSC -A


                Or to keep playlist index,



                youtube-dl -o '%(playlist_index)s. %(title)s.%(ext)s' https://www.youtube.com/playlist?list=PLOU2XLYxmsILe6_eGvDN3GyiodoV3qNSC


                This will add nice numbering to the downloaded files.



                And if you are downloading files which is not in playlist, you can add numbers manually to the file,



                youtube-dl -o "1-%(uploader)s%(title)s.%(ext)s" https://youtu.be/862r3XS2YB0


                Here I have manually added 1- to the filename while downloading.







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Sep 4 '16 at 16:04

























                answered Sep 4 '16 at 15:50









                devodevo

                16.4k1764116




                16.4k1764116













                • Just saying, -A option is deprecated, now it is recommended to use -o.

                  – Erdin Eray
                  Sep 8 '17 at 18:07











                • What if you already downloaded a terabyte long playlist and now what to rename the file accordingly? ;) youtube-dl can download playlist metadata, but how to get this metadata in a form that can be used from a script to match already downloaded files and rename them?

                  – Andrew Savinykh
                  Jan 2 at 20:32



















                • Just saying, -A option is deprecated, now it is recommended to use -o.

                  – Erdin Eray
                  Sep 8 '17 at 18:07











                • What if you already downloaded a terabyte long playlist and now what to rename the file accordingly? ;) youtube-dl can download playlist metadata, but how to get this metadata in a form that can be used from a script to match already downloaded files and rename them?

                  – Andrew Savinykh
                  Jan 2 at 20:32

















                Just saying, -A option is deprecated, now it is recommended to use -o.

                – Erdin Eray
                Sep 8 '17 at 18:07





                Just saying, -A option is deprecated, now it is recommended to use -o.

                – Erdin Eray
                Sep 8 '17 at 18:07













                What if you already downloaded a terabyte long playlist and now what to rename the file accordingly? ;) youtube-dl can download playlist metadata, but how to get this metadata in a form that can be used from a script to match already downloaded files and rename them?

                – Andrew Savinykh
                Jan 2 at 20:32





                What if you already downloaded a terabyte long playlist and now what to rename the file accordingly? ;) youtube-dl can download playlist metadata, but how to get this metadata in a form that can be used from a script to match already downloaded files and rename them?

                – Andrew Savinykh
                Jan 2 at 20:32













                6














                Use youtube-dl -o '%(playlist_index)s. %(title)s.%(ext)s' https://www.youtube.com/playlist?list=....






                share|improve this answer



















                • 1





                  Sir, thank you it worked but you added playlist index, what if I have to add my own number in front instead the playlist index, what shall I do?

                  – Desmnd
                  Sep 26 '15 at 5:27
















                6














                Use youtube-dl -o '%(playlist_index)s. %(title)s.%(ext)s' https://www.youtube.com/playlist?list=....






                share|improve this answer



















                • 1





                  Sir, thank you it worked but you added playlist index, what if I have to add my own number in front instead the playlist index, what shall I do?

                  – Desmnd
                  Sep 26 '15 at 5:27














                6












                6








                6







                Use youtube-dl -o '%(playlist_index)s. %(title)s.%(ext)s' https://www.youtube.com/playlist?list=....






                share|improve this answer













                Use youtube-dl -o '%(playlist_index)s. %(title)s.%(ext)s' https://www.youtube.com/playlist?list=....







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Sep 25 '15 at 15:19









                dstftwdstftw

                69158




                69158








                • 1





                  Sir, thank you it worked but you added playlist index, what if I have to add my own number in front instead the playlist index, what shall I do?

                  – Desmnd
                  Sep 26 '15 at 5:27














                • 1





                  Sir, thank you it worked but you added playlist index, what if I have to add my own number in front instead the playlist index, what shall I do?

                  – Desmnd
                  Sep 26 '15 at 5:27








                1




                1





                Sir, thank you it worked but you added playlist index, what if I have to add my own number in front instead the playlist index, what shall I do?

                – Desmnd
                Sep 26 '15 at 5:27





                Sir, thank you it worked but you added playlist index, what if I have to add my own number in front instead the playlist index, what shall I do?

                – Desmnd
                Sep 26 '15 at 5:27











                2















                The best solution I found is:




                youtube-dl -o "%(playlist_index)s-%(title)s.%(ext)s" <playlist_link>



                For example:



                youtube-dl -o "%(playlist_index)s-%(title)s.%(ext)s" https://www.youtube.com/playlist?list=PLf8i4fc0zJBzLhOe6FwHpGhBDgqwInJWZ





                share|improve this answer




























                  2















                  The best solution I found is:




                  youtube-dl -o "%(playlist_index)s-%(title)s.%(ext)s" <playlist_link>



                  For example:



                  youtube-dl -o "%(playlist_index)s-%(title)s.%(ext)s" https://www.youtube.com/playlist?list=PLf8i4fc0zJBzLhOe6FwHpGhBDgqwInJWZ





                  share|improve this answer


























                    2












                    2








                    2








                    The best solution I found is:




                    youtube-dl -o "%(playlist_index)s-%(title)s.%(ext)s" <playlist_link>



                    For example:



                    youtube-dl -o "%(playlist_index)s-%(title)s.%(ext)s" https://www.youtube.com/playlist?list=PLf8i4fc0zJBzLhOe6FwHpGhBDgqwInJWZ





                    share|improve this answer














                    The best solution I found is:




                    youtube-dl -o "%(playlist_index)s-%(title)s.%(ext)s" <playlist_link>



                    For example:



                    youtube-dl -o "%(playlist_index)s-%(title)s.%(ext)s" https://www.youtube.com/playlist?list=PLf8i4fc0zJBzLhOe6FwHpGhBDgqwInJWZ






                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Oct 5 '17 at 13:27









                    Raja PariveshRaja Parivesh

                    36839




                    36839























                        1














                        'outtmpl': 'temp/' + str(i) +'.%(ext)s'






                        share|improve this answer




























                          1














                          'outtmpl': 'temp/' + str(i) +'.%(ext)s'






                          share|improve this answer


























                            1












                            1








                            1







                            'outtmpl': 'temp/' + str(i) +'.%(ext)s'






                            share|improve this answer













                            'outtmpl': 'temp/' + str(i) +'.%(ext)s'







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered May 19 '17 at 23:28









                            Mike GaoMike Gao

                            265




                            265























                                -1














                                you have to put the youtube link in the quotes ""



                                example



                                youtube-dl -o "%(playlist_index)s-%(title)s.%(ext)s" "https://www.youtube.com/watch?v=ZNObiptSMSI&list=PL08903FB7ACA1C2FB"





                                share|improve this answer






























                                  -1














                                  you have to put the youtube link in the quotes ""



                                  example



                                  youtube-dl -o "%(playlist_index)s-%(title)s.%(ext)s" "https://www.youtube.com/watch?v=ZNObiptSMSI&list=PL08903FB7ACA1C2FB"





                                  share|improve this answer




























                                    -1












                                    -1








                                    -1







                                    you have to put the youtube link in the quotes ""



                                    example



                                    youtube-dl -o "%(playlist_index)s-%(title)s.%(ext)s" "https://www.youtube.com/watch?v=ZNObiptSMSI&list=PL08903FB7ACA1C2FB"





                                    share|improve this answer















                                    you have to put the youtube link in the quotes ""



                                    example



                                    youtube-dl -o "%(playlist_index)s-%(title)s.%(ext)s" "https://www.youtube.com/watch?v=ZNObiptSMSI&list=PL08903FB7ACA1C2FB"






                                    share|improve this answer














                                    share|improve this answer



                                    share|improve this answer








                                    edited Nov 24 '18 at 14:26









                                    Zoe

                                    13.8k85586




                                    13.8k85586










                                    answered Nov 24 '18 at 8:26









                                    One Can AnyOne Can Any

                                    1




                                    1






























                                        draft saved

                                        draft discarded




















































                                        Thanks for contributing an answer to Stack Overflow!


                                        • 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%2fstackoverflow.com%2fquestions%2f32784639%2fchanging-name-of-the-video-while-downloading-via-youtube-dl%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







                                        這個網誌中的熱門文章

                                        Tangent Lines Diagram Along Smooth Curve

                                        Yusuf al-Mu'taman ibn Hud

                                        Zucchini