Skip to content

Commit b3d6df2

Browse files
committed
And the docs are a bit better again...
1 parent 9057478 commit b3d6df2

File tree

5 files changed

+26
-19
lines changed

5 files changed

+26
-19
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#Movie decoder for Python based on MoviePy
22

3-
This library allows you to play and render movies in Python. It is based on the
4-
(rather excellent) [MoviePy](http://zulko.github.io/moviepy/) module created by Zulko, which offers a convenient Python interface to ffmpeg. This library should hence be able to decode any format that ffmpeg supports. If ffmpeg is not found to be installed, moviepy will download it for you on first use, which may take some time (keep an eye on that terminal/command prompt to see the download progress).
3+
This library allows you to decode and render movies in Python. It is based on the (rather excellent) [MoviePy](http://zulko.github.io/moviepy/) module created by Zulko, which offers a convenient Python interface to ffmpeg. This library should hence be able to decode any format that ffmpeg supports. If ffmpeg is not found to be installed, moviepy will download it for you on first use, which may take some time (keep an eye on that terminal/command prompt to see the download progress).
54

65
One will have to implement the actual rendering of each frame himself, but you can use the play.py module included in this repository as an example. The `play.py` shows how to play a video using OpenGL+pygame for the video rendering and pyaudio for audio playback (using pygame.mixer is also an option, but that doesn't work smoothly yet).
76

@@ -35,6 +34,7 @@ This module depends on the following other libraries.
3534

3635
- MoviePy (http://zulko.github.io/moviepy/)
3736
- pyAudio (https://people.csail.mit.edu/hubert/pyaudio/)
37+
- numpy (http://www.numpy.org)
3838

3939
That should be enough to get you started, if you plan to implement your own rendering functions for video and audio. If you also want to be able to view the example provided by `play.py` you further need
4040

docs/source/dependencies.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
## Dependencies
22

3-
This module depends on the following other libraries.
3+
This module depends on the following libraries:
44

55
- MoviePy (<http://zulko.github.io/moviepy/>)
66
- pyaudio (<https://people.csail.mit.edu/hubert/pyaudio/>)
77
- numpy (<http://www.numpy.org/>)
88

9-
That should be enough to get you started when you plan to implement your own rendering functions to display the video frames. If you also want to be able to view the example provided by `play.py` you furthermore need
9+
That should get you started if you plan to implement your own rendering functions to display the video frames. When you also want to be able to view the example provided by `play.py` you furthermore need
1010

1111
- pygame (<http://www.pygame.org/>)
1212
- pyOpenGL (<http://pyopengl.sourceforge.net/>)

docs/source/index.rst

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,15 @@
55
66
Media decoder documentation
77
===========================
8-
98
This library allows you to decode and render video files (and in the future also
10-
audio files) in Python. It provides an internal clock that determines which
11-
(video and/or audio) frame needs to be displayed at a specified time, and this frame
12-
can then (optionally) be passed on to a callback function that takes care of the
13-
actual rendering of the frame. In short, this library should help you get started
9+
separate audio files) in Python. The user thus has to take care of the rendering of these
10+
frames himself by writing the necessary rendering functions
11+
(although modules for rendering sound are included in the package).
12+
13+
There is an internal clock (class ``Timer``) that determines which
14+
video and audio frame needs to be rendered at a specified time, and these frames
15+
can then (optionally) be passed to a callback functions which take care of the
16+
actual rendering. In short, this library should help you get started
1417
when you want to implement your own video player and want to have full control over
1518
the way audio and video is rendered.
1619

@@ -20,10 +23,6 @@ render any media format that ffmpeg supports. If ffmpeg is not found, moviepy
2023
will download it for you on first usage, which may take some time
2124
(so keep an eye on that terminal/command prompt to track the download progress).
2225

23-
This library's main purpose is to decode video and/or audio files and supply the
24-
user with video and audio frames depending on the playtime of the media stream.
25-
The user thus has to take care of the rendering of these frames himself (although
26-
modules for sound rendering are included in the package).
2726
The ``play.py`` contains an example of how to play a video using OpenGL+pygame for
2827
the video rendering and pyaudio for audio playback (using pygame.mixer is also an
2928
option, but that doesn't work smoothly yet). You can play a video by calling

mediadecoder/timer.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,17 @@
1212

1313
class Timer(object):
1414
""" Timer serves as a video clock that is used to determine which frame needs to be
15-
displayed at the specified time. It runs in a separate thread.
16-
Time can be polled by checking its property clock.time, and the current frame
17-
can be determined by checking clock.current_frame. """
15+
displayed at a specified time. the clock runs in its own separate thread.
16+
Say you have an instance of Timer called ``clock``. The time can be polled by
17+
checking
18+
19+
>> clock.time
20+
21+
and the current frame can be determined by checking
22+
23+
>> clock.current_frame.
24+
25+
"""
1826

1927
def __init__(self, fps=None, max_duration=None):
2028
""" Constructor.

setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,10 @@
2828
'moviepy',
2929
'numpy',
3030
],
31+
license='MIT',
3132
classifiers=[
3233
'Intended Audience :: Developers',
33-
'Topic :: Desktop Environment',
34+
'Environment :: Console',
3435
'Topic :: Documentation :: Sphinx',
3536
'Topic :: Multimedia :: Sound/Audio',
3637
'Topic :: Multimedia :: Sound/Audio :: Players',
@@ -40,7 +41,6 @@
4041
'Operating System :: Microsoft :: Windows',
4142
'Operating System :: POSIX',
4243
'License :: OSI Approved :: MIT License',
43-
'Programming Language :: Python :: 2',
44-
'Programming Language :: Python :: 3',
44+
'Programming Language :: Python',
4545
],
4646
)

0 commit comments

Comments
 (0)