Page 1 of 1

Subtitles - either comply with or ignore HTML tags

Posted: Wed Mar 25, 2020 12:29
by glen
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

Re: Subtitles - either comply with or ignore HTML tags

Posted: Wed Mar 25, 2020 15:52
by netmask
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..

Re: Subtitles - either comply with or ignore HTML tags

Posted: Wed Mar 25, 2020 16:10
by adoxa
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.

Re: Subtitles - either comply with or ignore HTML tags

Posted: Wed Mar 25, 2020 16:19
by glen
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.

Re: Subtitles - either comply with or ignore HTML tags

Posted: Wed Mar 25, 2020 16:29
by adoxa
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)?

Re: Subtitles - either comply with or ignore HTML tags

Posted: Wed Mar 25, 2020 16:38
by glen
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.

Re: Subtitles - either comply with or ignore HTML tags

Posted: Wed Mar 25, 2020 17:58
by adoxa
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.

Re: Subtitles - either comply with or ignore HTML tags

Posted: Wed Mar 25, 2020 18:38
by glen
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

Re: Subtitles - either comply with or ignore HTML tags

Posted: Wed Mar 25, 2020 19:48
by netmask
examplesub.JPG
examplesub.JPG (91.9 KiB) Viewed 2770 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 59 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 2770 times

Re: Subtitles - either comply with or ignore HTML tags

Posted: Wed Mar 25, 2020 20:10
by glen
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

Re: Subtitles - either comply with or ignore HTML tags

Posted: Wed Mar 25, 2020 22:38
by adoxa
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.

Re: Subtitles - either comply with or ignore HTML tags

Posted: Thu Mar 26, 2020 12:38
by adoxa
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).

Re: Subtitles - either comply with or ignore HTML tags

Posted: Fri Mar 27, 2020 07:12
by glen
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

Re: Subtitles - either comply with or ignore HTML tags

Posted: Fri Mar 27, 2020 11:06
by prl
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)..

Re: Subtitles - either comply with or ignore HTML tags

Posted: Fri Mar 27, 2020 14:24
by Gully
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.

Re: Subtitles - either comply with or ignore HTML tags

Posted: Sat Mar 28, 2020 13:18
by peteru
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:

Re: Subtitles - either comply with or ignore HTML tags

Posted: Sat Mar 28, 2020 14:59
by Gully
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. :(

Re: Subtitles - either comply with or ignore HTML tags

Posted: Sat Mar 28, 2020 15:01
by IanSav
Hi PeterU,

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

Regards,
Ian.

Re: Subtitles - either comply with or ignore HTML tags

Posted: Mon Mar 30, 2020 07:00
by glen
Hi adoxa

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

Thank you.

Regards Glen