Comments (2)
I don't know if my error is due to a bad srt file or if it's a bug
Well, the SRT format isn't really well specified. However I've never seen such blank line in the wild, and the srt files listing edges cases I've found around don't contain that either.
So I'd say, try reading it with VLC, if it does accept that blank line, then I'd be ok with trying to improve the parser.
In any case thanks for the report.
from pysrt.
Thanks for your answer, I tried it in vlc and in fact the third line is not shown. With this srt content:
1
00:0:10,440 --> 00:00:15,195
Je suis coincée au boulot,
j'aurai 10 minutes de retard.
75
00:00:15,960 --> 00:00:19,157
John, je suis dans les embouteillages.
La 5e Avenue est en travaux.
J'ai rajouté une troisième ligne.
It shows:
Je suis coincée au boulot,
"j'aurai 10 minutes de retard." is not shown
and then the 3 lines are shown.
John, je suis dans les embouteillages.
La 5e Avenue est en travaux.
J'ai rajouté une troisième ligne.
Maybe pysrt could fix this by removing the empty line or almost have an option to write the file even if there's an error.
from pysrt.
Related Issues (20)
- Phantom pointers when assigning fields HOT 1
- In-place mode does not write the entire file HOT 2
- Inserting Subtitle Snippet
- time passed to at() will not find caption if the time passed in equals start time of caption
- UnicodeDecodeError
- Script: parsing transcript .srt files into readable text HOT 1
- the latest code in master was not released
- SubRipTime.__init__ should maybe cast the arguments to int or float (aka “TypeError: '>' not supported between instances of 'SubRipTime' and 'dict'” in slice())
- Faster loading HOT 2
- Tag v1.1.2 HOT 1
- UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' HOT 1
- Weird version ??
- text_without_tags should also remove subtitle tags
- pysrt.open() returns empty list
- Captions whose text begins with Line Separator character are parsed as blank string HOT 1
- pysrt fails to build with Python 3.11.0a1
- Tests fail with Python 3.12 HOT 2
- Subtitle synchronization with input video files.
- SubRipTime.to_time() does not support times over 24 hours
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 pysrt.