avplayer

PyAV Media Player

MIT License

Downloads
513
Stars
1
Committers
1

avplayer

PyAV Media Player

Installation

Install avplayer:

pip install avplayer

If you want to use the tk preview:

pip install avplayer[Pillow]

Commandline Tools

python -m avplayer --help

Realtime support

If it is important to get the latest frame in real-time streaming such as RTSP streaming, we recommend adjusting the --drop-* related options.

python -m avplayer --drop-slow-frame --drop-threshold=1 ...

The cvplayer.avconfig.AvConfig class can be used as follows:

from avplayer.avconfig import AvConfig

config = AvConfig(
    input_file="rtsp://...",
    drop_slow_frame=True,
    drop_threshold=1,
)

Features

opencv-python compatibility

To prevent freeze when using opencv-python's imshow, do not use import av at file-scope.

Please refer to the following link:

Examples

AioCv

See the examples/aio_cv.py file.

OpenCV highgui

See the examples/cv2_example.py file.

License

See the LICENSE file for details. In summary, avplayer is licensed under the MIT license.