Video file to subtitles file

Chris Angelico rosuav at gmail.com
Fri Aug 28 13:29:02 EDT 2020


On Sat, Aug 29, 2020 at 3:24 AM Barry <barry at barrys-emacs.org> wrote:
>
>
>
> > On 28 Aug 2020, at 17:37, Muskan Sanghai <muskansanghai at gmail.com> wrote:
> >
> > On Friday, August 28, 2020 at 12:27:25 AM UTC+5:30, Barry Scott wrote:
> >>>> On 27 Aug 2020, at 18:00, Muskan Sanghai <muskan... at gmail.com> wrote:
> >>>
> >>> I would be really thankful if someone can suggest me how can I generate subtitles file (srt format) from a video or audio without using Google cloud and AWS.
> >> What do you know about how subtitles work with video? Do you mean you want to extract the bitmap subtitle data from a MPEG video?
> >>
> >> Barry
> >>
> >>
> >>
> >>> --
> >>> https://mail.python.org/mailman/listinfo/python-list
> >>>
> >
> > Thank you Barry for your reply,
> > I just know the basics and I want to extract subtitles from a MPEG video and then put the subtitles in that same video. Subtitles can be of any format but it should be convenient for the entire procedure.
>
> It seems you are looking for an App to do this work?
> I searched the web and saw this.
>
> https://www.openshot.org/
>
> I have not used this app, maybe it’s a starting point for you.
>
> Barry
>

Not familiar with Openshot, but it's worth looking into.
Alternatively, I'd definitely recommend ffmpeg for anything like this
sort of job. But if you actually need to OCR something, then you may
need to do some scripting work. I don't have code to offer you, but it
would involve FFMPEG to lift the images, something like Tesseract to
do the actual OCRing, and then you'd write the rest of it yourself in
Python.

Other than that, this probably is something best done with a dedicated
movie editing tool, not Python. Use what exists.

ChrisA


More information about the Python-list mailing list