Subtitles - either comply with or ignore HTML tags

Moderators: Gully, peteru

Post Reply
glen
Guru
Posts: 583
Joined: Mon May 28, 2007 22:34

Subtitles - either comply with or ignore HTML tags

Post by glen » Wed Mar 25, 2020 12:29

Hi

When I play a file with subtitle on some files I get HTML tags displayed, see the attached picture.

Can these tags either be complied with or otherwise ignored and not displayed please.

I have ripped the .srt file (as a .txt files, the forum will allow attaching .srt files) off the video file using FFmpeg Batch A/V and also attached it.

I assume that the root cause is something wrong with the subtitle file but fixing that for every file is a pain and time consuming so if the Beyonwiz could either obey the HTML tags or not display them then that would be great, I don't have a preference either way.

I am on firmware 19.3.20191106.

Regards Glen
Attachments
Louis_Theroux_Miami_Mega-Jail_-_01._Part_1.srt.txt
(129.6 KiB) Downloaded 54 times
4097_0_0_0_0_0_0_0_0_0_20200325132018.jpg
4097_0_0_0_0_0_0_0_0_0_20200325132018.jpg (99.78 KiB) Viewed 2803 times

User avatar
netmask
Wizard
Posts: 3658
Joined: Sun Aug 05, 2007 15:20
Location: Inner West, Sydney, Australia

Re: Subtitles - either comply with or ignore HTML tags

Post by netmask » Wed Mar 25, 2020 15:52

To get rid of the colour tags or indeed all tags, a number of subtitle programs will do it quickly. In Subtitle Workshop, load subtitle, click on EDIT Select All then anywhere in the subtitle window, right click and select Remove color tags or Remove all tags. There is a batch mode to do this but haven't had any reason to use it..
BeyonWiz T3 and V2
LED TV SONY Bravia 75" Local dimming ~ Retired Samsung ES8000 65" ~
Yamaha A1070 amp
Zidoo UHD3000
Qnap TS851-4G
Pioneer Bluray BDP-150-K
Windows 11 Professional
Netgear R7000
Chromecast

User avatar
adoxa
Wizard
Posts: 1490
Joined: Thu Feb 23, 2017 22:58
Location: CQ
Contact:

Re: Subtitles - either comply with or ignore HTML tags

Post by adoxa » Wed Mar 25, 2020 16:10

I don't know where those semicolons are coming from seen in your screenshot, they're not in the file you attached. I renamed it to work with an MP4 and they displayed fine.

glen
Guru
Posts: 583
Joined: Mon May 28, 2007 22:34

Re: Subtitles - either comply with or ignore HTML tags

Post by glen » Wed Mar 25, 2020 16:19

adoxa wrote:
Wed Mar 25, 2020 16:10
I don't know where those semicolons are coming from seen in your screenshot, they're not in the file you attached. I renamed it to work with an MP4 and they displayed fine.
It is possible they exist in the video file but were not extracted into the .srt files when I did the extraction with FFmpeg Batch A/V. I really don't know unfortunately.

It is interesting that they only appear after the < and > characters on the Beyonwiz.

When I play the file in Windows Films & TV app the semicolins do not show, see below. Which I guess kind of implies that the semicolons are being inserted by the the Beyonwiz.
Attachments
Annotation 2020-03-25 171711.jpg

User avatar
adoxa
Wizard
Posts: 1490
Joined: Thu Feb 23, 2017 22:58
Location: CQ
Contact:

Re: Subtitles - either comply with or ignore HTML tags

Post by adoxa » Wed Mar 25, 2020 16:29

I believe external subtitles have precedence, so you could just play with the .srt file available and work around it that way. Would you be able to use FFmpeg to get the first 20 seconds or so, check the problem still occurs and post the video (or email it to me, if you'd rather, find my address from my profile and website)?

glen
Guru
Posts: 583
Joined: Mon May 28, 2007 22:34

Re: Subtitles - either comply with or ignore HTML tags

Post by glen » Wed Mar 25, 2020 16:38

I cut the first 5 seconds, anything more and the file is too big. Also I don't know what length of a copyright work we can post before hitting forum rules, hopefully 5 seconds will not cause any concerns.

The problem still shows up on the Beyonwiz with this 5 sec file.

Again I had to rename it as a txt file.

Edit
Sorry for some reason I can't attach the file, will investigate some more.

Edit 2
I have emailed the file. Thank you for taking an interest in this issue.

User avatar
adoxa
Wizard
Posts: 1490
Joined: Thu Feb 23, 2017 22:58
Location: CQ
Contact:

Re: Subtitles - either comply with or ignore HTML tags

Post by adoxa » Wed Mar 25, 2020 17:58

Looks like GStreamer (the video player) is interpreting the subtitles as raw text, hence the tags. Why it's adding the semicolons is a mystery, though; the Windows version doesn't. (Zoom Player works fine, although I didn't test if it honored or ignored them.) I tried using mkvpropedit to change the codec, but that just removed the subtitles altogether. I think the simplest solution at this stage is to rip them and use the .srt file directly, as that does override the internal subtitles and complies with the tags. Just ensure it's named the same as the video (video.mkv will want video.srt) and it will be used automatically.

glen
Guru
Posts: 583
Joined: Mon May 28, 2007 22:34

Re: Subtitles - either comply with or ignore HTML tags

Post by glen » Wed Mar 25, 2020 18:38

Drat, if the problem is GStreamer then Beyonwiz can't fix it. I guess I will need to live with it then.

Thanks for investigating.

Regards Glen

User avatar
netmask
Wizard
Posts: 3658
Joined: Sun Aug 05, 2007 15:20
Location: Inner West, Sydney, Australia

Re: Subtitles - either comply with or ignore HTML tags

Post by netmask » Wed Mar 25, 2020 19:48

examplesub.JPG
examplesub.JPG (91.9 KiB) Viewed 2745 times
I download you example and fixed it in Subtitle workshop
Louis_Theroux_Miami_Mega-Jail_-_01._Part_1.srt.txt
(129.6 KiB) Downloaded 58 times
So in theory if you have the fixed sub file as a separate external file, it should take precedence in playback.
examplesub.JPG
examplesub.JPG (91.9 KiB) Viewed 2745 times
BeyonWiz T3 and V2
LED TV SONY Bravia 75" Local dimming ~ Retired Samsung ES8000 65" ~
Yamaha A1070 amp
Zidoo UHD3000
Qnap TS851-4G
Pioneer Bluray BDP-150-K
Windows 11 Professional
Netgear R7000
Chromecast

glen
Guru
Posts: 583
Joined: Mon May 28, 2007 22:34

Re: Subtitles - either comply with or ignore HTML tags

Post by glen » Wed Mar 25, 2020 20:10

Fixing it by creating a new external srt file is not an issue, it is something I have done previously. FFmpeg Batch A/V makes it easy to Demux the various streams. Fixing it then is just a matter of removing the tags in an editor, which is just a find/replace with nothing. I am just sick of having to do it.

Unfortunately if the bug is with GStreamer I accept that there is not much the developers here can do to fix it.

Any idea when we are likely to get a new version of GStreamer?

Regards Glen

User avatar
adoxa
Wizard
Posts: 1490
Joined: Thu Feb 23, 2017 22:58
Location: CQ
Contact:

Re: Subtitles - either comply with or ignore HTML tags

Post by adoxa » Wed Mar 25, 2020 22:38

You don't need to remove the tags, the .srt file handles them fine.

Thinking on it more, I don't think it is GStreamer, I'll have more of a play later.

User avatar
adoxa
Wizard
Posts: 1490
Joined: Thu Feb 23, 2017 22:58
Location: CQ
Contact:

Re: Subtitles - either comply with or ignore HTML tags

Post by adoxa » Thu Mar 26, 2020 12:38

Turns out it was a problem with the Beyonwiz side of things, fix submitted. It will probably be a while before an update is available, so here's a patch for the U4. Extract it where the Wiz can see it, run subtitle/setup.sh, restart; repeat to remove (before doing an online update).
Attachments
subtitle-U4.zip
(1.27 MiB) Downloaded 46 times

glen
Guru
Posts: 583
Joined: Mon May 28, 2007 22:34

Re: Subtitles - either comply with or ignore HTML tags

Post by glen » Fri Mar 27, 2020 07:12

Hi adoxa

Thank you so much. I appreciate you taking the time to look at this and come up with a fix, and a temporary fix as well.

Thank you.

Regards Glen

prl
Wizard God
Posts: 32703
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: Subtitles - either comply with or ignore HTML tags

Post by prl » Fri Mar 27, 2020 11:06

Adoxa's HTML subtitle fix (and some of his earlier unmerged fixes for other subtitle issues) have been merged into the firmware source repository. They should appear in the next firmware release.

Remember, before doing any online upgrade remove any patches like this (or my recent speedup patch for the media selection screen)..
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

User avatar
Gully
Moderator
Posts: 7736
Joined: Thu Aug 30, 2007 22:08
Location: Melbourne

Re: Subtitles - either comply with or ignore HTML tags

Post by Gully » Fri Mar 27, 2020 14:24

prl wrote:
Fri Mar 27, 2020 11:06
They should appear in the next firmware release.
I know this is more a question for PeterU than you when are we getting a new beta release? I think we need one.
Cheers
Gully
_____________
Beyonwiz U4
Logitech Harmony Elite
Google Pixel 6 Pro

User avatar
peteru
Uber Wizard
Posts: 9735
Joined: Tue Jun 12, 2007 23:06
Location: Sydney, Australia
Contact:

Re: Subtitles - either comply with or ignore HTML tags

Post by peteru » Sat Mar 28, 2020 13:18

Gully wrote:
Fri Mar 27, 2020 14:24
I know this is more a question for PeterU than you when are we getting a new beta release? I think we need one.
I have been trying to get a new beta out for a while now, but upstream have broken a number of things. At this stage I can not get a build to complete. My workload has been through the roof lately, so I can't give any estimates on how long it will take to fix. However, majority of the changes being made by oe-alliance lately are all causing some serious breakages and seem to be done without any testing or regard to producing stable builds. I guess too many Europeans have too much time on their hands. :evil:

"Beauty lies in the hands of the beer holder."
Blog.

User avatar
Gully
Moderator
Posts: 7736
Joined: Thu Aug 30, 2007 22:08
Location: Melbourne

Re: Subtitles - either comply with or ignore HTML tags

Post by Gully » Sat Mar 28, 2020 14:59

peteru wrote:
Sat Mar 28, 2020 13:18
I have been trying to get a new beta out for a while now, but upstream have broken a number of things. At this stage I can not get a build to complete. My workload has been through the roof lately, so I can't give any estimates on how long it will take to fix. However, majority of the changes being made by oe-alliance lately are all causing some serious breakages and seem to be done without any testing or regard to producing stable builds. I guess too many Europeans have too much time on their hands. :evil:
Sounds challenging.

Guessing we might all be in that situation for some time now. :(
Cheers
Gully
_____________
Beyonwiz U4
Logitech Harmony Elite
Google Pixel 6 Pro

IanSav
Uber Wizard
Posts: 16846
Joined: Tue May 29, 2007 15:00
Location: Melbourne, Australia

Re: Subtitles - either comply with or ignore HTML tags

Post by IanSav » Sat Mar 28, 2020 15:01

Hi PeterU,

What image are you now using for upstream merges? What are the issues you are seeing upstream?

Regards,
Ian.

glen
Guru
Posts: 583
Joined: Mon May 28, 2007 22:34

Re: Subtitles - either comply with or ignore HTML tags

Post by glen » Mon Mar 30, 2020 07:00

Hi adoxa

Just picked up the latest beta firmware that has the subtitle fix included, it is working great.

Thank you.

Regards Glen

Post Reply

Return to “Bug Reporting and Feature Requests”