I need to find the start date of some video files on my hard drive. Date modified, or filename, etc won't help me - the true start time is in the closed captions.
Using CCExtractor and some Python Popen...
import subprocess
process = subprocess.Popen(['ccextractorwin.exe', 'mycaptions.srt', '-quiet',
'myvideo.mpg'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
out, err = process.communicate()
This generates a closed captions .srt file and what I want is definitely there:
1
00:00:00,000 --> 00:00:06,772
4756.9585N, 12905.8976W, 1885
2013-06-20 16:50:29, Hdg: 54
2
00:00:06,774 --> 00:00:07,373
2013-06-20 16:50:29, Hdg: 54
4756.9585N, 12905.8976W, 1883
...
But the problem is that these video files are hundreds of GB, and CCExtractor generates the entire captions file. All I need is the start time, which is in the first entry.
Is there an obscure undocumented option on CCExtractor or perhaps another (free) tool that will allow me to just get the first entry?
The only alternative I can think of is to start CCExtractor, spawn a thread to read the captions file that's being generated, and then kill the CCExtractor process and the read thread. Not too bad, but I want to see if there's a better way out there first.