Initial commit
This commit is contained in:
11
pyvidplayer2/examples/custom_subtitles_demo.py
Normal file
11
pyvidplayer2/examples/custom_subtitles_demo.py
Normal file
@@ -0,0 +1,11 @@
|
||||
'''
|
||||
This is an example of custom subtitle fonts
|
||||
'''
|
||||
|
||||
|
||||
from pyvidplayer2 import Subtitles, Video
|
||||
from pygame.font import Font
|
||||
|
||||
subtitles = Subtitles(r"resources\subs2.srt", font=Font(r"resources\font.ttf", 60), highlight=(255, 0, 0, 128), offset=500)
|
||||
|
||||
Video(r"resources\trailer2.mp4", subs=subtitles).preview()
|
||||
Reference in New Issue
Block a user