<%doc> USAGE DOCUMENTATION :: PLEASE LEAVE THIS AT THE TOP OF THIS FILE For Mako templating syntax documentation please visit: http://docs.makotemplates.org/en/latest/ Filename: stream_data.html Version: 0.1 Variable names: data [list] data :: Usable parameters == Global keys == media_type Returns the type of session. Either 'episode' or 'movie'. title Returns the name of the episode or movie. user Returns the name of the user. transcode_video_dec Returns the video transcode decision. Either 'transcode', 'copy' or 'direct play'. transcode_video_codec Returns the name of the video codec for any transcode session. transcode_height Returns the value of the video height for any transcode session. transcode_width Returns the value of the video width for any transcode session. transcode_audio_dec Returns the audio transcode decision. Either 'transcode', 'copy' or 'direct play'. transcode_audio_codec Returns the name of the audio codec for any transcode session. transcode_audio_channels Returns the number of audio channels for any transcode session. transcode_container Returns the type of container for any transcode session. container Returns the type of container for the original media. height Returns the value of the video height for the original media. bitrate Returns the value of the video bitrate for the original media. width Returns the value of the video width for the original media. aspect_ratio Returns the value of the video aspect ratio for the original media. video_framerate Returns the value of the video framerate for the original media. video_codec Returns the name of the video codec for the original media. audio_codec Returns the name of the audio codec for the original media. audio_channels Returns the number of audio channels for the original media. == Only if 'media_type' is 'episode' == grandparent_title Returns the name of the TV Show. DOCUMENTATION :: END % if data: <% from plexpy.common import VIDEO_RESOLUTION_OVERRIDES, AUDIO_CODEC_OVERRIDES %>

#### % if data['media_type'] == 'episode' or data['media_type'] == 'track': Stream Info: ${data['grandparent_title']} - ${data['title']} (${user}) % else: Stream Info: ${data['title']} (${user}) % endif

% if data['current_session']:
Current session. Updated stream details below may be delayed.
% endif

| Stream Details | Source Details
--- | --- | ---

Media
Bitrate | ${data['stream_bitrate']} kbps | ${data['bitrate']} kbps
% if data['media_type'] != 'track':
Resolution | ${VIDEO_RESOLUTION_OVERRIDES.get(data['stream_video_resolution'], data['stream_video_resolution'])} | ${VIDEO_RESOLUTION_OVERRIDES.get(data['video_resolution'], data['video_resolution'])}
% endif
Quality | ${data['quality_profile']} | -
% if data['optimized_version'] == 1:
Optimized Version | - | ${data['optimized_version_profile']} (${data['optimized_version_title']})
% endif % if data['synced_version'] == 1:
Synced Version | - | ${data['synced_version_profile']}
% endif

Container | ${data['stream_container_decision']}
--- | ---
Container | ${data['stream_container'].upper()} | ${data['container'].upper()}

% if data['media_type'] != 'track':

Video | ${data['stream_video_decision']}
--- | ---
Codec | ${data['stream_video_codec'].upper()} ${'(HW)' if data['transcode_hw_encoding'] else ''} | ${data['video_codec'].upper()} ${'(HW)' if data['transcode_hw_decoding'] else ''}
Bitrate | ${data['stream_video_bitrate']} kbps | ${data['video_bitrate']} kbps
Width | ${data['stream_video_width']} | ${data['video_width']}
Height | ${data['stream_video_height']} | ${data['video_height']}
Framerate | ${data['stream_video_framerate']} | ${data['video_framerate']}
Aspect Ratio | - | ${data['aspect_ratio']}

% endif

Audio | ${data['stream_audio_decision']}
--- | ---
Codec | ${AUDIO_CODEC_OVERRIDES.get(data['stream_audio_codec'], data['stream_audio_codec'].upper())} | ${AUDIO_CODEC_OVERRIDES.get(data['audio_codec'], data['audio_codec'].upper())}
Bitrate | ${data['stream_audio_bitrate']} kbps | ${data['audio_bitrate']} kbps
Channels | ${data['stream_audio_channels']} | ${data['audio_channels']}

% if data['subtitles'] == 1:

Subtitles | ${data['stream_subtitle_decision']}
--- | ---
Codec | ${data['stream_subtitle_codec'].upper()} | ${data['subtitle_codec'].upper()}

% endif
% endif