vidtime.bat

Click here to download: vidtime.bat  (ver 27-Dec-2025)

You may find this windows batch script useful if you have a large collection of video files. It creates a results file which includes a sorted listing of all the video files in the current folder (and all subfolders). Note that you must start vidtime in the folder containing the video files and/or subfolders containing video files. The results file is always named vidtime.txt and saved in the current folder. Each line of the listing shows one video file with the following information about the file (in this order): The script displays a dot on the console for every video file processed to let you know that the script is still running. When all the files have been processed the file count as well as the totals for Duration and File size are displayed. These totals are also included as the first line of the result file.

Here is a sample results file. When the script was invoked, the current folder contained 10 video files and no subfolders:

************* Total run time 12:22:26 ******************* 10 video files, 4.8 GB 
00:01:02   221 kbs  mpeg1   320x240      1 MB  .wmv  ---  Anticipation
01:20:16  1045 kbs  h264   1280x720    629 MB  .mp4  ---  Before Sunset 2004
00:05:15   531 kbs  flv1    640x480     20 MB  .flv  ---  Benjamin Franklin
01:48:00   993 kbs  h264   1280x536    804 MB  .mp4  ---  Ex Machina 2015
00:01:12   204 kbs  msvid   240x180      1 MB  .mov  ---  Indecent Proposal
01:34:34  1037 kbs  h264   1280x720    736 MB  .mkv  ---  Inside Out 2015
01:16:23   550 kbs  mpeg4   720x288    315 MB  .avi  ---  Lady and the Tramp 1955
02:29:46   561 kbs  mpeg2   720x304    630 MB  .avi  ---  Lincoln 2012
01:42:49   947 kbs  wmv3    988x720    730 MB  .avi  ---  Singin in the Rain 1952
02:03:09  1048 kbs  h264   1280x528    968 MB  .mp4  ---  The Walk 2015

For this script to run, you must have these two additional files:

sed.exe Go to http://gnuwin32.sourceforge.net/packages/sed.htm and download the "Binaries" zip file. Extract sed.exe from the bin folder and put it anywhere to like as long as it is on your DOS path. (This the only file you need from the archive.) Other versions of sed may work, although I only tested it with GNU sed.
ffprobe.exe Go to https://www.ffmpeg.org/download.html and click on the Windows icon and then on one of the links for "Windows EXE files". After downloading any build, extract ffprobe.exe from the bin folder and put it anywhere you like as long as it is on your DOS path. (This is the only file you need from the archive.)

As it is running vidtime creates these four temporary files in the windows temp folder: The line containing the sums computed by vidtmpD.bat is appended to vidtmpC.txt which then is finally sorted alphabetically to create the results file. Normally vidtime.bat deletes the 4 temporary files described above after creating the results file. However if you want to view these temporary files to figure out how vidtime works, call vidtime with any argument, as in:

vidtime arg

where "arg" is any word or any number. (Normally vidtime is called without any arguments.)
When vidtime sees that an argument has been supplied it will skip the step where it deletes the temporary files,

vidtime2.bat

Click here to download: vidtime2.bat  (ver 26-Dec-2025)

This script is used in the same way as vidtime.bat described above and serves the same purpose. However it uses a different method to extract the desired information from the video files. vidtime.bat does this with ffprobe.exe and vidtime2 does this with MediaInfo.exe Often problems with videos in your video collection will be discovered by one or both of these batch and sometimes only by noticing that the results from the two batch files are different. The results file is always named vidtime2.txt and saved in the current folder and contains the same information as the vidtime.bat results file. One difference in the results files however is that different abbreviations are used to describe the video codecs so the two results files will never be identical.
For this script to run, you must have these two additional files:

sed.exe Go to http://gnuwin32.sourceforge.net/packages/sed.htm and download the "Binaries" zip file. Extract sed.exe from the bin folder and put it anywhere to like as long as it is on your DOS path. (This the only file you need from the archive.) Other versions of sed may work, although I only tested it with GNU sed.
MediaInfo.exe Go to https://mediaarea.net/en/MediaInfo/Download/Windows and download the zip file by selecting "Intel 64 bit CLI" (Command Line Interface).
You also may want to download the GUI version, but it is not needed for vidtime2.bat.
If the version hasn't changed, you can alternatively download the zip file by clicking on:
https://mediaarea.net/download/binary/mediainfo/25.10/MediaInfo_CLI_25.10_Windows_x64.zip"

Extract MediaInfo.exe from this zip file and put it anywhere you like as long as it is on your DOS path. (This is the only file you need from the archive.)

As it is running vidtime2 creates these six temporary files in the windows temp folder: The line containing the sums computed by vtmpE.bat is appended to vdtmpD.txt which then is finally sorted alphabetically to create the results file. Normally vidtime2.bat deletes the 6 temporary files described above after creating the results file. However if you want to view these temporary files to figure out how vidtime2 works, call vidtime2 with any argument, as in:

vidtime2 arg

where "arg" is any word or any number. (Normally vidtime2 is called without any arguments.)
When vidtime2 sees that an argument has been supplied it will skip the step where it deletes the temporary files,

mp3time.bat

Click here to download: mp3time.bat

This script is similar to the previous one except that it looks for mp3 audio files instead of video files. As with the previous script, you also must have sed and ffprobe. The result file is always named mp3time.txt in the current folder.

I have tested this script with a collection containing over 100,000 files, but below is a sample output file from a much smaller collection. When the script was invoked, the current folder contained 2 folders each of which contained six mp3 files. The number after the audio duration is the bitrate in kilobits per second:

****** 12 mp3 files ************** 4:09:24 Total run time, 289 MB ************ 
00:02:45   64K   1.32 MB  ---  Live\Advice to Little Girls
00:22:33  128K  21.65 MB  ---  Live\Cannibalism in the Cars
00:02:26  256K   4.68 MB  ---  Live\No Two People
00:38:56  128K  37.37 MB  ---  Live\Stolen White Elephant
00:28:11  128K  27.07 MB  ---  Live\Taming the Bicycle
00:31:47   64K  15.25 MB  ---  Live\Travelling with a Reformer
00:02:40  256K   5.13 MB  ---  Visit\Bloop Bleep
00:04:08   96K   2.98 MB  ---  Visit\Buying a House
00:20:15  128K  19.44 MB  ---  Visit\Dogs Tale
00:02:42  256K   5.20 MB  ---  Visit\Little White Duck
00:02:15  192K   3.29 MB  ---  Visit\Mental Makeup
01:30:46  213K 145.23 MB  ---  Visit\Rough Around the Edges

audiotime.bat

Click here to download: audiotime.bat

If your audio collection contains only mp3 files (by far the most popular audio format) then you will probably prefer the previous script, but if you use any of the alternative audio formats then this is the script you want. The result file is always named audiotime.txt in the current folder.

Here is a sample output file. When the script was invoked, the current folder contained 9 audio files using each of the 9 audio formats supported by audiotime.bat:

********* 9 audio files *********** 0:29:31 Total run time, 120 MB *********** 
00:03:10  780K  18.56 MB  .ape  ---  Track 1 (monkeys lossless audio) 
00:03:48  889K  25.44 MB  .flac ---  Track 2 (free lossless audio) 
00:01:52  195K   2.73 MB  .mpc  ---  Track 3 (musepack) 
00:05:02   64K   2.42 MB  .mp2  ---  Track 4 (mpeg1 layer2) 
00:01:52  256K   3.59 MB  .mp3  ---  Track 5 (mp3) 
00:02:36  901K  17.65 MB  .m4a  ---  Track 6 (mpeg4 audio) 
00:04:14  214K   6.81 MB  .ogg  ---  Track 7 (ogg vorbis) 
00:03:45 1411K  39.69 MB  .wav  ---  Track 8 (windows wav lossless) 
00:03:12  129K   3.11 MB  .wma  ---  Track 9 (windows media audio) 

listsubs.bat

Click here to download: listsubs.bat  (ver 11-Jan-2026)

Click here to download: listsub.exe  (An auxiliary program required to run listsubs.bat)

Click here to download: listsub.cpp  (The source code for the auxiliary program above)

This script creates a sorted list of video files in the current folder (including subfolders).
Each video file takes up one line in the output file which is always named subtitles.txt which is saved in the current folder.
Following each video filename (on the same line) is a list of subtitles by language that are embedded into the video file followed by a list of external subtitles for the video.

The most common type of video file to include an imbedded subtitle is .mkv although .mp4 may also included subtitles. Some file types (.avi for example) don't have the ability to include and imbedded subtitle. Note that I'm not talking about hard coded subtitles (which are encoded into the video pixels). Any video file type may include hard coded subtitles, but they are less common and less desirable since you can't select your language and you can't even turn them off or adjust it's size, position, font, or any other aspect of appearance. (Detecting the presence of hard coded subtitles is difficult and listsubs makes no attempt to do that.) Here are some typical sample lines from an output file:
path\video1.mkv English Spanish French
path\video2.mkv -----------------------------------------------------------------------
path\video3.mkv English?
path\video4.mp4 .French.srt .Spanish.srt .srt
path\video5.mkv Arabic German Italian .srt
path\video6.avi .srh
path\video7.mp4 .SRT
path\video8.mp4 English Portuguese .Chinese.srt .srt
This output tells you that: listsubs recognizes .both .srt and .SRT and treats them the same. So you may choose the lower or upper case extension randomly, or you may use the case of the extension to tell you something about the subtitle file. For example in my video collection, I always use the lower case extension (.srt) for real subtitles and I use the upper case version (.SRT) to indicate that I have not been able to find the subtitles for this video in any public database. A zero length .SRT works for this purpose, although I usually use the following .SRT file:
    1
    00:00:00,000 --> 00:00:01,999
    Subtitles not found at open subtitles.com

Feel free to email me (at the address shown on my home page) with any questions or comments you may have about these scripts. Also if you encounter an audio or video file that causes the script to behave inappropriately, I would be grateful if you let me know.


Hits since 13-Jan-2016: