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

Embedded subtitles #1

Open
mauriciogior opened this issue Sep 14, 2017 · 7 comments
Open

Embedded subtitles #1

mauriciogior opened this issue Sep 14, 2017 · 7 comments

Comments

@mauriciogior
Copy link

Will embedded subtitles be available in the future? (mkv container).

@EldinZenderink
Copy link
Owner

Probably not, unless i create like a decoder in webassembly or something (which im not sure if thats even possible, if it is... its probably out of my league)

@mauriciogior
Copy link
Author

Oh, I watched your video (https://www.youtube.com/watch?v=ajwqUHIWbqM) and though it was embedded, correct me if I'm wrong.

Thanks.

@EldinZenderink
Copy link
Owner

EldinZenderink commented Sep 14, 2017

Oh sorry, i interperted your question wrong... yes they are embedded... only the way i did it is horribly inefficient and doesn't allow seeking. I basically load the video file twice, one for the normal html5 video playback, and the other i read peaces of it (to get the subtitle wich seems to be spread across the whole mkv file , which is the reason why i cant retreive a full subtitle file from a partial mkv file and html5 doesnt allow me to look at the raw bitstream while playing) while the first one is playing (those are the requests you see at the right side of the video). Problem is... videos with variable bitrate makes it sometimes go out of sync. Besides that... it puts a huge strain on the server and bandwith (basically > twice the bandwidth when parsing the subtitle) ... and there is a latency issue.... in the video i did all this locally hence it somewhat worked out. Thats why i wouldn't recommend using it. I just noticed that i never mentioned it in the readme xD. I already implemented it in the current version here on github. Instead of the method setSubtitle(url) you need to use parseSubtitle() .Oh well, i hope that i informed you enough with this wall of text x). (Ps... typing on a phone is pain .... ^^)

@mauriciogior
Copy link
Author

Thanks!
Btw, I'm building an app to watch animes like popcorn time. It currently uses two sources, one with all videos in http protocol with subtitles rendered within the video and other source that loads videos from magnet links, creates a stream from it and plays on a regular html5 video player. The problem is that the source with magnet links has videos with embedded subtitles, non-rendered within the video, so I need to extract the track on the fly while the video is streaming. (ps: the same streaming link, when opened on VLC, the subtitles work just fine).

link: https://github.com/mauriciogior/anime-flix

@EldinZenderink
Copy link
Owner

Nice, i once had the exact same idea, but i wanted to use xdcc / irc for it :) hence i started this library, i managed to get this far until i lost my motivation: https://youtu.be/ZD6BYFVe8dk . Its really buggy tho ^^. but what you want just isn't quit possible yet :( . Good luck with yours!

@EldinZenderink
Copy link
Owner

Guess what I have been doing lately ;)

https://youtu.be/mEdKz3Kddho

Im able to parse subtitles from the video file including time stamps, which now enables seeking.

I still need to double request the file from the server (one for the player, one for the subtitleparser), and it's still missing some subtitles, but I am getting closer and closer to make this work ;).

Though, you probably moved on, as I've seen you haven't made a commit to your project since you've posted this.

^^

@iptvsmartws
Copy link

does this still working ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants