-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automatically extract .SRT subtitles from video files when possible #1586
Comments
No way to do this directly with OpenCV on Windows, as the binary shipped with Windows does not expose anything other than the OCV FFMPEG Capture interface code. On Linux we already have avcodec and avformat so we could build something like this https://gist.github.com/pierotofy/12038d4b1674444b1707be880c8ce4c8 to extract the SRT, although it requires more code to be stable and imitate the ffmpeg binary. On Windows we could build a separate binary, but it would still weight a few dozen MB. Including the ffmpeg executable (a minimal build perhaps) might be the way to go. |
hi,I couldn't export the subtitle file with the ffmpeg command you provided, I ended up using the following code |
Some video files (e.g. those made by newer DJI drones) have a textual track optionally saved along with video files. One can extract the corresponding .SRT file via:
It would be nicer if ODM could do this automatically without calling/adding ffmpeg as a dependency, we already compile ffmpeg within OpenCV, so it should be a matter of finding out which routines to call within the compiled ffmpeg library to extract the SRT data.
The text was updated successfully, but these errors were encountered: