edge-tts icon indicating copy to clipboard operation
edge-tts copied to clipboard

Ampersand (&) is converted to HTML version (&) in subtitles

Open Scoffins opened this issue 1 year ago • 2 comments

When outputting subtitles, ampersands (&) in text input are converted to & in the subtitles file.

This is a problem when using the subtitles file in things like FFMPEG.

Scoffins avatar Jan 26 '24 19:01 Scoffins

Doesn't WebVTT require this? I think it's valid

rany2 avatar Jan 26 '24 19:01 rany2

I'm not sure about that but when I replace & with & in the subtitle file it works perfectly. But I've only tested with FFMPEG so I don't know how it would respond to other encoders/players. For now it's not a major issue as I'm using SED to automatically replace the html entity, but it would be nice to not need the extra command and temp file to accomplish it.

Very good work here btw, this tool is incredibly useful and much easier than making the calls manually via cURL. Thank you.

Scoffins avatar Jan 28 '24 00:01 Scoffins

I'll be using a real subtitles library soon instead of my homegrown one which will support multiple subtitle formats. My WebVTT implementation is actually correct but unfortunately the support is a bit shoddy as it's not wildly used

rany2 avatar Apr 29 '24 21:04 rany2

Anyway it's not actually a bug, just caused by poor WebVTT support.

rany2 avatar Apr 29 '24 21:04 rany2