Jump to content

Add support for new subtitle flags like "Hearing impaired"


FrostByte

Recommended Posts

crusher11
13 hours ago, FrostByte said:

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.

Yeah, all my internal SDH subs are "SDH (PGSSUB)" as the track title. Externally I've been using moviename.English SDH.srt. A simple bulk rename would take care of that, not sure how to handle the internal subs though. 

Link to comment
Share on other sites

  • 1 year later...

HI, the hearing impaired status for subtitles, both internal and external will be supported in Emby Server 4.8:

image.png

Thanks.

  • Thanks 1
Link to comment
Share on other sites

crusher11

A simple bulk rename will sort this for my external subs, but is there a way to correctly flag all my internal subs? 

Also, is it possible to get support for PSDH? 

Edited by crusher11
Link to comment
Share on other sites

rbjtech
59 minutes ago, crusher11 said:

A simple bulk rename will sort this for my external subs, but is there a way to correctly flag all my internal subs? 

If they are not already tagged as such - then depending on the container, you'll need to use ffmpeg/mkvtoolnix/mkvpropedit/mp4box to add the internal 'flag'.

Depending on the Track 'name' (with the term SDH in it ..) you may be able to automate this using mkvpropedit (if using mkv).  If MP4, then I'm not sure this is possible as you can't just edit headers without remuxing the entire file ..

mkvtoolnix manual example (remux, or use the header option to add the flag=Yes) -

image.png.2ed810aac18ad8bcbb1d6ed81f4a2107.png

If in a script - then you can use mkvpropedit - s1 = first subtitle track, but you could use a script to identify if the subtitle track name contains SDH -

mkvpropedit "input.mkv" --edit track:s1 --set flag-hearing-impaired=1

ffmpeg/ffprobe (what emby uses) will pick it up as a DISPOSITION on that stream - meaning you can write it too, but again, you'll need to remux the file to add it, so if you use mkv, then mkvpropedit is by far the quickest and easiest way.

DISPOSITION:hearing_impaired=1

 

Edited by rbjtech
  • Like 1
Link to comment
Share on other sites

crusher11

Yeah, they're all MKVs and SDH tracks are all named "SDH (PGSSUB)" or "PSDH (PGSSUB)". Just after a way to automate it given I have thousands of files to flag. 

Link to comment
Share on other sites

rbjtech
9 hours ago, crusher11 said:

Yeah, they're all MKVs and SDH tracks are all named "SDH (PGSSUB)" or "PSDH (PGSSUB)". Just after a way to automate it given I have thousands of files to flag. 

In your favorite script/batch,  it's just a case of recursively run though all the files, extract the title of each subtitle track, search for SDH and if found then run the mkvpropedit command line I gave above on that track... :)

Edited by rbjtech
Link to comment
Share on other sites

FrostByte
3 hours ago, rbjtech said:

In your favorite script/batch,  it's just a case of recursively run though all the files, extract the title of each subtitle track, search for SDH and if found then run the mkvpropedit command line I gave above on that track... :)

I wonder if this is something Cheesey could add to one of his plugins.

Link to comment
Share on other sites

rbjtech
34 minutes ago, FrostByte said:

I wonder if this is something Cheesey could add to one of his plugins.

I just wrote it for external subs .. and i could easily add into the MediaInfo plugin as the track title is held in both emby and mediainfo ..

But I'm just playing with .49 beta - which includes the sdh function - but can't get it to recognise filename.en.sdh.srt ... which I thought was the point ... :(

edit - this is what I've tried ..

image.png.014831f5df4a18ab2bbcae0d7f17e20f.png

I was expecting it to list English (SDH SRT) if following the logic that the forced sub shows (correctly) .. ?

image.png.63687a73cd30334783d9aacbd253d884.png

Edited by rbjtech
Link to comment
Share on other sites

FrostByte
7 minutes ago, rbjtech said:

I just wrote it for external subs .. and i could easily add into the MediaInfo plugin as the track title is held in both emby and mediainfo ..

But I'm just playing with .49 beta - which includes the sdh function - but can't get it to recognise filename.en.sdh.srt ... which I thought was the point ... :(

Still waiting for .49 for Syno here.  Then refresh my library which will probably take 3 days :)

mkvpropedit is great though.  Runs quick even over wireless network from PC to my NAS.

 

Link to comment
Share on other sites

rbjtech
3 minutes ago, FrostByte said:

Still waiting for .49 for Syno here.  Then refresh my library which will probably take 3 days :)

mkvpropedit is great though.  Runs quick even over wireless network from PC to my NAS.

 

Just restart emby and it will sync - or just install the 7zip directly from github - that's what i did.

But see above - sdh is not working for me at the moment ..

Edited by rbjtech
Link to comment
Share on other sites

FrostByte
Just now, rbjtech said:

Just restart emby and it will sync - or just install the 7zip directly from github - that's what i did.

But see above - sdh has some 'issues' ... but just working though the detail on what to report back ... 

Great, I'll test it once available.  Unix releases are usually one of the last compiled.

Link to comment
Share on other sites

FrostByte
22 minutes ago, rbjtech said:

I just wrote it for external subs .. and i could easily add into the MediaInfo plugin as the track title is held in both emby and mediainfo ..

But I'm just playing with .49 beta - which includes the sdh function - but can't get it to recognise filename.en.sdh.srt ... which I thought was the point ... :(

edit - this is what I've tried ..

image.png.014831f5df4a18ab2bbcae0d7f17e20f.png

I was expecting it to list English (SDH SRT) if following the logic that the forced sub shows (correctly) .. ?

image.png.63687a73cd30334783d9aacbd253d884.png

So @Lukeneeds to add "SDH SRT" description for external subs like he does "Forced SRT"?

His picture just showed internal which probably got it from the track name.

Link to comment
Share on other sites

rbjtech
1 minute ago, FrostByte said:

So @Lukeneeds to add "SDH SRT" description for external subs like he does "Forced SRT"?

His picture just showed internal which probably got it from the track name.

4.8.0.49-beta Pre-release
Import hearing impaired attribute for both internal and external subtitles
 

?

I'll raise it as an issue on the forum ...

Link to comment
Share on other sites

FrostByte
1 minute ago, rbjtech said:

4.8.0.49-beta Pre-release
Import hearing impaired attribute for both internal and external subtitles
 

?

I'll raise it as an issue on the forum ...

Does it use the right subtitle though if you choose hearing impaired as your preferred subtitle type?  It may just not be displaying the correct name.

I'll jump over to your other thread.  Thanks

  • Like 1
Link to comment
Share on other sites

crusher11
On 9/30/2023 at 2:45 PM, rbjtech said:

In your favorite script/batch,  it's just a case of recursively run though all the files, extract the title of each subtitle track, search for SDH and if found then run the mkvpropedit command line I gave above on that track... :)

That sounds like it would be really simple for someone who knew how to do that.

I, however, have no idea.

Link to comment
Share on other sites

rbjtech
29 minutes ago, crusher11 said:

How does this interact with track titles for embedded subs? 

same as external - but will need the HI Flag set.

edit

I've added to the MediaInfo Plugin yesterday - it searches for the string 'sdh' (any case) in the subtitle track title (in the mkv) and if found - then it will flag the mkv track as HI and you also have the option to remove the track name (as you now have the flag).   I note however, that Luke has chosen to use the term 'Hearing Impaired' rather than the term SDH - so having both displayed may no longer be an issue (ie shows the track name and emby derrived name) - the track name removal is optional anyway.

Just testing it atm, but when it's all good - I'll release on the mediainfo plugin thread.

Edited by rbjtech
  • Like 1
Link to comment
Share on other sites

crusher11

Mine are all named either "SDH (PGSSUB)" or "SDH (VOBSUB)" as appropriate, so the format is in there matching the way Emby presents tracks with no title present.

So right now, if I flag them all it'll display "SDH (PGSSUB) (Hearing Impaired PGSSUB)"? 

Link to comment
Share on other sites

FrostByte

I believe .50/51 added naming for SDH subtitles.  Still not there for Synology though.

 

Also, hoping Luke added the ability to set the subtitle mode to HI. 

Link to comment
Share on other sites

FrostByte
12 minutes ago, crusher11 said:

Mine are all named either "SDH (PGSSUB)" or "SDH (VOBSUB)" as appropriate, so the format is in there matching the way Emby presents tracks with no title present.

So right now, if I flag them all it'll display "SDH (PGSSUB) (Hearing Impaired PGSSUB)"? 

Are you using embedded names, or Emby's friendly naming?

Link to comment
Share on other sites

FrostByte

You shouldn't see any difference if using embedded names then.  The changes should only affect Emby friendly naming which uses two lines for subtile naming.

I'm still waiting for .51 though to verify.

Link to comment
Share on other sites

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