paljsingh / impartus-downloader

Download Impartus lectures, convert to mkv for offline viewing.
GNU General Public License v3.0
23 stars 8 forks source link

[Bug]: Lecture Chats in Wndows #106

Closed Takla101 closed 2 years ago

Takla101 commented 2 years ago

Hey it worked perfectly with the video but lecture chats that i download (which was in .vtt format) was 0 bytes and so it couldn't open

Screenshot (2) Screenshot (3)

paljsingh commented 2 years ago

I've updated the line no. 122 in lib/captions.py with open(filepath, 'w+') as fh: to with open(filepath, 'w+', encoding="utf-8") as fh:

to specify an explicit encoding.

Can you pull the latest code and check if that fixes the issue you are seeing ?

Takla101 commented 2 years ago

yes thanks now it worked

t_10-24-09 56 03 10-24-09 57 36

paljsingh commented 2 years ago

Thanks for confirming.

Just a sidenote - .vtt (or webvtt) is a subtitle format file, so you don't need to open / view it in notepad. Instead if you open the video in a player that supports vtt, such as VLC (version 4 or higher), it would play the lecture chats in real time as subtitles. Since vtt also supports positioning of the subtitle window, and more than 1 subtitle line at a time, I'm using that feature to bring up a chat-like window interface.

image

paljsingh commented 2 years ago

Just noticed, you are already using another media player for it. Windows Media Player ?

Takla101 commented 2 years ago

yeah i am using windows player i will use vlc in future i was just testing and thanks for the information great job building this app 👍