Re: Video file to subtitles file

2020-08-31 Thread Betty Hollinshead
ffmpeg mentioned elsewhere is the goto toolkit for all things video.
Subtitles, see: https://trac.ffmpeg.org/wiki/ExtractSubtitles

B.

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Video file to subtitles file

2020-08-31 Thread Chris Angelico
On Mon, Aug 31, 2020 at 3:36 PM Christian Gollwitzer  wrote:
>
> Am 30.08.20 um 21:43 schrieb MRAB:
> > On 2020-08-30 18:10, Christian Gollwitzer wrote:
> >> Well, with enough effort it is possible to build a system that is more
> >> useful than "entertaining". Google did that, English youtube videos can
> >> be annotated with subtitles from speech recognition. For example, try
> >> this video:
> >> https://www.youtube.com/watch?v=lYVLpC_8SQE
> >>
> >>
> > There's not much background noise there; it takes place in a quiet room.
>
>   It becomes a bit worse once the background music sets in, but still is
> usable. Feel free to try any other video. I think, it works with any
> video in English.
>
> I think that for "Hollywood"-style movies you will always have a crisp
> sound of the speech. They want the viewers to listen effortlessly -
> background music is typical, "true" noise is rare.
>
> Maybe try with this video:
> https://www.youtube.com/watch?v=nHn4XpKA6vM
>
> As soon as they are up in the air you have the engine sound overlaying
> the speech, and still the transcription is quite good. It sometimes
> mistakes the flapping of the engine as "applause" and misses a word or a
> sentence, but still very good.
>

But remember, the OP specifically does NOT want to use Google or
Amazon services for this. What you're showcasing here has been trained
on the gigantic corpus of Youtube videos, and that's simply not going
to be practical to recreate. When I said the results were
"entertaining", I was talking about what CMU Sphinx is capable of
without any assistance (and also what I've seen from numerous
real-time captioning tools across the internet). Sometimes it's
reasonable... sometimes it just isn't.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Video file to subtitles file

2020-08-30 Thread Christian Gollwitzer

Am 30.08.20 um 21:43 schrieb MRAB:

On 2020-08-30 18:10, Christian Gollwitzer wrote:

Well, with enough effort it is possible to build a system that is more
useful than "entertaining". Google did that, English youtube videos can
be annotated with subtitles from speech recognition. For example, try
this video:
https://www.youtube.com/watch?v=lYVLpC_8SQE



There's not much background noise there; it takes place in a quiet room.


 It becomes a bit worse once the background music sets in, but still is 
usable. Feel free to try any other video. I think, it works with any 
video in English.


I think that for "Hollywood"-style movies you will always have a crisp 
sound of the speech. They want the viewers to listen effortlessly - 
background music is typical, "true" noise is rare.


Maybe try with this video:
https://www.youtube.com/watch?v=nHn4XpKA6vM

As soon as they are up in the air you have the engine sound overlaying 
the speech, and still the transcription is quite good. It sometimes 
mistakes the flapping of the engine as "applause" and misses a word or a 
sentence, but still very good.


Christian
--
https://mail.python.org/mailman/listinfo/python-list


Re: Video file to subtitles file

2020-08-30 Thread MRAB

On 2020-08-30 18:10, Christian Gollwitzer wrote:

Am 30.08.20 um 17:25 schrieb MRAB:

On 2020-08-30 07:23, Muskan Sanghai wrote:

On Sunday, August 30, 2020 at 11:46:15 AM UTC+5:30, Chris Angelico wrote:

I recommend looking into CMU Sphinx then. I've used that from Python.
The results are highly entertaining.
ChrisA

Okay I will try it, thank you.

Speech recognition works best when there's a single voice, speaking 
clearly, with little or no background noise. Movies tend not to be like 
that.


Which is why the results are "highly entertaining"...



Well, with enough effort it is possible to build a system that is more
useful than "entertaining". Google did that, English youtube videos can
be annotated with subtitles from speech recognition. For example, try
this video:
https://www.youtube.com/watch?v=lYVLpC_8SQE

Go to the settings thing (the little gear icon in the nav bar) and
switch on subtitles, English autogenerated. You'll see a word-by-word
transcription of the text, and most of it is accurate.


There's not much background noise there; it takes place in a quiet room.


There are strong arguments that anything one can build with open source
tools will be inferior. 1) They'll probably have a bunch of highly
qualified KI experts working on this thing 2) They have an enormous
corpus of training data. Many videos already have user-provided
subtitles. They can feed all of this into the training.

I'm waiting to be disproven on this point ;)


--
https://mail.python.org/mailman/listinfo/python-list


Re: Video file to subtitles file

2020-08-30 Thread Chris Angelico
On Mon, Aug 31, 2020 at 3:16 AM Christian Gollwitzer  wrote:
>
> Am 30.08.20 um 17:25 schrieb MRAB:
> > On 2020-08-30 07:23, Muskan Sanghai wrote:
> >> On Sunday, August 30, 2020 at 11:46:15 AM UTC+5:30, Chris Angelico wrote:
> >>> I recommend looking into CMU Sphinx then. I've used that from Python.
> >>> The results are highly entertaining.
> >>> ChrisA
> >> Okay I will try it, thank you.
> >>
> > Speech recognition works best when there's a single voice, speaking
> > clearly, with little or no background noise. Movies tend not to be like
> > that.
> >
> > Which is why the results are "highly entertaining"...
>
>
> Well, with enough effort it is possible to build a system that is more
> useful than "entertaining". Google did that, English youtube videos can
> be annotated with subtitles from speech recognition. For example, try
> this video:
> https://www.youtube.com/watch?v=lYVLpC_8SQE
>
> Go to the settings thing (the little gear icon in the nav bar) and
> switch on subtitles, English autogenerated. You'll see a word-by-word
> transcription of the text, and most of it is accurate.
>
> There are strong arguments that anything one can build with open source
> tools will be inferior. 1) They'll probably have a bunch of highly
> qualified KI experts working on this thing 2) They have an enormous
> corpus of training data. Many videos already have user-provided
> subtitles. They can feed all of this into the training.
>
> I'm waiting to be disproven on this point ;)
>

The OP doesn't want to use Google's services for this. That doesn't
disprove your point, but... :)

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Video file to subtitles file

2020-08-30 Thread Christian Gollwitzer

Am 30.08.20 um 17:25 schrieb MRAB:

On 2020-08-30 07:23, Muskan Sanghai wrote:

On Sunday, August 30, 2020 at 11:46:15 AM UTC+5:30, Chris Angelico wrote:

I recommend looking into CMU Sphinx then. I've used that from Python.
The results are highly entertaining.
ChrisA

Okay I will try it, thank you.

Speech recognition works best when there's a single voice, speaking 
clearly, with little or no background noise. Movies tend not to be like 
that.


Which is why the results are "highly entertaining"...



Well, with enough effort it is possible to build a system that is more 
useful than "entertaining". Google did that, English youtube videos can 
be annotated with subtitles from speech recognition. For example, try 
this video:

https://www.youtube.com/watch?v=lYVLpC_8SQE

Go to the settings thing (the little gear icon in the nav bar) and 
switch on subtitles, English autogenerated. You'll see a word-by-word 
transcription of the text, and most of it is accurate.


There are strong arguments that anything one can build with open source 
tools will be inferior. 1) They'll probably have a bunch of highly 
qualified KI experts working on this thing 2) They have an enormous 
corpus of training data. Many videos already have user-provided 
subtitles. They can feed all of this into the training.


I'm waiting to be disproven on this point ;)

Christian
--
https://mail.python.org/mailman/listinfo/python-list


Re: Video file to subtitles file

2020-08-30 Thread MRAB

On 2020-08-30 07:23, Muskan Sanghai wrote:

On Sunday, August 30, 2020 at 11:46:15 AM UTC+5:30, Chris Angelico wrote:
On Sun, Aug 30, 2020 at 4:11 PM Muskan Sanghai  wrote: 
> 
> On Sunday, August 30, 2020 at 10:57:00 AM UTC+5:30, Christian Gollwitzer wrote: 
> > Am 29.08.20 um 13:51 schrieb Muskan Sanghai: 
> > > I want to extract subtitles from a MPEG video (which does not have any previous subtitles) 
> > I'm still not sure I get it. "Extract" subtitles, when they are NOT 
> > there? Can it be, by any chance, that you are talking about speech 
> > recognition? I.e., you want a software which understands the spoken word 
> > in the movie sound and turns that into text, which can be shown as 
> > subtitles? Like the "auto-generated" subtitles which youtube offers for 
> > some videos. 
> > 
> > If so, it is a complex task and will not work overly well. I defer to 
> > the experts if there are any usable speech recognitino engines for this 
> > task. 
> > 
> > Christian 
> Yes, this is what I exactly want to do. I want to create a software which understands the spoken word in the movie sound and turns that into text. 
>
I recommend looking into CMU Sphinx then. I've used that from Python. 

The results are highly entertaining. 


ChrisA

Okay I will try it, thank you.

Speech recognition works best when there's a single voice, speaking 
clearly, with little or no background noise. Movies tend not to be like 
that.


Which is why the results are "highly entertaining"...
--
https://mail.python.org/mailman/listinfo/python-list


Re: Video file to subtitles file

2020-08-30 Thread Muskan Sanghai
On Sunday, August 30, 2020 at 11:46:15 AM UTC+5:30, Chris Angelico wrote:
> On Sun, Aug 30, 2020 at 4:11 PM Muskan Sanghai  wrote: 
> > 
> > On Sunday, August 30, 2020 at 10:57:00 AM UTC+5:30, Christian Gollwitzer 
> > wrote: 
> > > Am 29.08.20 um 13:51 schrieb Muskan Sanghai: 
> > > > I want to extract subtitles from a MPEG video (which does not have any 
> > > > previous subtitles) 
> > > I'm still not sure I get it. "Extract" subtitles, when they are NOT 
> > > there? Can it be, by any chance, that you are talking about speech 
> > > recognition? I.e., you want a software which understands the spoken word 
> > > in the movie sound and turns that into text, which can be shown as 
> > > subtitles? Like the "auto-generated" subtitles which youtube offers for 
> > > some videos. 
> > > 
> > > If so, it is a complex task and will not work overly well. I defer to 
> > > the experts if there are any usable speech recognitino engines for this 
> > > task. 
> > > 
> > > Christian 
> > Yes, this is what I exactly want to do. I want to create a software which 
> > understands the spoken word in the movie sound and turns that into text. 
> >
> I recommend looking into CMU Sphinx then. I've used that from Python. 
> 
> The results are highly entertaining. 
> 
> ChrisA
Okay I will try it, thank you.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Video file to subtitles file

2020-08-30 Thread Chris Angelico
On Sun, Aug 30, 2020 at 4:11 PM Muskan Sanghai  wrote:
>
> On Sunday, August 30, 2020 at 10:57:00 AM UTC+5:30, Christian Gollwitzer 
> wrote:
> > Am 29.08.20 um 13:51 schrieb Muskan Sanghai:
> > > I want to extract subtitles from a MPEG video (which does not have any 
> > > previous subtitles)
> > I'm still not sure I get it. "Extract" subtitles, when they are NOT
> > there? Can it be, by any chance, that you are talking about speech
> > recognition? I.e., you want a software which understands the spoken word
> > in the movie sound and turns that into text, which can be shown as
> > subtitles? Like the "auto-generated" subtitles which youtube offers for
> > some videos.
> >
> > If so, it is a complex task and will not work overly well. I defer to
> > the experts if there are any usable speech recognitino engines for this
> > task.
> >
> > Christian
> Yes, this is what I exactly want to do. I want to create a software which 
> understands the spoken word in the movie sound and turns that into text.
>

I recommend looking into CMU Sphinx then. I've used that from Python.

The results are highly entertaining.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Video file to subtitles file

2020-08-30 Thread Muskan Sanghai
On Sunday, August 30, 2020 at 10:57:00 AM UTC+5:30, Christian Gollwitzer wrote:
> Am 29.08.20 um 13:51 schrieb Muskan Sanghai:
> > I want to extract subtitles from a MPEG video (which does not have any 
> > previous subtitles)
> I'm still not sure I get it. "Extract" subtitles, when they are NOT 
> there? Can it be, by any chance, that you are talking about speech 
> recognition? I.e., you want a software which understands the spoken word 
> in the movie sound and turns that into text, which can be shown as 
> subtitles? Like the "auto-generated" subtitles which youtube offers for 
> some videos. 
> 
> If so, it is a complex task and will not work overly well. I defer to 
> the experts if there are any usable speech recognitino engines for this 
> task. 
> 
> Christian
Yes, this is what I exactly want to do. I want to create a software which 
understands the spoken word in the movie sound and turns that into text.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Video file to subtitles file

2020-08-29 Thread Christian Gollwitzer

Am 29.08.20 um 13:51 schrieb Muskan Sanghai:

I want to extract subtitles from a MPEG video (which does not have any previous 
subtitles)


I'm still not sure I get it. "Extract" subtitles, when they are NOT 
there? Can it be, by any chance, that you are talking about speech 
recognition? I.e., you want a software which understands the spoken word 
in the movie sound and turns that into text, which can be shown as 
subtitles? Like the "auto-generated" subtitles which youtube offers for 
some videos.


If so, it is a complex task and will not work overly well. I defer to 
the experts if there are any usable speech recognitino engines for this 
task.


Christian
--
https://mail.python.org/mailman/listinfo/python-list


Aw: Re: Video file to subtitles file

2020-08-29 Thread Karsten Hilbert
> I want to extract subtitles from a MPEG video (which does not have any 
> previous subtitles) and then add them to the same video .

I am not sure I parse the above: You want to *extract* subtitles
from a video which *does not have* subtitles ?

I have a feeling you will need to rephrase your objective
to get better help.

Karsten

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Video file to subtitles file

2020-08-29 Thread Chris Angelico
On Sat, Aug 29, 2020 at 11:15 PM Barry Scott  wrote:
> > On 29 Aug 2020, at 12:51, Muskan Sanghai  wrote:
> > On Friday, August 28, 2020 at 10:59:29 PM UTC+5:30, Chris Angelico wrote:
> >> 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
> > I want to extract subtitles from a MPEG video (which does not have any 
> > previous subtitles)
>
> If it has no subtitles there is nothing to extract?
>
> I recall that in MPEG subtitles are RLE encoded bitmaps with timing and 
> position data.
> Which allows the player to show this bitmap at position X, Y starting at T0 
> and remove at t1 etc.
> You have to track multiple subtitles at the same time.
>
> You should be able to extract the subtitle bit maps and timing data with 
> modest work.
> You could use OCR technology to turn the subtitles into text.

That's what I was thinking of. I have a separate project that involves
grabbing image frames from the subtitles track, running them through
Tesseract (for OCR), and attempting to intelligently parse two
concurrent tracks of subtitles. Probably more complicated than needed
here though.

I don't understand the OP's request though. Extract subtitles when
there aren't any?

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Video file to subtitles file

2020-08-29 Thread Muskan Sanghai
On Saturday, August 29, 2020 at 6:44:34 PM UTC+5:30, Barry Scott wrote:
> > On 29 Aug 2020, at 12:51, Muskan Sanghai  wrote: 
> > 
> > On Friday, August 28, 2020 at 10:59:29 PM UTC+5:30, Chris Angelico wrote:
> >> On Sat, Aug 29, 2020 at 3:24 AM Barry  >> > wrote: 
> >>> 
> >>> 
> >>> 
>  On 28 Aug 2020, at 17:37, Muskan Sanghai  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  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 
> > I want to extract subtitles from a MPEG video (which does not have any 
> > previous subtitles)
> If it has no subtitles there is nothing to extract?
> > and then add them to the same video . 
> > So is it possible to do it with some scripting. Actually I tried to find 
> > the same features in FFMPEG but couldn't.
> ffmpreg I doubt has the APIs you need for this. 
> 
> Have a look at GStreamer, which has pytohn APIs. I know it can handle 
> subtitles because the company 
> I used to work for paid for subtitle support to be added to GStreamer for a 
> product 
> I worked on a few years ago. 
> 
> I recall that in MPEG subtitles are RLE encoded bitmaps with timing and 
> position data. 
> Which allows the player to show this bitmap at position X, Y starting at T0 
> and remove at t1 etc. 
> You have to track multiple subtitles at the same time. 
> 
> You should be able to extract the subtitle bit maps and timing data with 
> modest work. 
> You could use OCR technology to turn the subtitles into text. 
> 
> Barry 
> 
> 
> > -- 
> > https://mail.python.org/mailman/listinfo/python-list 
> > 
Actually the video is in MP4 format and does not have subtitles in it. But I 
will surely try to use GStreamer as you have suggested.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Video file to subtitles file

2020-08-29 Thread Barry Scott


> On 29 Aug 2020, at 12:51, Muskan Sanghai  wrote:
> 
> On Friday, August 28, 2020 at 10:59:29 PM UTC+5:30, Chris Angelico wrote:
>> On Sat, Aug 29, 2020 at 3:24 AM Barry > > wrote: 
>>> 
>>> 
>>> 
 On 28 Aug 2020, at 17:37, Muskan Sanghai  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  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
> I want to extract subtitles from a MPEG video (which does not have any 
> previous subtitles)

If it has no subtitles there is nothing to extract?

> and then add them to the same video .
> So is it possible to do it with some scripting. Actually I tried to find the 
> same features in FFMPEG but couldn't.

ffmpreg I doubt has the APIs you need for this.

Have a look at GStreamer, which has pytohn APIs. I know it can handle subtitles 
because the company
I used to work for paid for subtitle support to be added to GStreamer for a 
product
I worked on a few years ago.

I recall that in MPEG subtitles are RLE encoded bitmaps with timing and 
position data.
Which allows the player to show this bitmap at position X, Y starting at T0 and 
remove at t1 etc.
You have to track multiple subtitles at the same time.

You should be able to extract the subtitle bit maps and timing data with modest 
work.
You could use OCR technology to turn the subtitles into text.

Barry


> -- 
> https://mail.python.org/mailman/listinfo/python-list 
> 
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Video file to subtitles file

2020-08-29 Thread Muskan Sanghai
On Friday, August 28, 2020 at 10:59:29 PM UTC+5:30, Chris Angelico wrote:
> On Sat, Aug 29, 2020 at 3:24 AM Barry  wrote: 
> > 
> > 
> > 
> > > On 28 Aug 2020, at 17:37, Muskan Sanghai  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  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
I want to extract subtitles from a MPEG video (which does not have any previous 
subtitles) and then add them to the same video . So is it possible to do it 
with some scripting. Actually I tried to find the same features in FFMPEG but 
couldn't.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Video file to subtitles file

2020-08-29 Thread Muskan Sanghai
On Friday, August 28, 2020 at 10:52:57 PM UTC+5:30, Barry wrote:
> > On 28 Aug 2020, at 17:37, Muskan Sanghai  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  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 
> 
> > -- 
> > https://mail.python.org/mailman/listinfo/python-list 
> >
I actually want to create an app or website which can do this.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Video file to subtitles file

2020-08-28 Thread Chris Angelico
On Sat, Aug 29, 2020 at 3:24 AM Barry  wrote:
>
>
>
> > On 28 Aug 2020, at 17:37, Muskan Sanghai  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  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
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Video file to subtitles file

2020-08-28 Thread Barry


> On 28 Aug 2020, at 17:37, Muskan Sanghai  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  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

> -- 
> https://mail.python.org/mailman/listinfo/python-list
> 
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Video file to subtitles file

2020-08-28 Thread Muskan Sanghai
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  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.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Video file to subtitles file

2020-08-27 Thread Barry Scott



> On 27 Aug 2020, at 18:00, Muskan Sanghai  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
> 

-- 
https://mail.python.org/mailman/listinfo/python-list