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

Added subtitle support. Fixes#35 #79

Merged
merged 1 commit into from
Aug 30, 2022
Merged

Conversation

abdullah2993
Copy link
Contributor

@abdullah2993 abdullah2993 commented Feb 14, 2021

Added support for subtitle, It works but this might not be the most elegant solution. IMO the best approach should be to find subtitle files based on filename when walking the FS and then only add the subtitle res for objects for which the subtitles were found.
Fixes #35

@abdullah2993 abdullah2993 changed the title Added subtitle support Added subtitle support. Fixes#35 Feb 14, 2021
dlna/dms/dms.go Outdated Show resolved Hide resolved
@anacrolix
Copy link
Owner

Thanks, I've mentioned it in the linked issue to get hopefully get some outside input.

@halfwit
Copy link
Contributor

halfwit commented Jul 23, 2021

You could crawl the directory that the video is in, for a file with a conforming mimetype; we have mimesniff support in the http package. Personally I just remuxed my files to include the subtitles, but it would be great to not have to

@jakima
Copy link

jakima commented Aug 27, 2022

I've downloaded the repo, made the suggested changes in this PR and built it locally on Windows.
Ran it on a folder, that has some movies with external subs and the other are mkvs.

First test was my phone running just plain VLC. It worked flawlessly. External subs were served(?) with their respective videos.

Second test was my "smart" TV running bubbleupnp as VLC has a bug/oversight that it doesn't start scanning unless the device running VLC is explicitly connected to a network instead of being in a network (such as opening a hotspot as is the case with my TV).
Sadly, bubbleupnp couldn't pick up the subtitle file.
Connecting laptop to TV's hotspot because, privacy concerns. Stock OS in TV has lots of things that call home.

I happen to find another program called nano-dlna. It seems to have no problems serving a subtitle file that both VLC and bubbleupnp picked up. Although, in its current state, only a single file could be served.
But, it has an xml template just for subtitle. I think this might be where the problem lies. Though, I could be wrong.

That said, great work. I like this project.

@anacrolix
Copy link
Owner

Thank you @jakima. This project likes you too. I think I'll merge this PR shortly based on your feedback. It's also a very tidy PR.

@anacrolix anacrolix merged commit cf5ba6b into anacrolix:master Aug 30, 2022
@anacrolix
Copy link
Owner

Thanks @jakima and @abdullah2993 .

@enihcam
Copy link

enihcam commented May 1, 2023

I have a domestic-brand TV with a basic DLNA player app by which the subtitles (.srt) file cannot be scanned/detected, even though i renamed the srt filename to exactly the video file name. any suggestions? thanks.

@anacrolix
Copy link
Owner

It's been a while but the first thing that comes to mind is to check the mime type for .srt files on your system.

@enihcam
Copy link

enihcam commented May 2, 2023

It's been a while but the first thing that comes to mind is to check the mime type for .srt files on your system.

thanks but where to config the mime type of .srt?

@abdullah2993
Copy link
Contributor Author

abdullah2993 commented May 2, 2023

It's been a while but the first thing that comes to mind is to check the mime type for .srt files on your system.

Also do try to play the same using vlc on a computer or using mx player on your android phone. Just to rule out any issues related to naming.

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

Successfully merging this pull request may close these issues.

srt file support without transcoding
5 participants