.
This commit is contained in:
10
pyvidplayer2/.gitignore
vendored
10
pyvidplayer2/.gitignore
vendored
@@ -1,10 +0,0 @@
|
||||
__pycache__/
|
||||
build/
|
||||
dist/
|
||||
*.egg-info/
|
||||
build.txt
|
||||
test.py
|
||||
test.mp4
|
||||
resources/
|
||||
.VSCodeCounter/
|
||||
video/
|
||||
@@ -1,21 +0,0 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2023 ree1261
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -1,85 +0,0 @@
|
||||
# pyvidplayer2 (please report all bugs!)
|
||||
|
||||
Introducing pyvidplayer2, the successor to pyvidplayer. It's better in
|
||||
pretty much every way, and finally allows an easy and reliable way to play videos in Python.
|
||||
|
||||
All the features from the original library have been ported over, with the exception of ```alt_resize()```. Since pyvidplayer2 has a completely revamped foundation, the unreliability of ```set_size()``` has been quashed, and a fallback function is now redundant.
|
||||
|
||||
# Features (tested on Windows)
|
||||
- Easy to implement (4 lines of code)
|
||||
- Fast and reliable
|
||||
- Adjust playback speed
|
||||
- No audio/video sync issues
|
||||
- Subtitle support (.srt, .ass, etc)
|
||||
- Play multiple videos in parallel
|
||||
- Built in GUI
|
||||
- Support for Pygame, Pyglet, Tkinter, and PyQT6
|
||||
- Can play all ffmpeg supported video formats
|
||||
- Post process effects
|
||||
- Webcam feed
|
||||
|
||||
# Installation
|
||||
```
|
||||
pip install pyvidplayer2
|
||||
```
|
||||
Note: FFMPEG (just the essentials is fine) must be installed and accessible via the system PATH. Here's an online article on how to do this (windows):
|
||||
https://phoenixnap.com/kb/ffmpeg-windows.
|
||||
|
||||
# Quickstart
|
||||
|
||||
Refer to the examples folder for more basic guides, and documentation.md contains more detailed information.
|
||||
|
||||
```
|
||||
import pygame
|
||||
from pyvidplayer2 import Video
|
||||
|
||||
|
||||
# create video object
|
||||
|
||||
vid = Video("video.mp4")
|
||||
|
||||
win = pygame.display.set_mode(vid.current_size)
|
||||
pygame.display.set_caption(vid.name)
|
||||
|
||||
|
||||
while vid.active:
|
||||
key = None
|
||||
for event in pygame.event.get():
|
||||
if event.type == pygame.QUIT:
|
||||
vid.stop()
|
||||
elif event.type == pygame.KEYDOWN:
|
||||
key = pygame.key.name(event.key)
|
||||
|
||||
if key == "r":
|
||||
vid.restart() #rewind video to beginning
|
||||
elif key == "p":
|
||||
vid.toggle_pause() #pause/plays video
|
||||
elif key == "m":
|
||||
vid.toggle_mute() #mutes/unmutes video
|
||||
elif key == "right":
|
||||
vid.seek(15) #skip 15 seconds in video
|
||||
elif key == "left":
|
||||
vid.seek(-15) #rewind 15 seconds in video
|
||||
elif key == "up":
|
||||
vid.set_volume(1.0) #max volume
|
||||
elif key == "down":
|
||||
vid.set_volume(0.0) #min volume
|
||||
elif key == "1":
|
||||
vid.set_speed(1.0) #regular playback speed
|
||||
elif key == "2":
|
||||
vid.set_speed(2.0) #doubles video speed
|
||||
|
||||
# only draw new frames, and only update the screen if something is drawn
|
||||
|
||||
if vid.draw(win, (0, 0), force_draw=False):
|
||||
pygame.display.update()
|
||||
|
||||
pygame.time.wait(16) # around 60 fps
|
||||
|
||||
|
||||
# close video when done
|
||||
|
||||
vid.close()
|
||||
pygame.quit()
|
||||
|
||||
```
|
||||
BIN
pyvidplayer2/__pycache__/__init__.cpython-311.pyc
Normal file
BIN
pyvidplayer2/__pycache__/__init__.cpython-311.pyc
Normal file
Binary file not shown.
BIN
pyvidplayer2/__pycache__/error.cpython-311.pyc
Normal file
BIN
pyvidplayer2/__pycache__/error.cpython-311.pyc
Normal file
Binary file not shown.
BIN
pyvidplayer2/__pycache__/mixer_handler.cpython-311.pyc
Normal file
BIN
pyvidplayer2/__pycache__/mixer_handler.cpython-311.pyc
Normal file
Binary file not shown.
BIN
pyvidplayer2/__pycache__/post_processing.cpython-311.pyc
Normal file
BIN
pyvidplayer2/__pycache__/post_processing.cpython-311.pyc
Normal file
Binary file not shown.
BIN
pyvidplayer2/__pycache__/pyaudio_handler.cpython-311.pyc
Normal file
BIN
pyvidplayer2/__pycache__/pyaudio_handler.cpython-311.pyc
Normal file
Binary file not shown.
BIN
pyvidplayer2/__pycache__/subtitles.cpython-311.pyc
Normal file
BIN
pyvidplayer2/__pycache__/subtitles.cpython-311.pyc
Normal file
Binary file not shown.
BIN
pyvidplayer2/__pycache__/video.cpython-311.pyc
Normal file
BIN
pyvidplayer2/__pycache__/video.cpython-311.pyc
Normal file
Binary file not shown.
BIN
pyvidplayer2/__pycache__/video_player.cpython-311.pyc
Normal file
BIN
pyvidplayer2/__pycache__/video_player.cpython-311.pyc
Normal file
Binary file not shown.
BIN
pyvidplayer2/__pycache__/video_pygame.cpython-311.pyc
Normal file
BIN
pyvidplayer2/__pycache__/video_pygame.cpython-311.pyc
Normal file
Binary file not shown.
BIN
pyvidplayer2/__pycache__/video_tkinter.cpython-311.pyc
Normal file
BIN
pyvidplayer2/__pycache__/video_tkinter.cpython-311.pyc
Normal file
Binary file not shown.
BIN
pyvidplayer2/__pycache__/webcam.cpython-311.pyc
Normal file
BIN
pyvidplayer2/__pycache__/webcam.cpython-311.pyc
Normal file
Binary file not shown.
@@ -1,180 +0,0 @@
|
||||
# Video(path, chunk_size=300, max_threads=1, max_chunks=1, subs=None, post_process=PostProcessing.none, interp=cv2.INTER_LINEAR, use_pygame_audio=False)
|
||||
|
||||
Main object used to play videos. It uses FFMPEG to extract chunks of audio from videos and then feeds it into a Pyaudio stream. Finally, it uses OpenCV to display the appropriate video frames. Videos can only be played simultaneously if they're using Pyaudio (see use_pygame_audio below). This object uses Pygame for graphics. See bottom for other supported libraries.
|
||||
|
||||
## Arguments
|
||||
- ```path``` - Path to video file. I tested a few popular video types, such as mkv, mp4, mov, avi, and 3gp, but theoretically anything FFMPEG can extract data from should work.
|
||||
- ```chunk_size``` - How much audio is extracted at a time, in seconds. Increasing this value can mean less total extracts, but slower extracts.
|
||||
- ```max_threads``` - Maximum number of chunks that can be extracted at any given time. Increasing this value can speed up extract at the expense of cpu usage.
|
||||
- ```max_chunks``` - Maximum number of chunks allowed to be extracted and reserved. Increasing this value can help with buffering, but will use more memory.
|
||||
- ```subs``` - Pass a Subtitle class here for the video to display subtitles.
|
||||
- ```post_process``` - Post processing function that is applied whenever a frame is rendered. This is PostProcessing.none by default, which means no alterations are taking place.
|
||||
- ```interp``` - Interpolation technique used when resizing frames. In general, the three main ones are cv2.INTER_LINEAR, which is balanced, cv2.INTER_CUBIC, which is slower but produces better results, and cv2.INTER_AREA, which is better for downscaling.
|
||||
- ```use_pygame_audio``` - Specifies whether to use Pyaudio or Pygame to play audio.
|
||||
|
||||
## Attributes
|
||||
- ```path``` - Same as given argument.
|
||||
- ```name``` - Name of file without the directory and extension.
|
||||
- ```ext``` - Type of video (mp4, mkv, mov, etc).
|
||||
- ```frame``` - Current frame index. Starts from 0.
|
||||
- ```frame_rate``` - How many frames are in one second.
|
||||
- ```frame_count``` - How many total frames there are.
|
||||
- ```frame_delay``` - Time between frames in order to maintain frame rate (in fractions of a second).
|
||||
- ```duration``` - Length of video in seconds.
|
||||
- ```original_size```
|
||||
- ```current_size```
|
||||
- ```aspect_ratio``` - Width divided by height.
|
||||
- ```chunk_size``` - Same as given argument.
|
||||
- ```max_chunks``` - Same as given argument.
|
||||
- ```max_threads``` - Same as given argument.
|
||||
- ```frame_data``` - Current video frame as a NumPy ndarray.
|
||||
- ```frame_surf``` - Current video frame as a Pygame Surface.
|
||||
- ```active``` - Whether the video is currently playing. This is unaffected by pausing and resuming.
|
||||
- ```buffering``` - Whether the video is waiting for audio to extract.
|
||||
- ```paused```
|
||||
- ```muted```
|
||||
- ```speed``` - Float from 0.5 to 10.0 that multiplies the playback speed.
|
||||
- ```subs``` - Same as given argument.
|
||||
- ```post_func``` - Same as given argument.
|
||||
- ```interp``` - Same as given argument.
|
||||
- ```use_pygame_audio``` - Same as given argument.
|
||||
|
||||
## Methods
|
||||
- ```play()```
|
||||
- ```stop()```
|
||||
- ```resize(size)```
|
||||
- ```change_resolution(height)``` - Given a height, the video will scale its width while maintaining aspect ratio.
|
||||
- ```close()``` - Releases resources. Always recommended to call when done.
|
||||
- ```restart() ```
|
||||
- ```set_speed(speed)``` - Accepts a float from 0.5 (half speed) to 10.0 (ten times speed)
|
||||
- ```get_speed()```
|
||||
- ```set_volume(volume)``` - Adjusts the volume of the video, from 0.0 (min) to 1.0 (max).
|
||||
- ```get_volume()```
|
||||
- ```get_paused()```
|
||||
- ```toggle_pause()``` - Pauses if the video is playing, and resumes if the video is paused.
|
||||
- ```pause()```
|
||||
- ```resume()```
|
||||
- ```toggle_mute()```
|
||||
- ```mute()```
|
||||
- ```unmute()```
|
||||
- ```get_pos()``` - Returns the current position in seconds.
|
||||
- ```seek(time, relative=True)``` - Changes the current position in the video. If relative is true, the given time will be added or subtracted to the current time. Otherwise, the current position will be set to the given time exactly. Time must be given in seconds, and seeking will be accurate to one tenth of a second.
|
||||
- ```draw(surf, pos, force_draw=True)``` - Draws the current video frame onto the given surface, at the given position. If force_draw is true, a surface will be drawn every time this is called. Otherwise, only new frames will be drawn. This reduces cpu usage, but will cause flickering if anything is drawn under or above the video. This method also returns whether a frame was drawn.
|
||||
- ```preview()``` - Opens a window and plays the video. This method will hang until the video closes. Videos are played at 60 fps with force_draw disabled.
|
||||
|
||||
# VideoPlayer(video, rect, interactable=True, loop=False, preview_thumbnails=0)
|
||||
|
||||
VideoPlayers are GUI containers for videos. This seeks to mimic standard video players, so clicking it will play/pause playback, and the GUI will only show when the mouse is hovering over it. Only supported for Pygame.
|
||||
|
||||
## Arguments
|
||||
- ```video``` - Video object to play.
|
||||
- ```rect``` - An x, y, width, and height of the VideoPlayer. The topleft corner will be the x, y coordinate.
|
||||
- ```interactable``` - Enables the GUI.
|
||||
- ```loop``` - Whether the contained video will restart after it finishes. If the queue is not empty, the entire queue will loop, not just the current video.
|
||||
- ```preview_thumbnails``` - Number of preview thumbnails loaded and saved in memory. When seeking, a preview window will show the closest loaded frame. The higher this number is, the more frames are loaded, increasing the preview accuracy, but also increasing initial load time and memory usage. Because of this, this value is defaulted to 0, which turns seek previewing off.
|
||||
|
||||
## Attributes
|
||||
- ```video``` - Same as given argument.
|
||||
- ```frame_rect``` - Same as given argument.
|
||||
- ```vid_rect``` - This is the video fitted into the frame_rect while maintaining aspect ratio. Black bars will appear in any unused space.
|
||||
- ```interactable``` - Same as given argument.
|
||||
- ```loop``` - Same as given argument.
|
||||
- ```queue_``` - Videos to play after the current one finishes.
|
||||
- ```preview_thumbnails``` - Same as given argument.
|
||||
|
||||
## Methods
|
||||
- ```zoom_to_fill()``` - Zooms in the video so that the entire frame_rect is filled in, while maintaining aspect ratio.
|
||||
- ```zoom_out()``` - Reverts zoom_to_fill()
|
||||
- ```queue(input)``` - Accepts a path to a video or a Video object and adds it to the queue. Passing a path will not load the video until it becomes the active video. Passing a Video object will cause it to silently load its first audio chunk, so changing videos will be as seamless as possible.
|
||||
- ```get_queue()```
|
||||
- ```resize(size)```
|
||||
- ```move(pos, relative)``` - Moves the VideoPlayer. If relative is true, the given coordinates will be added onto the current coordinates. Otherwise, the current coordinates will be set to the given coordinates.
|
||||
- ```update(events, show_ui=None)``` - Allows the VideoPlayer to make calculations. It must be given the returns of pygame.event.get(). The GUI automatically shows up when your mouse hovers over the video player, so show_ui can be used to override that. This method also returns show_ui.
|
||||
- ```draw(surface)``` - Draws the VideoPlayer onto the given Surface.
|
||||
- ```close()``` - Releases resources. Always recommended to call when done.
|
||||
- ```skip()``` - Moves onto the next video in the queue.
|
||||
- ```get_video()``` - Returns currently playing video.
|
||||
|
||||
# Subtitles(path, colour="white", highlight=(0, 0, 0, 128), font=pygame.font.SysFont("arial", 30), encoding="utf-8-sig")
|
||||
|
||||
Object used for handling subtitles. Only supported for Pygame.
|
||||
|
||||
## Arguments
|
||||
- ```path``` - Path to subtitle file. This can be any file pysubs2 can read, including .srt, .ass, .vtt, and others.
|
||||
- ```colour``` - Colour of text.
|
||||
- ```highlight``` - Background colour of text. Accepts RGBA, so it can be made completely transparent.
|
||||
- ```font``` - Pygame Font or SysFont object used to render Surfaces. This includes the size of the text.
|
||||
- ```encoding``` - Encoding used to open the srt file.
|
||||
- ```offset``` - The higher this number is, the close the subtitle is to the top of the screen.
|
||||
|
||||
## Attributes
|
||||
- ```path``` - Same as given argument.
|
||||
- ```encoding``` - Same as given argument.
|
||||
- ```start``` - Starting timestamp of current subtitle.
|
||||
- ```end``` - Ending timestamp of current subtitle.
|
||||
- ```text``` - Current subtitle text.
|
||||
- ```surf``` - Current text in a Pygame Surface.
|
||||
- ```colour``` - Same as given argument.
|
||||
- ```highlight``` - Same as given argument.
|
||||
- ```font``` - Same as given argument.
|
||||
- ```offset``` - Same as given argument.
|
||||
|
||||
## Methods
|
||||
- ```set_font(font)```
|
||||
- ```get_font()```
|
||||
|
||||
# Webcam(post_process=PostProcessing.none, interp=cv2.INTER_LINEAR, fps=30)
|
||||
|
||||
Object used for displaying a webcam feed. Only supported for Pygame.
|
||||
|
||||
## Arguments
|
||||
- ```post_process``` - Post processing function that is applied whenever a frame is rendered. This is PostProcessing.none by default, which means no alterations are taking place.
|
||||
- ```interp``` - Interpolation technique used when resizing frames. In general, the three main ones are cv2.INTER_LINEAR, which is balanced, cv2.INTER_CUBIC, which is slower but produces better results, and cv2.INTER_AREA, which is better for downscaling.
|
||||
- ```fps``` - Maximum number of frames captured from the webcam per second.
|
||||
|
||||
## Attributes
|
||||
- ```post_process``` - Same as given argument.
|
||||
- ```interp``` - Same as given argument.
|
||||
- ```fps``` - Same as given argument.
|
||||
- ```original_size```
|
||||
- ```current_size```
|
||||
- ```aspect_ratio``` - Width divided by height.
|
||||
- ```active``` - Whether the webcam is currently playing.
|
||||
- ```frame_data``` - Current video frame as a NumPy ndarray.
|
||||
- ```frame_surf``` - Current video frame as a Pygame Surface.
|
||||
|
||||
## Methods
|
||||
- ```play()```
|
||||
- ```stop()```
|
||||
- ```resize(size)```
|
||||
- ```change_resolution(height)``` - Given a height, the video will scale its width while maintaining aspect ratio.
|
||||
- ```close()``` - Releases resources. Always recommended to call when done.
|
||||
- ```get_pos()``` - Returns how long the webcam has been active. Is not reset if webcam is stopped.
|
||||
- ```draw(surf, pos, force_draw=True)``` - Draws the current video frame onto the given surface, at the given position. If force_draw is true, a surface will be drawn every time this is called. Otherwise, only new frames will be drawn. This reduces cpu usage, but will cause flickering if anything is drawn under or above the video. This method also returns whether a frame was drawn.
|
||||
- ```preview()``` - Opens a window and plays the webcam. This method will hang until the window is closed. Videos are played at whatever fps the webcam object is set to.
|
||||
|
||||
# PostProcessing
|
||||
Used to apply various filters to video playback. Mostly for fun. Works across all graphics libraries.
|
||||
- ```none``` - Default. Nothing happens.
|
||||
- ```blur``` - Slightly blurs frames.
|
||||
- ```sharpen``` - An okay-looking sharpen. Looks pretty bad for small resolutions.
|
||||
- ```greyscale``` - Removes colour from frame.
|
||||
- ```noise``` - Adds a static-like filter. Very intensive.
|
||||
- ```letterbox``` - Adds black bars above and below the frame to look more cinematic.
|
||||
- ```cel_shading``` - Thickens borders for a comic book style filter.
|
||||
|
||||
# Supported Graphics Libraries
|
||||
- Pygame (```Video```) <- default and best supported
|
||||
- Tkinter (```VideoTkinter```)
|
||||
- Pyglet (```VideoPyglet```)
|
||||
- PyQT6 (```VideoPyQT```)
|
||||
|
||||
To use other libraries instead of Pygame, use their respective video object. Each preview method will use their respective graphics API to create a window and draw frames. See the examples folder for details. Note that Subtitles, Webcam, and VideoPlayer only work with Pygame installed.
|
||||
|
||||
# Get Version
|
||||
|
||||
```
|
||||
print(pyvidplayer2.get_version_info())
|
||||
```
|
||||
|
||||
Returns a dictionary with the version of pyvidplayer2, FFMPEG, and Pygame.
|
||||
BIN
pyvidplayer2/examples/resources/billiejean.mp4
Normal file
BIN
pyvidplayer2/examples/resources/billiejean.mp4
Normal file
Binary file not shown.
BIN
pyvidplayer2/examples/resources/birds.avi
Normal file
BIN
pyvidplayer2/examples/resources/birds.avi
Normal file
Binary file not shown.
BIN
pyvidplayer2/examples/resources/clip.mp4
Normal file
BIN
pyvidplayer2/examples/resources/clip.mp4
Normal file
Binary file not shown.
BIN
pyvidplayer2/examples/resources/font.ttf
Normal file
BIN
pyvidplayer2/examples/resources/font.ttf
Normal file
Binary file not shown.
BIN
pyvidplayer2/examples/resources/medic.mov
Normal file
BIN
pyvidplayer2/examples/resources/medic.mov
Normal file
Binary file not shown.
BIN
pyvidplayer2/examples/resources/ocean.mkv
Normal file
BIN
pyvidplayer2/examples/resources/ocean.mkv
Normal file
Binary file not shown.
107
pyvidplayer2/examples/resources/subs1.srt
Normal file
107
pyvidplayer2/examples/resources/subs1.srt
Normal file
@@ -0,0 +1,107 @@
|
||||
1
|
||||
00:00:00,875 --> 00:00:01,710
|
||||
Oh, my God!
|
||||
|
||||
2
|
||||
00:00:05,171 --> 00:00:05,880
|
||||
Hang on!
|
||||
|
||||
3
|
||||
00:00:06,297 --> 00:00:08,383
|
||||
- Ethan!
|
||||
- Go, go, go!
|
||||
|
||||
4
|
||||
00:00:08,383 --> 00:00:11,761
|
||||
Audiences and critics can't believe
|
||||
what they're seeing.
|
||||
|
||||
5
|
||||
00:00:14,139 --> 00:00:15,015
|
||||
Listen to me.
|
||||
|
||||
6
|
||||
00:00:15,015 --> 00:00:16,850
|
||||
The world's coming after you.
|
||||
|
||||
7
|
||||
00:00:16,850 --> 00:00:18,101
|
||||
Stay out of my way.
|
||||
|
||||
8
|
||||
00:00:18,935 --> 00:00:21,187
|
||||
“Tom Cruise has outdone himself.”
|
||||
|
||||
9
|
||||
00:00:22,105 --> 00:00:25,025
|
||||
With a 99% on Rotten Tomatoes.
|
||||
|
||||
10
|
||||
00:00:25,025 --> 00:00:25,483
|
||||
Yes!
|
||||
|
||||
11
|
||||
00:00:25,483 --> 00:00:29,446
|
||||
“Mission: Impossible - Dead Reckoning is filled with ‘holy shit’ moments.”
|
||||
|
||||
12
|
||||
00:00:29,446 --> 00:00:30,488
|
||||
What is happening?
|
||||
|
||||
13
|
||||
00:00:30,488 --> 00:00:32,490
|
||||
“This is why we go to the movies.”
|
||||
|
||||
14
|
||||
00:00:33,908 --> 00:00:35,577
|
||||
Oh, I like her.
|
||||
|
||||
15
|
||||
00:00:35,577 --> 00:00:37,287
|
||||
“It's pulse pounding.”
|
||||
|
||||
16
|
||||
00:00:37,746 --> 00:00:39,622
|
||||
“It will rock your world.”
|
||||
|
||||
17
|
||||
00:00:40,081 --> 00:00:41,875
|
||||
With “jaw dropping action.”
|
||||
|
||||
18
|
||||
00:00:43,209 --> 00:00:44,085
|
||||
Is this where we run?
|
||||
|
||||
19
|
||||
00:00:44,085 --> 00:00:44,919
|
||||
Go, go, go, go!
|
||||
|
||||
20
|
||||
00:00:45,253 --> 00:00:45,920
|
||||
Probably.
|
||||
|
||||
21
|
||||
00:00:46,421 --> 00:00:49,132
|
||||
“It's one of the best action movies
|
||||
ever made.”
|
||||
|
||||
22
|
||||
00:00:49,466 --> 00:00:50,508
|
||||
What more can I say?
|
||||
|
||||
23
|
||||
00:00:50,925 --> 00:00:54,888
|
||||
“See it in the biggest, most seat-shaking theater you can find.”
|
||||
|
||||
24
|
||||
00:00:55,138 --> 00:00:57,891
|
||||
“It will take your breath away.”
|
||||
|
||||
25
|
||||
00:00:58,808 --> 00:00:59,893
|
||||
Ethan, did you make it?
|
||||
|
||||
26
|
||||
00:00:59,893 --> 00:01:00,852
|
||||
Are you okay?
|
||||
|
||||
283
pyvidplayer2/examples/resources/subs2.srt
Normal file
283
pyvidplayer2/examples/resources/subs2.srt
Normal file
@@ -0,0 +1,283 @@
|
||||
1
|
||||
00:00:02,814 --> 00:00:04,402
|
||||
♪♪
|
||||
|
||||
2
|
||||
00:00:04,453 --> 00:00:06,613
|
||||
EMBER
|
||||
Meet the residents of Element City.
|
||||
|
||||
3
|
||||
00:00:08,156 --> 00:00:10,507
|
||||
EMBER
|
||||
Air... usually has their
|
||||
head in the clouds.
|
||||
|
||||
4
|
||||
00:00:11,313 --> 00:00:12,855
|
||||
AIR PERSON
|
||||
Aww, my new jacket!
|
||||
|
||||
5
|
||||
00:00:13,570 --> 00:00:15,594
|
||||
EMBER
|
||||
Earth... can be a little seedy.
|
||||
|
||||
6
|
||||
00:00:16,875 --> 00:00:18,240
|
||||
EARTH PERSON
|
||||
Nothing weird going on here.
|
||||
|
||||
7
|
||||
00:00:18,291 --> 00:00:20,156
|
||||
EARTH PERSON
|
||||
Uh, just a little pruning!
|
||||
|
||||
8
|
||||
00:00:20,810 --> 00:00:22,774
|
||||
EMBER
|
||||
Water... is always getting into something.
|
||||
|
||||
9
|
||||
00:00:22,825 --> 00:00:25,169
|
||||
YOUNG WADE
|
||||
Oh... Huh...
|
||||
|
||||
10
|
||||
00:00:25,935 --> 00:00:26,935
|
||||
YOUNG WADE
|
||||
[Screams]
|
||||
|
||||
11
|
||||
00:00:28,341 --> 00:00:29,094
|
||||
YOUNG WADE
|
||||
Help!
|
||||
|
||||
12
|
||||
00:00:29,583 --> 00:00:30,709
|
||||
EMBER
|
||||
And fire...
|
||||
|
||||
13
|
||||
00:00:31,302 --> 00:00:32,041
|
||||
EMBER
|
||||
As ordered!
|
||||
|
||||
14
|
||||
00:00:32,091 --> 00:00:33,404
|
||||
EMBER
|
||||
We run a little hot.
|
||||
|
||||
15
|
||||
00:00:35,717 --> 00:00:37,294
|
||||
[Burps]
|
||||
|
||||
16
|
||||
00:00:37,794 --> 00:00:40,413
|
||||
BERNIE
|
||||
This shop is dream of our family.
|
||||
|
||||
17
|
||||
00:00:40,463 --> 00:00:42,396
|
||||
BERNIE
|
||||
Someday it'll all be yours!
|
||||
|
||||
18
|
||||
00:00:43,256 --> 00:00:45,626
|
||||
EMBER
|
||||
But we all live by one simple rule.
|
||||
|
||||
19
|
||||
00:00:46,615 --> 00:00:48,469
|
||||
CINDER
|
||||
Elements cannot mix!
|
||||
|
||||
20
|
||||
00:00:51,256 --> 00:00:52,095
|
||||
WADE
|
||||
[Screams]
|
||||
|
||||
21
|
||||
00:00:52,146 --> 00:00:52,818
|
||||
EMBER
|
||||
What the...
|
||||
|
||||
22
|
||||
00:00:52,868 --> 00:00:54,812
|
||||
WADE
|
||||
The pipe squished me all out of shape.
|
||||
|
||||
23
|
||||
00:00:54,863 --> 00:00:55,565
|
||||
EMBER
|
||||
Dang!
|
||||
|
||||
24
|
||||
00:00:57,287 --> 00:00:58,051
|
||||
WADE
|
||||
That's better.
|
||||
|
||||
25
|
||||
00:00:58,102 --> 00:00:58,896
|
||||
EMBER
|
||||
Oh.
|
||||
|
||||
26
|
||||
00:01:00,310 --> 00:01:02,055
|
||||
WADE
|
||||
So you've never left Fire Town?
|
||||
|
||||
27
|
||||
00:01:02,106 --> 00:01:03,720
|
||||
EMBER
|
||||
Sorry, buddy. Elements don't mix.
|
||||
|
||||
28
|
||||
00:01:04,160 --> 00:01:05,243
|
||||
EARTH PERSON
|
||||
Hey!
|
||||
|
||||
29
|
||||
00:01:05,340 --> 00:01:07,399
|
||||
EMBER
|
||||
Plus, my dad would boil you alive.
|
||||
|
||||
30
|
||||
00:01:07,449 --> 00:01:09,040
|
||||
WADE
|
||||
Why does anyone get to tell you
|
||||
|
||||
31
|
||||
00:01:09,090 --> 00:01:10,416
|
||||
WADE
|
||||
what you can do in your life?
|
||||
|
||||
32
|
||||
00:01:10,840 --> 00:01:11,453
|
||||
WADE
|
||||
Come on!
|
||||
|
||||
33
|
||||
00:01:15,160 --> 00:01:16,290
|
||||
WADE
|
||||
Why do they even have these?
|
||||
|
||||
34
|
||||
00:01:16,340 --> 00:01:17,253
|
||||
EMBER
|
||||
Eh, who knows.
|
||||
|
||||
35
|
||||
00:01:18,959 --> 00:01:19,973
|
||||
WADE
|
||||
Watch this!
|
||||
|
||||
36
|
||||
00:01:20,024 --> 00:01:22,042
|
||||
♪♪
|
||||
|
||||
37
|
||||
00:01:22,106 --> 00:01:22,704
|
||||
EMBER
|
||||
Whoa!
|
||||
|
||||
38
|
||||
00:01:25,531 --> 00:01:27,695
|
||||
BERNIE
|
||||
Ember, I see a change in you.
|
||||
|
||||
39
|
||||
00:01:27,853 --> 00:01:28,690
|
||||
WADE
|
||||
[Screaming]
|
||||
|
||||
40
|
||||
00:01:29,156 --> 00:01:30,601
|
||||
CINDER
|
||||
Water guy?
|
||||
|
||||
41
|
||||
00:01:31,125 --> 00:01:31,980
|
||||
EMBER
|
||||
You live here?
|
||||
|
||||
42
|
||||
00:01:32,031 --> 00:01:33,267
|
||||
WADE
|
||||
It's my mom's place.
|
||||
|
||||
43
|
||||
00:01:33,317 --> 00:01:34,371
|
||||
ALAN
|
||||
We got two kids that are
|
||||
|
||||
44
|
||||
00:01:34,421 --> 00:01:35,733
|
||||
ALAN
|
||||
swimming around here somewhere.
|
||||
|
||||
45
|
||||
00:01:36,187 --> 00:01:38,281
|
||||
ALAN
|
||||
Marco! Polo!
|
||||
|
||||
46
|
||||
00:01:38,734 --> 00:01:40,187
|
||||
MARCO
|
||||
What? [Laughing]
|
||||
|
||||
47
|
||||
00:01:43,140 --> 00:01:45,597
|
||||
EMBER
|
||||
I've been trying to fill my father's shoes
|
||||
|
||||
48
|
||||
00:01:45,648 --> 00:01:48,589
|
||||
EMBER
|
||||
but I never once asked
|
||||
what I wanted to do.
|
||||
|
||||
49
|
||||
00:01:48,640 --> 00:01:50,671
|
||||
♪♪
|
||||
|
||||
50
|
||||
00:01:53,717 --> 00:01:54,732
|
||||
BERNIE
|
||||
Try this!
|
||||
|
||||
51
|
||||
00:01:54,783 --> 00:01:56,186
|
||||
EMBER
|
||||
Dad, those are too hot.
|
||||
|
||||
52
|
||||
00:01:56,273 --> 00:01:57,233
|
||||
WADE
|
||||
I love hot food.
|
||||
|
||||
53
|
||||
00:01:57,876 --> 00:01:59,047
|
||||
WADE
|
||||
[Gulps]
|
||||
|
||||
54
|
||||
00:02:00,570 --> 00:02:01,491
|
||||
WADE
|
||||
[Screaming]
|
||||
|
||||
55
|
||||
00:02:01,542 --> 00:02:02,875
|
||||
WADE
|
||||
[Muffled screaming]
|
||||
|
||||
56
|
||||
00:02:05,903 --> 00:02:07,520
|
||||
WADE
|
||||
[Screaming]
|
||||
|
||||
57
|
||||
00:02:07,879 --> 00:02:10,048
|
||||
EMBER
|
||||
You see? He likes it!
|
||||
|
||||
BIN
pyvidplayer2/examples/resources/trailer1.mp4
Normal file
BIN
pyvidplayer2/examples/resources/trailer1.mp4
Normal file
Binary file not shown.
BIN
pyvidplayer2/examples/resources/trailer2.mp4
Normal file
BIN
pyvidplayer2/examples/resources/trailer2.mp4
Normal file
Binary file not shown.
@@ -1,5 +0,0 @@
|
||||
numpy<1.25,>=1.21
|
||||
opencv_python
|
||||
pygame
|
||||
pysubs2
|
||||
PyAudio
|
||||
@@ -1,27 +0,0 @@
|
||||
from setuptools import setup
|
||||
from pyvidplayer2 import _VERSION
|
||||
|
||||
|
||||
with open("README.md", 'r') as f:
|
||||
long_desc = f.read()
|
||||
|
||||
|
||||
setup(
|
||||
name="pyvidplayer2",
|
||||
version=_VERSION,
|
||||
description="Video playback in Python",
|
||||
long_description=long_desc,
|
||||
long_description_content_type = "text/markdown",
|
||||
author="Anray Liu",
|
||||
author_email="anrayliu@gmail.com",
|
||||
license="MIT",
|
||||
packages=["pyvidplayer2"],
|
||||
install_requires=["numpy<1.25,>=1.21",
|
||||
"opencv_python",
|
||||
"pygame",
|
||||
"pysubs2",
|
||||
"PyAudio"],
|
||||
url="https://github.com/ree1261/pyvidplayer2",
|
||||
platforms=["windows"],
|
||||
keywords=["pygame", "video", "playback"],
|
||||
)
|
||||
Reference in New Issue
Block a user