How do I extract subtitles from Video files?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
2
down vote

favorite
1












I want to use the command line to extract subtitles from video files.



I want to extract subtitles from a lot of files. That is why I want a CLI tool.



Ideally it should work with any video format that supports embedded subtitles.



For example:



subextract -f RevolutionOS.mp4

Extracting English.srt
Extracting French.srt
Extracting Russina.srt
All subtitles extracted









share|improve this question



















  • 1




    What kind of video files? How are the subtitles encoded? Are they hard coded? Please edit your question and give more details. I'm pretty sure the answer is that you can't if the subs are hard coded in the video file though.
    – terdon♦
    Apr 2 '16 at 12:33










  • Your question is vague but VLC may help you.
    – Luc M
    Apr 2 '16 at 12:46











  • @terdon Have updated the question. I mean embeeded subtitles. Not Hardcoded ones.
    – Wally
    Apr 2 '16 at 13:56






  • 1




    I would imagine that hard-coded subtitles are edited onto the video itself with the text overlaid on top of the video, while embedded subtitles are text files (in one of the common subtitle formats) embedded in the container file (.mp4, .mkv, etc). Extracting the embedded subtitles should be possible - every video player that supports subtitles manages to do it in order to display them. googling extract subtitle from container gets about 350,000 results including superuser.com/questions/391892/extract-subtitles-from-movie which mentions gpac.wp.mines-telecom.fr/mp4box
    – cas
    Apr 2 '16 at 22:54






  • 1




    (if anyone wants to "steal" my comment and turn it into a real answer, i'll happily upvote it. don't have time myself, or enough interest/knowledge in the subject. anyway, comments are always fair game for stealing into answers).
    – cas
    Apr 2 '16 at 22:55















up vote
2
down vote

favorite
1












I want to use the command line to extract subtitles from video files.



I want to extract subtitles from a lot of files. That is why I want a CLI tool.



Ideally it should work with any video format that supports embedded subtitles.



For example:



subextract -f RevolutionOS.mp4

Extracting English.srt
Extracting French.srt
Extracting Russina.srt
All subtitles extracted









share|improve this question



















  • 1




    What kind of video files? How are the subtitles encoded? Are they hard coded? Please edit your question and give more details. I'm pretty sure the answer is that you can't if the subs are hard coded in the video file though.
    – terdon♦
    Apr 2 '16 at 12:33










  • Your question is vague but VLC may help you.
    – Luc M
    Apr 2 '16 at 12:46











  • @terdon Have updated the question. I mean embeeded subtitles. Not Hardcoded ones.
    – Wally
    Apr 2 '16 at 13:56






  • 1




    I would imagine that hard-coded subtitles are edited onto the video itself with the text overlaid on top of the video, while embedded subtitles are text files (in one of the common subtitle formats) embedded in the container file (.mp4, .mkv, etc). Extracting the embedded subtitles should be possible - every video player that supports subtitles manages to do it in order to display them. googling extract subtitle from container gets about 350,000 results including superuser.com/questions/391892/extract-subtitles-from-movie which mentions gpac.wp.mines-telecom.fr/mp4box
    – cas
    Apr 2 '16 at 22:54






  • 1




    (if anyone wants to "steal" my comment and turn it into a real answer, i'll happily upvote it. don't have time myself, or enough interest/knowledge in the subject. anyway, comments are always fair game for stealing into answers).
    – cas
    Apr 2 '16 at 22:55













up vote
2
down vote

favorite
1









up vote
2
down vote

favorite
1






1





I want to use the command line to extract subtitles from video files.



I want to extract subtitles from a lot of files. That is why I want a CLI tool.



Ideally it should work with any video format that supports embedded subtitles.



For example:



subextract -f RevolutionOS.mp4

Extracting English.srt
Extracting French.srt
Extracting Russina.srt
All subtitles extracted









share|improve this question















I want to use the command line to extract subtitles from video files.



I want to extract subtitles from a lot of files. That is why I want a CLI tool.



Ideally it should work with any video format that supports embedded subtitles.



For example:



subextract -f RevolutionOS.mp4

Extracting English.srt
Extracting French.srt
Extracting Russina.srt
All subtitles extracted






command-line video-subtitles






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 23 '16 at 14:26









Jeff Schaller

34.2k951113




34.2k951113










asked Apr 2 '16 at 12:27









Wally

16217




16217







  • 1




    What kind of video files? How are the subtitles encoded? Are they hard coded? Please edit your question and give more details. I'm pretty sure the answer is that you can't if the subs are hard coded in the video file though.
    – terdon♦
    Apr 2 '16 at 12:33










  • Your question is vague but VLC may help you.
    – Luc M
    Apr 2 '16 at 12:46











  • @terdon Have updated the question. I mean embeeded subtitles. Not Hardcoded ones.
    – Wally
    Apr 2 '16 at 13:56






  • 1




    I would imagine that hard-coded subtitles are edited onto the video itself with the text overlaid on top of the video, while embedded subtitles are text files (in one of the common subtitle formats) embedded in the container file (.mp4, .mkv, etc). Extracting the embedded subtitles should be possible - every video player that supports subtitles manages to do it in order to display them. googling extract subtitle from container gets about 350,000 results including superuser.com/questions/391892/extract-subtitles-from-movie which mentions gpac.wp.mines-telecom.fr/mp4box
    – cas
    Apr 2 '16 at 22:54






  • 1




    (if anyone wants to "steal" my comment and turn it into a real answer, i'll happily upvote it. don't have time myself, or enough interest/knowledge in the subject. anyway, comments are always fair game for stealing into answers).
    – cas
    Apr 2 '16 at 22:55













  • 1




    What kind of video files? How are the subtitles encoded? Are they hard coded? Please edit your question and give more details. I'm pretty sure the answer is that you can't if the subs are hard coded in the video file though.
    – terdon♦
    Apr 2 '16 at 12:33










  • Your question is vague but VLC may help you.
    – Luc M
    Apr 2 '16 at 12:46











  • @terdon Have updated the question. I mean embeeded subtitles. Not Hardcoded ones.
    – Wally
    Apr 2 '16 at 13:56






  • 1




    I would imagine that hard-coded subtitles are edited onto the video itself with the text overlaid on top of the video, while embedded subtitles are text files (in one of the common subtitle formats) embedded in the container file (.mp4, .mkv, etc). Extracting the embedded subtitles should be possible - every video player that supports subtitles manages to do it in order to display them. googling extract subtitle from container gets about 350,000 results including superuser.com/questions/391892/extract-subtitles-from-movie which mentions gpac.wp.mines-telecom.fr/mp4box
    – cas
    Apr 2 '16 at 22:54






  • 1




    (if anyone wants to "steal" my comment and turn it into a real answer, i'll happily upvote it. don't have time myself, or enough interest/knowledge in the subject. anyway, comments are always fair game for stealing into answers).
    – cas
    Apr 2 '16 at 22:55








1




1




What kind of video files? How are the subtitles encoded? Are they hard coded? Please edit your question and give more details. I'm pretty sure the answer is that you can't if the subs are hard coded in the video file though.
– terdon♦
Apr 2 '16 at 12:33




What kind of video files? How are the subtitles encoded? Are they hard coded? Please edit your question and give more details. I'm pretty sure the answer is that you can't if the subs are hard coded in the video file though.
– terdon♦
Apr 2 '16 at 12:33












Your question is vague but VLC may help you.
– Luc M
Apr 2 '16 at 12:46





Your question is vague but VLC may help you.
– Luc M
Apr 2 '16 at 12:46













@terdon Have updated the question. I mean embeeded subtitles. Not Hardcoded ones.
– Wally
Apr 2 '16 at 13:56




@terdon Have updated the question. I mean embeeded subtitles. Not Hardcoded ones.
– Wally
Apr 2 '16 at 13:56




1




1




I would imagine that hard-coded subtitles are edited onto the video itself with the text overlaid on top of the video, while embedded subtitles are text files (in one of the common subtitle formats) embedded in the container file (.mp4, .mkv, etc). Extracting the embedded subtitles should be possible - every video player that supports subtitles manages to do it in order to display them. googling extract subtitle from container gets about 350,000 results including superuser.com/questions/391892/extract-subtitles-from-movie which mentions gpac.wp.mines-telecom.fr/mp4box
– cas
Apr 2 '16 at 22:54




I would imagine that hard-coded subtitles are edited onto the video itself with the text overlaid on top of the video, while embedded subtitles are text files (in one of the common subtitle formats) embedded in the container file (.mp4, .mkv, etc). Extracting the embedded subtitles should be possible - every video player that supports subtitles manages to do it in order to display them. googling extract subtitle from container gets about 350,000 results including superuser.com/questions/391892/extract-subtitles-from-movie which mentions gpac.wp.mines-telecom.fr/mp4box
– cas
Apr 2 '16 at 22:54




1




1




(if anyone wants to "steal" my comment and turn it into a real answer, i'll happily upvote it. don't have time myself, or enough interest/knowledge in the subject. anyway, comments are always fair game for stealing into answers).
– cas
Apr 2 '16 at 22:55





(if anyone wants to "steal" my comment and turn it into a real answer, i'll happily upvote it. don't have time myself, or enough interest/knowledge in the subject. anyway, comments are always fair game for stealing into answers).
– cas
Apr 2 '16 at 22:55











2 Answers
2






active

oldest

votes

















up vote
1
down vote













There are such tools, specific to each container type (assuming subtitles are stored as text, not mixed in the video stream):



  • MKV: mkvtoolnix

  • MP4 and 3GP: MP4Box

  • AVI: ffmpeg / avconv

For your question specifically, the command line would be



MP4Box -srt <trackID> RevolutionOS.mp4


Where possible values of trackID can be deduced from the output of



MP4Box -info RevolutionOS.mp4


For subtitles which are mixed into the video stream (so-called hardsubs), OCR software is required. There seem to be ready-made solutions here, for example subtitleripper + GOCR for VobSub (common format for DVD), but I have no experience with those and no idea how good they are.






share|improve this answer





























    up vote
    -1
    down vote













    Avdshare Video Converter is just a professional MKV extractor to help users to perfectly extract subtitles from MKV.





    share








    New contributor




    Tonya Rabish is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.

















      Your Answer







      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "106"
      ;
      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',
      convertImagesToLinks: false,
      noModals: false,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      bindNavPrevention: true,
      postfix: "",
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );













       

      draft saved


      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f273834%2fhow-do-i-extract-subtitles-from-video-files%23new-answer', 'question_page');

      );

      Post as a guest






























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes








      up vote
      1
      down vote













      There are such tools, specific to each container type (assuming subtitles are stored as text, not mixed in the video stream):



      • MKV: mkvtoolnix

      • MP4 and 3GP: MP4Box

      • AVI: ffmpeg / avconv

      For your question specifically, the command line would be



      MP4Box -srt <trackID> RevolutionOS.mp4


      Where possible values of trackID can be deduced from the output of



      MP4Box -info RevolutionOS.mp4


      For subtitles which are mixed into the video stream (so-called hardsubs), OCR software is required. There seem to be ready-made solutions here, for example subtitleripper + GOCR for VobSub (common format for DVD), but I have no experience with those and no idea how good they are.






      share|improve this answer


























        up vote
        1
        down vote













        There are such tools, specific to each container type (assuming subtitles are stored as text, not mixed in the video stream):



        • MKV: mkvtoolnix

        • MP4 and 3GP: MP4Box

        • AVI: ffmpeg / avconv

        For your question specifically, the command line would be



        MP4Box -srt <trackID> RevolutionOS.mp4


        Where possible values of trackID can be deduced from the output of



        MP4Box -info RevolutionOS.mp4


        For subtitles which are mixed into the video stream (so-called hardsubs), OCR software is required. There seem to be ready-made solutions here, for example subtitleripper + GOCR for VobSub (common format for DVD), but I have no experience with those and no idea how good they are.






        share|improve this answer
























          up vote
          1
          down vote










          up vote
          1
          down vote









          There are such tools, specific to each container type (assuming subtitles are stored as text, not mixed in the video stream):



          • MKV: mkvtoolnix

          • MP4 and 3GP: MP4Box

          • AVI: ffmpeg / avconv

          For your question specifically, the command line would be



          MP4Box -srt <trackID> RevolutionOS.mp4


          Where possible values of trackID can be deduced from the output of



          MP4Box -info RevolutionOS.mp4


          For subtitles which are mixed into the video stream (so-called hardsubs), OCR software is required. There seem to be ready-made solutions here, for example subtitleripper + GOCR for VobSub (common format for DVD), but I have no experience with those and no idea how good they are.






          share|improve this answer














          There are such tools, specific to each container type (assuming subtitles are stored as text, not mixed in the video stream):



          • MKV: mkvtoolnix

          • MP4 and 3GP: MP4Box

          • AVI: ffmpeg / avconv

          For your question specifically, the command line would be



          MP4Box -srt <trackID> RevolutionOS.mp4


          Where possible values of trackID can be deduced from the output of



          MP4Box -info RevolutionOS.mp4


          For subtitles which are mixed into the video stream (so-called hardsubs), OCR software is required. There seem to be ready-made solutions here, for example subtitleripper + GOCR for VobSub (common format for DVD), but I have no experience with those and no idea how good they are.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited May 23 '17 at 12:39









          Community♦

          1




          1










          answered Nov 23 '16 at 14:37









          Dmitry Grigoryev

          4,975744




          4,975744






















              up vote
              -1
              down vote













              Avdshare Video Converter is just a professional MKV extractor to help users to perfectly extract subtitles from MKV.





              share








              New contributor




              Tonya Rabish is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.





















                up vote
                -1
                down vote













                Avdshare Video Converter is just a professional MKV extractor to help users to perfectly extract subtitles from MKV.





                share








                New contributor




                Tonya Rabish is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.



















                  up vote
                  -1
                  down vote










                  up vote
                  -1
                  down vote









                  Avdshare Video Converter is just a professional MKV extractor to help users to perfectly extract subtitles from MKV.





                  share








                  New contributor




                  Tonya Rabish is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.









                  Avdshare Video Converter is just a professional MKV extractor to help users to perfectly extract subtitles from MKV.






                  share








                  New contributor




                  Tonya Rabish is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.








                  share


                  share






                  New contributor




                  Tonya Rabish is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.









                  answered 3 mins ago









                  Tonya Rabish

                  1




                  1




                  New contributor




                  Tonya Rabish is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.





                  New contributor





                  Tonya Rabish is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.






                  Tonya Rabish is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.



























                       

                      draft saved


                      draft discarded















































                       


                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f273834%2fhow-do-i-extract-subtitles-from-video-files%23new-answer', 'question_page');

                      );

                      Post as a guest













































































                      Popular posts from this blog

                      How to check contact read email or not when send email to Individual?

                      Bahrain

                      Postfix configuration issue with fips on centos 7; mailgun relay