How to check how long a video (mp4) is using the shell?












13















I need to ftp upload all the mp4 files in a directory with length > 4 minutes using the shell. I can't find any script to check how long a video is. Does anybody have any idea how to do that?



Thank you very much!










share|improve this question


















  • 1





    see this stackoverflow.com/questions/3844430/… :-) hope this helps

    – harish.venkat
    Dec 1 '12 at 13:50
















13















I need to ftp upload all the mp4 files in a directory with length > 4 minutes using the shell. I can't find any script to check how long a video is. Does anybody have any idea how to do that?



Thank you very much!










share|improve this question


















  • 1





    see this stackoverflow.com/questions/3844430/… :-) hope this helps

    – harish.venkat
    Dec 1 '12 at 13:50














13












13








13


3






I need to ftp upload all the mp4 files in a directory with length > 4 minutes using the shell. I can't find any script to check how long a video is. Does anybody have any idea how to do that?



Thank you very much!










share|improve this question














I need to ftp upload all the mp4 files in a directory with length > 4 minutes using the shell. I can't find any script to check how long a video is. Does anybody have any idea how to do that?



Thank you very much!







command-line bash video scripts mp4






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Dec 1 '12 at 13:06









ThomasThomas

66113




66113








  • 1





    see this stackoverflow.com/questions/3844430/… :-) hope this helps

    – harish.venkat
    Dec 1 '12 at 13:50














  • 1





    see this stackoverflow.com/questions/3844430/… :-) hope this helps

    – harish.venkat
    Dec 1 '12 at 13:50








1




1





see this stackoverflow.com/questions/3844430/… :-) hope this helps

– harish.venkat
Dec 1 '12 at 13:50





see this stackoverflow.com/questions/3844430/… :-) hope this helps

– harish.venkat
Dec 1 '12 at 13:50










7 Answers
7






active

oldest

votes


















21














This will give you the length of a video.



ffmpeg -i myvideo 2>&1 | grep Duration | cut -d ' ' -f 4 | sed s/,//





share|improve this answer


























  • Also works for remote video urls e.g. ffmpeg -i "instagram.fewr1-1.fna.fbcdn.net/t50.2886-16/…" 2>&1 | grep Duration | cut -d ' ' -f 4 | sed s/,//

    – skidadon
    Oct 16 '17 at 19:35





















5














Mediainfo is a fast tool for this purpose:



$ mediainfo --Inform="Video;%Duration%"  [inputfile]


You can find more options in a more thorough answer.



In my tests, ffprobe takes 0.3 seconds and mediainfo takes 0.09 seconds.






share|improve this answer

































    5














    You can try to use avconv command..



    First you should to install:



    Install via the software center



    if you type the command with the flag -i, you will get information about the video:



    avconv -i test.mp4



    In the output there is a field called Duration



    avconv version 0.8.4-4:0.8.4-0ubuntu0.12.04.1, Copyright (c) 2000-2012 the Libav developers
    built on Nov 6 2012 16:51:33 with gcc 4.6.3
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test.mp4':

    Duration: 00:58:28.05, start: 0.000000, bitrate: 888 kb/s
    Stream #0.0(eng): Video: h264 (High), yuv420p, 720x404, 748 kb/s, 25 fps, 25 tbr, 20k tbn, 50 tbc
    Stream #0.1(und): Audio: aac, 48000 Hz, stereo, s16, 127 kb/s


    Now you can use the command to only get the value of the field Duration



    Type:



    avconv -i file.mp4 2>&1 | grep 'Duration' | awk '{print $2}' | sed s/,//


    In my case the result is:



    00:58:28.05


    58 Minutes and 28.05 seconds.



    Hope this will helpful!






    share|improve this answer





















    • 1





      This can also be used with avprobe - no need for the -i, but it otherwise works exactly the same way. Or ffprobe for @per's answer.

      – evilsoup
      Dec 18 '12 at 7:54



















    3














    exiftool (originally intended for reading camera metadata from image files, but later expanded to read and write metadata from almost any kind of media file) is very convenient to use for this. Run it with:



    exiftool FILE.mp4 | grep Duration


    You'll probably need to install exiftool first, but this is is easily done with the following command (on Debian and derivatives like Ubuntu etc.):



    apt install libimage-exiftool-perl


    Of course, this answer is just another alternative. Many of the other answers are good too. :)






    share|improve this answer

































      2














      Even simpler:



      avprobe file.mp4 -show_format_entry duration





      share|improve this answer
























      • I currently get the message "Option 'show_format_entry' is deprecated, use '-show_entries format=duration' instead"

        – Faheem Mitha
        Nov 5 '17 at 13:31



















      0














      Adding to pers solution, this can be used on an entire directory:



      for f in *; do ffmpeg -i "$f" 2>&1 | grep Duration | cut -d " " -f 4 | sed s/,//  | tr -d "n" && echo " $f"; done


      it can even be extended by | sort to have the files sorted by their length.



      you can add this to .bashrc or .bash_aliases in order to be able to do lsvlength | sort on a directory



      alias lsvlength='for f in *; do ffmpeg -i "$f" 2>&1 | grep Duration | cut -d " " -f 4 | sed s/,//  | tr -d "n" && echo " $f"; done'





      share|improve this answer

































        0














        If you want to see duration of some videos in a directory , you can use following command




        exiftool * | grep ^Du | cut -d' ' -f 26







        share|improve this answer








        New contributor




        meisamhakimi 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: "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%2f224237%2fhow-to-check-how-long-a-video-mp4-is-using-the-shell%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          7 Answers
          7






          active

          oldest

          votes








          7 Answers
          7






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          21














          This will give you the length of a video.



          ffmpeg -i myvideo 2>&1 | grep Duration | cut -d ' ' -f 4 | sed s/,//





          share|improve this answer


























          • Also works for remote video urls e.g. ffmpeg -i "instagram.fewr1-1.fna.fbcdn.net/t50.2886-16/…" 2>&1 | grep Duration | cut -d ' ' -f 4 | sed s/,//

            – skidadon
            Oct 16 '17 at 19:35


















          21














          This will give you the length of a video.



          ffmpeg -i myvideo 2>&1 | grep Duration | cut -d ' ' -f 4 | sed s/,//





          share|improve this answer


























          • Also works for remote video urls e.g. ffmpeg -i "instagram.fewr1-1.fna.fbcdn.net/t50.2886-16/…" 2>&1 | grep Duration | cut -d ' ' -f 4 | sed s/,//

            – skidadon
            Oct 16 '17 at 19:35
















          21












          21








          21







          This will give you the length of a video.



          ffmpeg -i myvideo 2>&1 | grep Duration | cut -d ' ' -f 4 | sed s/,//





          share|improve this answer















          This will give you the length of a video.



          ffmpeg -i myvideo 2>&1 | grep Duration | cut -d ' ' -f 4 | sed s/,//






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Dec 2 '12 at 12:22







          user2405

















          answered Dec 1 '12 at 13:58









          perper

          21112




          21112













          • Also works for remote video urls e.g. ffmpeg -i "instagram.fewr1-1.fna.fbcdn.net/t50.2886-16/…" 2>&1 | grep Duration | cut -d ' ' -f 4 | sed s/,//

            – skidadon
            Oct 16 '17 at 19:35





















          • Also works for remote video urls e.g. ffmpeg -i "instagram.fewr1-1.fna.fbcdn.net/t50.2886-16/…" 2>&1 | grep Duration | cut -d ' ' -f 4 | sed s/,//

            – skidadon
            Oct 16 '17 at 19:35



















          Also works for remote video urls e.g. ffmpeg -i "instagram.fewr1-1.fna.fbcdn.net/t50.2886-16/…" 2>&1 | grep Duration | cut -d ' ' -f 4 | sed s/,//

          – skidadon
          Oct 16 '17 at 19:35







          Also works for remote video urls e.g. ffmpeg -i "instagram.fewr1-1.fna.fbcdn.net/t50.2886-16/…" 2>&1 | grep Duration | cut -d ' ' -f 4 | sed s/,//

          – skidadon
          Oct 16 '17 at 19:35















          5














          Mediainfo is a fast tool for this purpose:



          $ mediainfo --Inform="Video;%Duration%"  [inputfile]


          You can find more options in a more thorough answer.



          In my tests, ffprobe takes 0.3 seconds and mediainfo takes 0.09 seconds.






          share|improve this answer






























            5














            Mediainfo is a fast tool for this purpose:



            $ mediainfo --Inform="Video;%Duration%"  [inputfile]


            You can find more options in a more thorough answer.



            In my tests, ffprobe takes 0.3 seconds and mediainfo takes 0.09 seconds.






            share|improve this answer




























              5












              5








              5







              Mediainfo is a fast tool for this purpose:



              $ mediainfo --Inform="Video;%Duration%"  [inputfile]


              You can find more options in a more thorough answer.



              In my tests, ffprobe takes 0.3 seconds and mediainfo takes 0.09 seconds.






              share|improve this answer















              Mediainfo is a fast tool for this purpose:



              $ mediainfo --Inform="Video;%Duration%"  [inputfile]


              You can find more options in a more thorough answer.



              In my tests, ffprobe takes 0.3 seconds and mediainfo takes 0.09 seconds.







              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited May 23 '17 at 12:39









              Community

              1




              1










              answered Sep 5 '16 at 20:02









              qubodupqubodup

              17114




              17114























                  5














                  You can try to use avconv command..



                  First you should to install:



                  Install via the software center



                  if you type the command with the flag -i, you will get information about the video:



                  avconv -i test.mp4



                  In the output there is a field called Duration



                  avconv version 0.8.4-4:0.8.4-0ubuntu0.12.04.1, Copyright (c) 2000-2012 the Libav developers
                  built on Nov 6 2012 16:51:33 with gcc 4.6.3
                  Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test.mp4':

                  Duration: 00:58:28.05, start: 0.000000, bitrate: 888 kb/s
                  Stream #0.0(eng): Video: h264 (High), yuv420p, 720x404, 748 kb/s, 25 fps, 25 tbr, 20k tbn, 50 tbc
                  Stream #0.1(und): Audio: aac, 48000 Hz, stereo, s16, 127 kb/s


                  Now you can use the command to only get the value of the field Duration



                  Type:



                  avconv -i file.mp4 2>&1 | grep 'Duration' | awk '{print $2}' | sed s/,//


                  In my case the result is:



                  00:58:28.05


                  58 Minutes and 28.05 seconds.



                  Hope this will helpful!






                  share|improve this answer





















                  • 1





                    This can also be used with avprobe - no need for the -i, but it otherwise works exactly the same way. Or ffprobe for @per's answer.

                    – evilsoup
                    Dec 18 '12 at 7:54
















                  5














                  You can try to use avconv command..



                  First you should to install:



                  Install via the software center



                  if you type the command with the flag -i, you will get information about the video:



                  avconv -i test.mp4



                  In the output there is a field called Duration



                  avconv version 0.8.4-4:0.8.4-0ubuntu0.12.04.1, Copyright (c) 2000-2012 the Libav developers
                  built on Nov 6 2012 16:51:33 with gcc 4.6.3
                  Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test.mp4':

                  Duration: 00:58:28.05, start: 0.000000, bitrate: 888 kb/s
                  Stream #0.0(eng): Video: h264 (High), yuv420p, 720x404, 748 kb/s, 25 fps, 25 tbr, 20k tbn, 50 tbc
                  Stream #0.1(und): Audio: aac, 48000 Hz, stereo, s16, 127 kb/s


                  Now you can use the command to only get the value of the field Duration



                  Type:



                  avconv -i file.mp4 2>&1 | grep 'Duration' | awk '{print $2}' | sed s/,//


                  In my case the result is:



                  00:58:28.05


                  58 Minutes and 28.05 seconds.



                  Hope this will helpful!






                  share|improve this answer





















                  • 1





                    This can also be used with avprobe - no need for the -i, but it otherwise works exactly the same way. Or ffprobe for @per's answer.

                    – evilsoup
                    Dec 18 '12 at 7:54














                  5












                  5








                  5







                  You can try to use avconv command..



                  First you should to install:



                  Install via the software center



                  if you type the command with the flag -i, you will get information about the video:



                  avconv -i test.mp4



                  In the output there is a field called Duration



                  avconv version 0.8.4-4:0.8.4-0ubuntu0.12.04.1, Copyright (c) 2000-2012 the Libav developers
                  built on Nov 6 2012 16:51:33 with gcc 4.6.3
                  Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test.mp4':

                  Duration: 00:58:28.05, start: 0.000000, bitrate: 888 kb/s
                  Stream #0.0(eng): Video: h264 (High), yuv420p, 720x404, 748 kb/s, 25 fps, 25 tbr, 20k tbn, 50 tbc
                  Stream #0.1(und): Audio: aac, 48000 Hz, stereo, s16, 127 kb/s


                  Now you can use the command to only get the value of the field Duration



                  Type:



                  avconv -i file.mp4 2>&1 | grep 'Duration' | awk '{print $2}' | sed s/,//


                  In my case the result is:



                  00:58:28.05


                  58 Minutes and 28.05 seconds.



                  Hope this will helpful!






                  share|improve this answer















                  You can try to use avconv command..



                  First you should to install:



                  Install via the software center



                  if you type the command with the flag -i, you will get information about the video:



                  avconv -i test.mp4



                  In the output there is a field called Duration



                  avconv version 0.8.4-4:0.8.4-0ubuntu0.12.04.1, Copyright (c) 2000-2012 the Libav developers
                  built on Nov 6 2012 16:51:33 with gcc 4.6.3
                  Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test.mp4':

                  Duration: 00:58:28.05, start: 0.000000, bitrate: 888 kb/s
                  Stream #0.0(eng): Video: h264 (High), yuv420p, 720x404, 748 kb/s, 25 fps, 25 tbr, 20k tbn, 50 tbc
                  Stream #0.1(und): Audio: aac, 48000 Hz, stereo, s16, 127 kb/s


                  Now you can use the command to only get the value of the field Duration



                  Type:



                  avconv -i file.mp4 2>&1 | grep 'Duration' | awk '{print $2}' | sed s/,//


                  In my case the result is:



                  00:58:28.05


                  58 Minutes and 28.05 seconds.



                  Hope this will helpful!







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Mar 10 '17 at 21:34









                  Elder Geek

                  27.4k955130




                  27.4k955130










                  answered Dec 1 '12 at 14:05









                  Roman RaguetRoman Raguet

                  8,27113240




                  8,27113240








                  • 1





                    This can also be used with avprobe - no need for the -i, but it otherwise works exactly the same way. Or ffprobe for @per's answer.

                    – evilsoup
                    Dec 18 '12 at 7:54














                  • 1





                    This can also be used with avprobe - no need for the -i, but it otherwise works exactly the same way. Or ffprobe for @per's answer.

                    – evilsoup
                    Dec 18 '12 at 7:54








                  1




                  1





                  This can also be used with avprobe - no need for the -i, but it otherwise works exactly the same way. Or ffprobe for @per's answer.

                  – evilsoup
                  Dec 18 '12 at 7:54





                  This can also be used with avprobe - no need for the -i, but it otherwise works exactly the same way. Or ffprobe for @per's answer.

                  – evilsoup
                  Dec 18 '12 at 7:54











                  3














                  exiftool (originally intended for reading camera metadata from image files, but later expanded to read and write metadata from almost any kind of media file) is very convenient to use for this. Run it with:



                  exiftool FILE.mp4 | grep Duration


                  You'll probably need to install exiftool first, but this is is easily done with the following command (on Debian and derivatives like Ubuntu etc.):



                  apt install libimage-exiftool-perl


                  Of course, this answer is just another alternative. Many of the other answers are good too. :)






                  share|improve this answer






























                    3














                    exiftool (originally intended for reading camera metadata from image files, but later expanded to read and write metadata from almost any kind of media file) is very convenient to use for this. Run it with:



                    exiftool FILE.mp4 | grep Duration


                    You'll probably need to install exiftool first, but this is is easily done with the following command (on Debian and derivatives like Ubuntu etc.):



                    apt install libimage-exiftool-perl


                    Of course, this answer is just another alternative. Many of the other answers are good too. :)






                    share|improve this answer




























                      3












                      3








                      3







                      exiftool (originally intended for reading camera metadata from image files, but later expanded to read and write metadata from almost any kind of media file) is very convenient to use for this. Run it with:



                      exiftool FILE.mp4 | grep Duration


                      You'll probably need to install exiftool first, but this is is easily done with the following command (on Debian and derivatives like Ubuntu etc.):



                      apt install libimage-exiftool-perl


                      Of course, this answer is just another alternative. Many of the other answers are good too. :)






                      share|improve this answer















                      exiftool (originally intended for reading camera metadata from image files, but later expanded to read and write metadata from almost any kind of media file) is very convenient to use for this. Run it with:



                      exiftool FILE.mp4 | grep Duration


                      You'll probably need to install exiftool first, but this is is easily done with the following command (on Debian and derivatives like Ubuntu etc.):



                      apt install libimage-exiftool-perl


                      Of course, this answer is just another alternative. Many of the other answers are good too. :)







                      share|improve this answer














                      share|improve this answer



                      share|improve this answer








                      edited Sep 10 '17 at 13:37

























                      answered Sep 10 '17 at 13:29









                      zrajmzrajm

                      1,80411014




                      1,80411014























                          2














                          Even simpler:



                          avprobe file.mp4 -show_format_entry duration





                          share|improve this answer
























                          • I currently get the message "Option 'show_format_entry' is deprecated, use '-show_entries format=duration' instead"

                            – Faheem Mitha
                            Nov 5 '17 at 13:31
















                          2














                          Even simpler:



                          avprobe file.mp4 -show_format_entry duration





                          share|improve this answer
























                          • I currently get the message "Option 'show_format_entry' is deprecated, use '-show_entries format=duration' instead"

                            – Faheem Mitha
                            Nov 5 '17 at 13:31














                          2












                          2








                          2







                          Even simpler:



                          avprobe file.mp4 -show_format_entry duration





                          share|improve this answer













                          Even simpler:



                          avprobe file.mp4 -show_format_entry duration






                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Apr 13 '16 at 14:30









                          Joan Albert SilvestreJoan Albert Silvestre

                          371




                          371













                          • I currently get the message "Option 'show_format_entry' is deprecated, use '-show_entries format=duration' instead"

                            – Faheem Mitha
                            Nov 5 '17 at 13:31



















                          • I currently get the message "Option 'show_format_entry' is deprecated, use '-show_entries format=duration' instead"

                            – Faheem Mitha
                            Nov 5 '17 at 13:31

















                          I currently get the message "Option 'show_format_entry' is deprecated, use '-show_entries format=duration' instead"

                          – Faheem Mitha
                          Nov 5 '17 at 13:31





                          I currently get the message "Option 'show_format_entry' is deprecated, use '-show_entries format=duration' instead"

                          – Faheem Mitha
                          Nov 5 '17 at 13:31











                          0














                          Adding to pers solution, this can be used on an entire directory:



                          for f in *; do ffmpeg -i "$f" 2>&1 | grep Duration | cut -d " " -f 4 | sed s/,//  | tr -d "n" && echo " $f"; done


                          it can even be extended by | sort to have the files sorted by their length.



                          you can add this to .bashrc or .bash_aliases in order to be able to do lsvlength | sort on a directory



                          alias lsvlength='for f in *; do ffmpeg -i "$f" 2>&1 | grep Duration | cut -d " " -f 4 | sed s/,//  | tr -d "n" && echo " $f"; done'





                          share|improve this answer






























                            0














                            Adding to pers solution, this can be used on an entire directory:



                            for f in *; do ffmpeg -i "$f" 2>&1 | grep Duration | cut -d " " -f 4 | sed s/,//  | tr -d "n" && echo " $f"; done


                            it can even be extended by | sort to have the files sorted by their length.



                            you can add this to .bashrc or .bash_aliases in order to be able to do lsvlength | sort on a directory



                            alias lsvlength='for f in *; do ffmpeg -i "$f" 2>&1 | grep Duration | cut -d " " -f 4 | sed s/,//  | tr -d "n" && echo " $f"; done'





                            share|improve this answer




























                              0












                              0








                              0







                              Adding to pers solution, this can be used on an entire directory:



                              for f in *; do ffmpeg -i "$f" 2>&1 | grep Duration | cut -d " " -f 4 | sed s/,//  | tr -d "n" && echo " $f"; done


                              it can even be extended by | sort to have the files sorted by their length.



                              you can add this to .bashrc or .bash_aliases in order to be able to do lsvlength | sort on a directory



                              alias lsvlength='for f in *; do ffmpeg -i "$f" 2>&1 | grep Duration | cut -d " " -f 4 | sed s/,//  | tr -d "n" && echo " $f"; done'





                              share|improve this answer















                              Adding to pers solution, this can be used on an entire directory:



                              for f in *; do ffmpeg -i "$f" 2>&1 | grep Duration | cut -d " " -f 4 | sed s/,//  | tr -d "n" && echo " $f"; done


                              it can even be extended by | sort to have the files sorted by their length.



                              you can add this to .bashrc or .bash_aliases in order to be able to do lsvlength | sort on a directory



                              alias lsvlength='for f in *; do ffmpeg -i "$f" 2>&1 | grep Duration | cut -d " " -f 4 | sed s/,//  | tr -d "n" && echo " $f"; done'






                              share|improve this answer














                              share|improve this answer



                              share|improve this answer








                              edited Apr 13 '17 at 12:23









                              Community

                              1




                              1










                              answered Feb 14 '17 at 11:16









                              mcnesiummcnesium

                              1714




                              1714























                                  0














                                  If you want to see duration of some videos in a directory , you can use following command




                                  exiftool * | grep ^Du | cut -d' ' -f 26







                                  share|improve this answer








                                  New contributor




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

























                                    0














                                    If you want to see duration of some videos in a directory , you can use following command




                                    exiftool * | grep ^Du | cut -d' ' -f 26







                                    share|improve this answer








                                    New contributor




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























                                      0












                                      0








                                      0







                                      If you want to see duration of some videos in a directory , you can use following command




                                      exiftool * | grep ^Du | cut -d' ' -f 26







                                      share|improve this answer








                                      New contributor




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










                                      If you want to see duration of some videos in a directory , you can use following command




                                      exiftool * | grep ^Du | cut -d' ' -f 26








                                      share|improve this answer








                                      New contributor




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









                                      share|improve this answer



                                      share|improve this answer






                                      New contributor




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









                                      answered 2 hours ago









                                      meisamhakimimeisamhakimi

                                      1




                                      1




                                      New contributor




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





                                      New contributor





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






                                      meisamhakimi 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




















































                                          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%2f224237%2fhow-to-check-how-long-a-video-mp4-is-using-the-shell%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

                                          GameSpot

                                          connect to host localhost port 22: Connection refused

                                          Getting a Wifi WPA2 wifi connection