-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Recently had to write something custom to get the stream frame rate. Here's what I wrote
# Fetch status
l1 = vlc_client.fetch_status()
# Get frame rate
frame_rate = l1['information']['category']['Stream 0'].get('Frame_rate')
Might want to find a way to incorporate getting FPS from the stream. I'm using it to calculate the estimated current frame position.
# Fetch media length and current position
length = vlc_client.media_length()
position = vlc_client.position()
# Check if position is available
if position is not None and frame_rate is not None:
# Calculate current position in terms of frames
current_frame = int((length * float(frame_rate)) * position)
stefets
Metadata
Metadata
Assignees
Labels
No labels