FFmpeg based player

FFmpegPlayer can play USB cameras, video files, etc using ffpyplayer.

class cpl_media.ffmpeg.FFmpegPlayer(**kw)

Bases: BasePlayer

Wrapper for ffpyplayer ffmpeg based player.

_config_props_: Tuple[str] = ('play_filename', 'file_fmt', 'icodec', 'dshow_true_filename', 'dshow_opt', 'use_dshow', 'dshow_rate', 'dshow_filename')

A list of configurable property names of the class that is set/read by the configuration API.

Each sub/super-class can define this and the properties are accumulated across all the sub/super-classes.

apply_config_property(name, value)

(internal) used by the config system to set the special config data of the player.

dshow_filename

The name of the dshow camera to open.

dshow_names

All the cameras that can be opened.

dshow_opt

The camera options associated with dshow_true_filename when dshow is used.

dshow_opts

The options supported by the cameras that can be opened.

dshow_rate

The frame rate to request from the dshow camera.

dshow_true_filename

The real and complete filename of the direct show (webcam) device.

file_fmt

The format used to play the video. Can be empty or a format e.g. mjpeg for webcams.

icodec

The codec used to open the video stream with if it needs to be specified for the camera.

parse_dshow_opt(opt)

Parses the dshow_opts type string option into (fmt, (w, h), (rmin, rmax))

play_filename

The filename of the media being played. Can be e.g. a filename etc.

play_thread_run()

The method that runs in the internal play thread.

player_callback(mode, value)

Called internally by ffpyplayer when an error occurs internally.

post_config_applied()

Handles settings as applied by the app config system so the properties are set to correct values.

refresh_dshow()

Refreshes list of direct show cameras available.

update_dshow_file()

Updates the dshow camera name and options in response to a re-configuration.

use_dshow

Whether we use dshow - i.e. USB webcams, or normal media sources.

class cpl_media.ffmpeg.FFmpegSettingsWidget(player=None, **kwargs)

Bases: BoxLayout

Settings widget for FFmpegPlayer.

player: FFmpegPlayer = None

The player.

set_filename(text_wid, paths)

Called by the GUI to set the filename.

class cpl_media.ffmpeg.LogFilter

Bases: object

FFmpeg log filter that removes specific messages that are repeated.

filtered_end: str = '[rtbufsize parameter])! frame dropped!'

Remove repeated messages that end with this string.

start_filter()

Start the filter.