Skip to content
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

add subtitles for video feature #239

Open
caythanhgia opened this issue Sep 9, 2019 · 6 comments · May be fixed by #915
Open

add subtitles for video feature #239

caythanhgia opened this issue Sep 9, 2019 · 6 comments · May be fixed by #915
Labels
1. to develop Accepted and waiting to be taken care of enhancement New feature or request

Comments

@caythanhgia
Copy link

add this code to Videos.vue : template->video support many subtitle
`

	<track
		:src="davPath.replace(/\.[^\.]+$/, '.vi.vtt')"
		label="Vietnamess"
		kind="captions"
		srclang="vi-vn" default />`
@skjnldsv
Copy link
Member

skjnldsv commented Sep 9, 2019

Any files to give me a working example?
Also please use the appropriate issues templates tex time :)

@skjnldsv skjnldsv added 0. Needs triage Pending approval or rejection. This issue is pending approval. enhancement New feature or request labels Sep 9, 2019
@skjnldsv skjnldsv added 1. to develop Accepted and waiting to be taken care of and removed 0. Needs triage Pending approval or rejection. This issue is pending approval. labels Apr 27, 2020
@douzebis
Copy link

Hi @skjnldsv
Indeed captions would be a nice addition to the viewer.
And it seems we could leverage plyr.io support for HTML5 captions to provide the feature at a low cost?
Is there no traction for this?

@douzebis
Copy link

I just tested the patch below.
Does quite a decent job.
I might send a pull request?

diff --git a/src/components/Videos.vue b/src/components/Videos.vue
index 727939b..007c203 100644
--- a/src/components/Videos.vue
+++ b/src/components/Videos.vue
@@ -41,6 +41,17 @@
                                @ended="donePlaying"
                                @canplay="doneLoading"
                                @loadedmetadata="onLoadedMetadata">
+                               <track
+                                       :src="davPath.replace(/\.[^\.]+$/, '.en.vtt')"
+                                       label="English"
+                                       kind="captions"
+                                       srclang="en"
+                                       default />`
+                               <track
+                                       :src="davPath.replace(/\.[^\.]+$/, '.fr.vtt')"
+                                       label="French"
+                                       kind="captions"
+                                       srclang="fr" />`
 
                                <!-- Omitting `type` on purpose because most of the
                                        browsers auto detect the appropriate codec.

@beardhatcode beardhatcode linked a pull request May 23, 2021 that will close this issue
@beardhatcode beardhatcode removed a link to a pull request May 23, 2021
@beardhatcode beardhatcode linked a pull request May 23, 2021 that will close this issue
@skjnldsv skjnldsv linked a pull request May 28, 2021 that will close this issue
@MeowMeowVenom
Copy link

Plyr.io supports only .vtt (its more like HTML5 thing)
https://github.com/maple3142/GDIndex

The above index, has support for .srt files too.

@douzebis
Copy link

Plyr.io supports only .vtt (its more like HTML5 thing)
https://github.com/maple3142/GDIndex

The above index, has support for .srt files too.

Actually, pull request #915 will provide .srt-like support for plyr.io.
It is already working and (I reckon) just lacks unit tests before it can be merged into master.
Unfortunately I have no time at the moment to complete the job :(

@PVince81
Copy link
Member

supporting anything else than vtt files will require to have an endpoint to is able to extract subtitles from the video and expose them as a conversion to vtt.

there might be libraries that do it (I seem to remember a Node JS based one)

maybe the generated vtt file could be cached in appdata like image previews after extracting+generating

@skjnldsv skjnldsv unpinned this issue Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Accepted and waiting to be taken care of enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants