All Projects → matham → Ffpyplayer

matham / Ffpyplayer

Licence: lgpl-3.0
A cython implementation of an ffmpeg based player.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Ffpyplayer

Player
FFmpeg and SDL2 video player
Stars: ✭ 119 (+33.71%)
Mutual labels:  ffmpeg, video-player
X1Player
iOS端封装的视频播放器.支持直播,录播视频的播放,支持常用的播放界面控制,类似于ijkplayer 优点是体积更小,使用快捷
Stars: ✭ 21 (-76.4%)
Mutual labels:  ffmpeg, video-player
Ffmpeg Video Player
An FFmpeg and SDL Tutorial.
Stars: ✭ 149 (+67.42%)
Mutual labels:  ffmpeg, video-player
Screen Recorder Ffmpeg Cpp
*Multimedia project* A screen recording application to capture your desktop and store in a video format. Click here to watch the demo
Stars: ✭ 98 (+10.11%)
Mutual labels:  ffmpeg, video-player
Playerdemo
一个视频播放器,开源版 potplayer ,用于总结播放器开发技术。
Stars: ✭ 491 (+451.69%)
Mutual labels:  ffmpeg, video-player
QtDemos
This is a demo about Qt5, including Qt Custom Widget, Qt Multithreaded Downloader, QML Video Player(using OpenGL, FFmpeg and SDL2)
Stars: ✭ 18 (-79.78%)
Mutual labels:  ffmpeg, video-player
Super-Stitch
一款视频超级拼接软件
Stars: ✭ 28 (-68.54%)
Mutual labels:  ffmpeg, video-player
Qmplay2
QMPlay2 is a video and audio player which can play most formats and codecs.
Stars: ✭ 310 (+248.31%)
Mutual labels:  ffmpeg, video-player
Giraffeplayer2
out of the box android video player(support lazy load, ListView/RecyclerView and hight performance)
Stars: ✭ 344 (+286.52%)
Mutual labels:  ffmpeg, video-player
Dkvideoplayer
Android Video Player. 安卓视频播放器,封装MediaPlayer、ExoPlayer、IjkPlayer。模仿抖音并实现预加载,列表播放,悬浮播放,广告播放,弹幕
Stars: ✭ 3,796 (+4165.17%)
Mutual labels:  ffmpeg, video-player
Mpv.net
🎞 mpv.net is a modern media player for Windows that works just like mpv.
Stars: ✭ 737 (+728.09%)
Mutual labels:  ffmpeg, video-player
Yuview
The Free and Open Source Cross Platform YUV Viewer with an advanced analytics toolset
Stars: ✭ 665 (+647.19%)
Mutual labels:  ffmpeg, video-player
Fijkplayer
ijkplayer for flutter. ijkplayer 的 flutter 封装。 Flutter video/audio player. Flutter media player plugin for android/iOS based on ijkplayer. fijkplayer 是基于 ijkplayer 封装的 flutter 媒体播放器,开箱即用,无需编译 ijkplayer
Stars: ✭ 943 (+959.55%)
Mutual labels:  ffmpeg, video-player
Liquid dl
Liquid-dl is a simple tool for utlities such as FFMPEG, youtube-dl, and scdl. It provides a simple framework with simple point and click options allowing users to just click on what they need and use the bare minimum commands to get the results needed.
Stars: ✭ 78 (-12.36%)
Mutual labels:  ffmpeg
Mediasoup3 Record Demo
Simple Record Demo using Mediasoup 3 and GStreamer
Stars: ✭ 84 (-5.62%)
Mutual labels:  ffmpeg
Mt
yet another media thumber. Generate Video Contat Sheets easily. http://mutschler.github.io/mt
Stars: ✭ 76 (-14.61%)
Mutual labels:  ffmpeg
Floating Player
Floating Player is a Google Chrome extension to watch videos while you browse the internet
Stars: ✭ 77 (-13.48%)
Mutual labels:  video-player
Live Dl
Download live streams from YouTube
Stars: ✭ 82 (-7.87%)
Mutual labels:  ffmpeg
Streama
Self hosted streaming media server. https://docs.streama-project.com/
Stars: ✭ 8,948 (+9953.93%)
Mutual labels:  video-player
Exoplayer Wrapper
📺 Android library, ExoPlayer wrapper (2017)
Stars: ✭ 77 (-13.48%)
Mutual labels:  video-player

FFPyPlayer is a python binding for the FFmpeg library for playing and writing media files.

For more information: https://matham.github.io/ffpyplayer/index.html

To install: https://matham.github.io/ffpyplayer/installation.html

.. image:: https://travis-ci.org/matham/ffpyplayer.svg?branch=master :target: https://travis-ci.org/matham/ffpyplayer :alt: TravisCI status

.. image:: https://ci.appveyor.com/api/projects/status/nfl6tyiwks26ngyu/branch/master?svg=true :target: https://ci.appveyor.com/project/matham/ffpyplayer/branch/master :alt: Appveyor status

.. image:: https://img.shields.io/pypi/pyversions/ffpyplayer.svg :target: https://pypi.python.org/pypi/ffpyplayer/ :alt: Supported Python versions

.. image:: https://img.shields.io/pypi/v/ffpyplayer.svg :target: https://pypi.python.org/pypi/ffpyplayer/ :alt: Latest Version on PyPI

.. warning::

Although the ffpyplayer source code is licensed under the LGPL, the ffpyplayer wheels
for Windows and linux on PYPI are distributed under the GPL because the included FFmpeg binaries
were compiled with GPL options.

If you want to use it under the LGPL you need to compile FFmpeg yourself with the correct options.

Similarly, the wheels bundle openssl for online camera support. However, releases are not made
for every openssl release, so it is recommended that you compile ffpyplayer yourself if security
is a issue.

Usage example

Playing a file:

.. code-block:: python

>>> from ffpyplayer.player import MediaPlayer
>>> import time

>>> player = MediaPlayer(filename)
>>> val = ''
>>> while val != 'eof':
...     frame, val = player.get_frame()
...     if val != 'eof' and frame is not None:
...         img, t = frame
...         # display img

Writing a video file:

.. code-block:: python

>>> from ffpyplayer.writer import MediaWriter
>>> from ffpyplayer.pic import Image

>>> w, h = 640, 480
>>> # write at 5 fps.
>>> out_opts = {'pix_fmt_in':'rgb24', 'width_in':w, 'height_in':h,
...     'codec':'rawvideo', 'frame_rate':(5, 1)}
>>> writer = MediaWriter('output.avi', [out_opts])

>>> # Construct image
>>> size = w * h * 3
>>> buf = bytearray([int(x * 255 / size) for x in range(size)])
>>> img = Image(plane_buffers=[buf], pix_fmt='rgb24', size=(w, h))

>>> for i in range(20):
...     writer.write_frame(img=img, pts=i / 5., stream=0)

Converting images:

.. code-block:: python

>>> from ffpyplayer.pic import Image, SWScale
>>> w, h = 500, 100
>>> size = w * h * 3
>>> buf = bytearray([int(x * 255 / size) for x in range(size)])

>>> img = Image(plane_buffers=[buf], pix_fmt='rgb24', size=(w, h))
>>> sws = SWScale(w, h, img.get_pixel_format(), ofmt='yuv420p')

>>> img2 = sws.scale(img)
>>> img2.get_pixel_format()
'yuv420p'
>>> planes = img2.to_bytearray()
>>> map(len, planes)
[50000, 12500, 12500, 0]
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].