Jump to content

Add support for new subtitle flags like "Hearing impaired"


FrostByte

Recommended Posts

FrostByte

Recently matroska and mkvtoolnix added support for additional subtitle flags including "Hearing impaired" for subtitles for the deaf and hard of hearing (SDH).

Request: Emby add some or all of the additional subtitle flags to

  1. media info and also
  2. as a choice for playback under user user settings.
  3. add support for external SDH subtitle naming (ex. moviename.SDH.eng.srt)

Reason: my wife and are are getting older and it seems more and more I'm hearing "What did they say" a lot.  If I could set certain Emby users to always play the "Hearing impaired" subtitles if available then I wouldn't have to back up and restart playback with SDH subtitles enabled.

Other flags like "Commentary" would be nice also as I have several films with those

Having this flag would also make it easier to run a script to list which movies have and don't have "Hearing impaired"  / SDH subtitles so that I can go out and get the missing ones.

subs2.jpg.a7b39676f2ec63d332d80d87b74dbb11.jpg

 

Edited by FrostByte
  • Like 18
Link to comment
Share on other sites

crusher11

Yes, it would also allow for setting it to prefer SDH subs over dialogue-only subs.

MovieFileName.en.SDH.srt and MovieFileName.en.HoH.srt are both supported elsewhere for text-based subs. MovieFileName.en.HI.srt is as well I think, but that can be ambiguous as it's the language code for Hindi as well as the abbreviation for 'Hearing Impaired'.

And then I could just name my subs that way, instead of having to futz around with MovieFileName.EnglishAlt+255SDH.srt, and Emby would display them properly while also being aware of their language.

 

Edited by crusher11
  • Like 2
Link to comment
Share on other sites

rbjtech

A flag like this could also be used to automatically increase the centre channel dialogue volume - yes this would mean an audio transcode, but it would certainly be welcomed for those who have hearing difficulties. 

I believe this could also double as a 'night time' viewing mode where you get to hear clearly what is being said, but without all the background noise waking everybody else up .. :)

 

  • Like 1
Link to comment
Share on other sites

FrostByte
9 hours ago, crusher11 said:

Yes, it would also allow for setting it to prefer SDH subs over dialogue-only subs.

MovieFileName.en.SDH.srt and MovieFileName.en.HoH.srt are both supported elsewhere for text-based subs. MovieFileName.en.HI.srt is as well I think, but that can be ambiguous as it's the language code for Hindi as well as the abbreviation for 'Hearing Impaired'.

And then I could just name my subs that way, instead of having to futz around with MovieFileName.EnglishAlt+255SDH.srt, and Emby would display them properly while also being aware of their language.

 

Thanks, I added new naming conventions for external subs to the OP

3 hours ago, rbjtech said:

A flag like this could also be used to automatically increase the centre channel dialogue volume - yes this would mean an audio transcode, but it would certainly be welcomed for those who have hearing difficulties. 

I believe this could also double as a 'night time' viewing mode where you get to hear clearly what is being said, but without all the background noise waking everybody else up .. :)

 

Agree, changing your preferred subtitle playback option to SDH subs would be great for when you want to watch something and the volume needs to be really low to not wake anyone.

Link to comment
Share on other sites

  • 1 year later...
Gecko

Hi,

 

After asking softworkz privately about this, I'm opening a feature request about updating the labelling subtitle track system (or whatever this is called in English :))  to include more mkv flags like :

- Hearing Impaired
- Commentary

- Text description

The current system is displaying Default and Forced flags only, which force us to use track name whenever SHD or commentary subtitles are present.
If you also think this is a nice upgrade, Is it easily feasible and could it be planned for a next release ?

 

Thanks,

Gecko

  • Agree 1
Link to comment
Share on other sites

Hi, commentary would be too long but the hearing impaired flag is certainly as possibility

 

  • Thanks 1
Link to comment
Share on other sites

BillOatman

I have a regular English subtitle srt file for a show as well as English SDH (for deaf and hard of hearing) srt file.  The SDH one for those that are not familiar will show sound effects like [Door Slam], show who is speaking [Travis] and so on.  Is there a file name convention I can use that would make both the regular and SDH file selectable in the drop down to be used, both being in English?

Link to comment
Share on other sites

GrimReaper
22 minutes ago, BillOatman said:

Is there a file name convention I can use that would make both the regular and SDH file selectable in the drop down to be used, both being in English

Nope. Lend your support here:

Related thread:

 

  • Like 2
Link to comment
Share on other sites

Happy2Play

From an external srt naming scheme, I am not seeing a way currently.  Assume it would need added similar to how "forced/foreign" is.  @Luke

Currently it will break language.

image.png.d87efe24cf1878ad0e4debcad9b5bc29.png image.png.6b330c9c09edc7345a374a1a02ba77ce.png image.png.29ccaf7f0c411e7ad8da60fb552d58f5.png

Embedded will present the embedded name.  Different file added SDH to Name in MKVToolNix header editor on the srt subtitle track.

image.png.186d11975a77616c5db8f19df3fb1e97.png

 

  • Like 2
Link to comment
Share on other sites

BillOatman
9 minutes ago, GrimReaper said:

Nope. Lend your support here:

 

Done. And @Luke, these SDH srt files are starting to be available more now it seems.

Link to comment
Share on other sites

FrostByte

I'm currently using "moviefilename.English-SDH.srt" for external subtitles and the language displays as "English-SDH" but seems to work and not break the English

 

However, as mentioned above moviefilename.eng.SDH.srt would be preferred.  There is already a flag for internal SDH, Emby just doesn't recognize it.

As someone with a spouse who suffers from hearing loss this request is very important to me and an option to select SDH as a preferred subtitle option would be great.

Edited by FrostByte
  • Like 2
  • Agree 1
Link to comment
Share on other sites

roaku

I really want the commentary flag, personally.

The SDH is obviously important for accessibility reasons.

Iconic will support them once they're available. :)

  • Like 3
Link to comment
Share on other sites

crusher11

I've been using "English SDH", which works. "English SDH" does not. They look identical, so it gets the job done.

Link to comment
Share on other sites

FrostByte
5 hours ago, crusher11 said:

I've been using "English SDH", which works. "English SDH" does not. They look identical, so it gets the job done.

Are you putting some sort of hidden character in the first one?  A space doesn't work.

Link to comment
Share on other sites

BillOatman
11 hours ago, crusher11 said:

I've been using "English SDH", which works. "English SDH" does not. They look identical, so it gets the job done.

Interesting.  So if I have a episode file
My.Little.Pony.S01E01.mkv

And I have a regular subtitle file
2_English.srt

And a SDH subtitle file
3_English.srt

What would I rename the two subtitle files to and get them both to be selectable in Emby?

Link to comment
Share on other sites

FrostByte

2.

My.Little.Pony.S01E01.eng.default.mkv  or My.Little.Pony.S01E01.eng.mkv  depending if you want the default flag set

3.

My.Little.Pony.S01E01.English SDH.mkv      make sure to use Alt+255 for the space between English and SDH.  

 

This only changes the name for selecting.  It won't allow you to make SDH a subtitle setting

 

 

 

Edited by FrostByte
  • Thanks 1
Link to comment
Share on other sites

  • 4 months later...
FrostByte

I got the information for something similar thanks to rbjtech in another thread.  ffprobe can detect the additional flags for internal subtitles

So, I wrote a little script of my own with the following line in it

%ffprobe_path% -v error -hide_banner -of default=noprint_wrappers=0 -print_format flat -select_streams s -show_entries disposition=hearing_impaired %input_file%

and it outputs the following:

streams.stream.0.disposition.hearing_impaired=0
streams.stream.1.disposition.hearing_impaired=1

The second subtitle (stream 1 as it counts from 0) is the one in my mkv which has the hearing-impaired flag and reports back true or 1.

If Emby could store this information in the db and come up with a naming convention for external SDH subs then all we would need is an additional setting to always play SDH for those who want them on all the time.  Otherwise, you can just choose them when you want.

You can also test for all the other flags from the picture above such as commentary, etc which may be helpful to others.

  • Like 5
  • Thanks 1
Link to comment
Share on other sites

FrostByte

To make this even easier for people with hearing issues opensubtitles has a flag for hearing impaired subtitles.  So, if needed the sub downloader could search for SDH subs and place them into the movie folder just like you can do now with forced subs.

 

image.png.22b015debb2cb1c63fecfa2a910b7134.png

  • Like 1
Link to comment
Share on other sites

crusher11
On 9/3/2022 at 6:36 PM, FrostByte said:

I got the information for something similar thanks to rbjtech in another thread.  ffprobe can detect the additional flags for internal subtitles

So, I wrote a little script of my own with the following line in it

%ffprobe_path% -v error -hide_banner -of default=noprint_wrappers=0 -print_format flat -select_streams s -show_entries disposition=hearing_impaired %input_file%

and it outputs the following:

streams.stream.0.disposition.hearing_impaired=0
streams.stream.1.disposition.hearing_impaired=1

The second subtitle (stream 1 as it counts from 0) is the one in my mkv which has the hearing-impaired flag and reports back true or 1.

If Emby could store this information in the db and come up with a naming convention for external SDH subs then all we would need is an additional setting to always play SDH for those who want them on all the time.  Otherwise, you can just choose them when you want.

You can also test for all the other flags from the picture above such as commentary, etc which may be helpful to others.

Assuming they're flagged correctly, which I'm pretty sure none of mine are because I've never heard of this flag before. 

Link to comment
Share on other sites

FrostByte
12 minutes ago, crusher11 said:

Assuming they're flagged correctly, which I'm pretty sure none of mine are because I've never heard of this flag before. 

True, but that's also true for internal forced subs if you don't flag them correctly.  Just another flag you have to set if you want any software to identify them correctly.  Your older stuff you would need to go back and revisit.  I'm sure a script could even be written to search for the word SDH if you were using that in the titles.  Otherwise, it will take some work.

Edited by FrostByte
Link to comment
Share on other sites

FrostByte
42 minutes ago, Spaceboy said:

bazarr sub downloader has had an option to specifically search for and flag SDH subs for quite a while.

What does bazarr use for naming convention on SDH subs?  Is it something like this

  • moviename.eng.sdh.srt   
  • moviename.sdh.eng.srt

That would cover the external subs if Emby recognized them and allowed you to set your subtitle setting to SDH.

Link to comment
Share on other sites

Spaceboy
1 minute ago, FrostByte said:

What does bazarr use for naming convention on SDH subs?  Is it something like this

  • moviename.eng.sdh.srt   
  • moviename.sdh.eng.srt

That would cover the external subs if Emby recognized them and allowed you to set your subtitle setting to SDH.

it would be moviename.en.sdh.srt

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...