0

So, I have a folder with a lot of videos. What I need is to create subtitles with the names of those videos also minding their size and length to create subtitles in .srt format. And length of videos should be parsed in such format:

00:00:00,000 => hh:mm:ss:milliseconds

So for example I have three videos in the folder:

1) firstvideo.wmv  size:5743KB length: 00:05:34,793
2) secondvideo.mp4 size:3215KB length: 00:02:42,653
3) thirdvideo.avi  size:3950KB length: 00:01:55,152

I need them to be sorted by size in .srt file with the precise timing one after another (also to remove video format in subtitles). Output file should in .srt format and should look like this:

1
00:00:0,000 --> 00:02:42,653
secondvideo

2
00:02:42,653 --> 00:04:37,805
thirdvideo

3
00:04:37,805 --> 00:10:12,598
firstvideo

(Important => After every time an action is completed there should be an empty line like in the example)

Thanks For Your Attention! Please, Help! :)

  • What is your "File part seperator" ? Smart choice : Use first line of document for reporting parts of `subtitles`. Like this(document firstline):`$begin$#1-1100!my-best.avi#2000-3200!oh_my_good.avi#1101-1999!hello.avi$end$`. But how ? Here: http://stackoverflow.com/questions/15644859/how-to-read-specific-part-of-large-file-in-python – dsgdfg Jan 30 '16 at 09:38
  • Well, to be honest I don't know much in coding at all, just some surface knowledge... I've already asked for help, and one kind person helped me out with VBScript but the problem is it only sees length of video within one second, not very precise. [Here is the link to that question](http://stackoverflow.com/questions/34472943/making-batch-file-code-with-vbscript-to-work-with-unicode-symbols) –  Jan 30 '16 at 17:37
  • If you have `ffmpeg` you could scrape the duration from `ffmpeg -i "mediafile.ext" 2>&1 | find "Duration:"`. That will give you centisecond precision. – rojo Feb 05 '16 at 04:36

0 Answers0