Comments (6)
it doesn't insist on it being utf-8. i use pycaption
's detect_format()
tool. sadly perfect encoding detection is impossible. (see https://stackoverflow.com/questions/436220/determine-the-encoding-of-text-in-python)
from gnomecast.
actually, looking at my own code, possible i might have a bug insisting on utf-8. can you post a subtitle file (that's not working) i can confirm w/?
from gnomecast.
Sure, download for example this one:
https://www.opensubtitles.org/cs/subtitles/4673665/the-big-bang-theory-the-date-night-variable-cs
You'll see empty rectangles instead of some characters (other characters are swapped with a completely different ones from a different alphabet, but I understand those are much harder to spot for a foreigner). The correct encoding is windows 1250 (cp1250). For example gedit's open dialog allows for selecting encoding, so that you can compare correct and incorrect rendering.
from gnomecast.
I have a similar problem, and there's no option to not add subtitles (or don't check for it). I think this movie has encoded subtitles, and I have this error on console: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd1 in position 2031: invalid continuation byte
Gnomecast continue searching for subtitles and Play button is always grey
from gnomecast.
i've witnessed that as well @deimidis. needs better error handling for sure.
from gnomecast.
Warning: I know very basic python(3)
I think the simplest solution would be:
inputSubtitles.decode('codec').encode('utf8')
and process further - as vtt must be utf8 this will also solve UnicodeDecodeError issues
where codec can be chosen from drop menu of builtin codecs
https://docs.python.org/3.7/library/codecs.html#standard-encodings
This is basically what VLC and other video players have, instead of trying codec autodetect.
Btw, kudos for great app
from gnomecast.
Related Issues (20)
- Error playing Brown Noise 8 Hours, for Relaxation, Sleep, Studying and Tinnitus.webm
- [Feature] Create as appimage
- Error playing Total Recall 1990 BR 720p Qmax.mkv
- GUI freezes on Ubuntu 20.04 when trying to play HOT 2
- Error playing Blade Runner 2049 2017 HDRip 2.18 om lv scarabey.avi
- Error playing Free.Guy.2021.HDRip.XviD.AC3-EVO.avi
- sticky subtitles HOT 8
- socket.gaierror: [Errno -2] Name or service not known HOT 1
- AttributeError: 'Chromecast' object has no attribute 'device' HOT 14
- Error playing 06-Lai-Power-Anemia-Spaghetti-Junction-Remix.mp3 (because it's actually a video somehow!)
- Invalid desktop files detected HOT 1
- exception
- Error playing 1080p.BluRay.x265-DiN.mkv
- Update package in PyPI to include pychromecast version fix
- Installation issue on Fedora 36 HOT 2
- broken tests on master
- Gnomecast casts video but without audio
- "Invalid stream specifier" error with ffmpeg
- Error playing 2024-02-03 18-40-38.mkv
- Unable to find Chromecast
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gnomecast.