HTML5 and UPNP/DLNA Questions.
Posted: Wed Aug 28, 2013 1:29 pm
Note: Testing on UMS 2.6.5 / 3.0.0-a3 / 3.0.0-a4 --all same result-- below is from 3.0.0-a4
SO ok.. just for shits and giggles i wanted to see if i could build a HTML POC (proof of concept) .CONF file
(which i think might need work...)
My browser test is Chrome 29.
So as my base i'm using this as my TEST.html page:
Im finding that the video does not play is this becasue when i use UPnP Inspector the src path is not right?
i also find that if i use this for my TEST2.html:
it streams BEAUTIFULLY so i know that my MP4 is built correctly.
So what is the actual path to get the video from UMS?
SO ok.. just for shits and giggles i wanted to see if i could build a HTML POC (proof of concept) .CONF file
(which i think might need work...)
Code: Select all
#-----------------------------------------------------------------------------
# Profile for Chrome HTML5.
#
#
# This configuration profile serves two purposes:
#
# - Allow UMS to recognize a specific connecting renderer
# - Define the possibilities of that renderer
#
#-----------------------------------------------------------------------------
# RENDERER INFORMATION
#
# RendererName: Determines the name that is displayed in the UMS user
# interface when this renderer connects.
RendererName = Chrome Browser
# RendererIcon: Determines the icon that is displayed in the UMS user
# interface when this renderer connects. By default, these icons are
# bundled with UMS in ums.jar, but they can easily be customised:
# http://www.ps3mediaserver.org/forum/viewtopic.php?f=6&t=3507&p=49536#p49536
RendererIcon = Images/Chrome.png
#-----------------------------------------------------------------------------
# RENDERER RECOGNITION
#
# When a renderer connects, it sends a "User-Agent" header. UMS tries to
# match that header with all configuration profiles. If none of the profiles
# match, the message "Unknown User-Agent:" will be displayed in the logs and
# UMS will switch to a default profile.
#
# Because matching involves all renderer configuration profiles, it is
# important to match as long a string as possible. This increases the chances
# that a match is unique. Version numbers are best avoided.
#
# To learn the exact headers of any renderer, set the logging level in
# "logback.xml" to "TRACE" and look for messages like "Received on socket:".
#
# ============================================================================
# Chrome HTML5 uses the following strings:
#
User-Agent: Chrome
# ---
# Chrome
# User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.57 Safari/537.36
#
# ============================================================================
#
# UserAgentSearch: Optional regular expression to detect a connected renderer.
# The expression is case insensitive. When the expression is empty User-Agent
# headers are not used, this is the default. Note that one renderer can use
# several different User-Agent headers.
#
# Examples:
#
# UserAgentSearch = Platinum/.*DLNADOC/|yxplayer2|MPlayer |NSPlayer/
# UserAgentSearch = Windows-Media-Player-DMS|Microsoft-Windows
#
# Ignoring the "UPnP/1.0" and "UPnP/1.0 DLNADOC/1.50" headers since they are
# too general, plus they can be detected from the additional header.
UserAgentSearch = Chrome
# UserAgentAdditionalHeader: Optional additional HTTP header for better
# detection. When defined, UMS also considers this header when trying to find
# a match. Even when the standard UserAgentSearch match fails, this extra
# header can provide a positive match.
# UserAgentAdditionalHeader =
# UserAgentAdditionalHeaderSearch: Regular expression to search for in the
# additional HTTP header.
# UserAgentAdditionalHeaderSearch =
#-----------------------------------------------------------------------------
# BASIC CAPABILITIES
#
# This indicates to UMS what kind of media the renderer can handle. Files that
# the renderer cannot handle will be hidden from it.
#
# Video: Set to "true" if the renderer can play video.
Video = true
# Audio: Set to "true" if the renderer can play audio.
Audio = true
# Image: Set to "true" if the renderer can display images.
Image = true
#-----------------------------------------------------------------------------
# DLNA SETTINGS
#
# SeekByTime: Set to true to use the DLNA feature seek-by-time instead of
# the default seek-by-byte method.
#
# Valid values:
#
# true:
#
# The renderer supports seek-by-time.
#
# false:
#
# The renderer doesn't support seek-by-time, so it should
# only use the default seek-by-byte method.
#
# exclusive:
#
# While most renderers that support seek-by-time also support
# seek-by-byte, some (e.g. the PS3 [1] and Panasonic TVs [2])
# behave unreliably if both are permitted when transcoding files.
# This option works around this by disabling seek-by-byte for
# transcoded files when permitting seek-by-time.
#
# The default is false.
#
# [1] Seeking via "Go To" with the PS3 (firmware 4.31) and MEncoder works with "exclusive", but hangs or crashes with "true".
# [2] http:#www.ps3mediaserver.org/forum/viewtopic.php?f=6&t=15841
#SeekByTime = exclusive
# DLNALocalizationRequired: Serve different flavors of localization in the
# DLNA parameters (PAL/NTSC, NA/EU/JP) to allow every world wide renderer to
# see the files. Important for Sony Bravia TVs.
#DLNALocalizationRequired = false
# CBRVideoBitrate is useful for renderers without SeekByTime support. It does time2byte conversion to support FF/RW.
# Only possibility how to predict where we are when seeking is using CBR bitrate instead of VBR used by default
# Creating a CBR stream with MEncoder is 3 times slower than using VBR so bear this in mind if you have a slow computer!
# Speed can hopefully be optimized a little bit in the future:
# http:#www.ps3mediaserver.org/forum/viewtopic.php?f=14&t=8883&p=53706&hilit=ditlew#p53700
# http:#www.ps3mediaserver.org/forum/viewtopic.php?f=11&t=11284&p=62765&hilit=1835#p62765
# CBRVideoBitrate=15000
# ByteToTimeseekRewindSeconds is used for fine-tuning, so the default is 0
# ByteToTimeseekRewindSeconds=0
#-----------------------------------------------------------------------------
# MEDIAINFO
#
# MediaInfo: Set to "true" if UMS should parse files with MediaInfo. This will
# give UMS more accurate information, speed up browsing and prevent potential
# playback errors. It also enables the use of "Supported" to more accurately
# define the supported formats for the renderer.
# MediaInfo = true
# CreateDLNATreeFaster: Use faster method to create the DLNA tree using the
# MediaInfo library. Since this is a UPnP specification violation, it is not
# supported by some renderers and false by default.
CreateDLNATreeFaster = true
#-----------------------------------------------------------------------------
# TRANSCODING AND MUXING CAPABILITIES
#
# It is very likely that a renderer cannot render all file formats. If this is
# the case, UMS should transcode or mux the file to a format that the renderer
# can display. This section defines the format that UMS should transcode or
# mux to.
#
# TranscodeVideo: Profile to use for transcoding video files.
# One of the following:
#
# Profile Video Audio Container
# ---------------------------------------------
# MPEGPSAC3 MPEG-2 AC-3 MPEG-PS
# MPEGTSAC3 MPEG-2 AC-3 MPEG-TS
# H264TSAC3 H.264 AC-3 MPEG-TS
# WMV: WMV 2 (WMV 8) WMA 2 ASF
#
# XXX MPEGPSAC3 was previously named MPEGAC3. The old name is deprecated.
# These profiles are supported by the MEncoder, FFmpeg and VLC engines.
# Default: MPEGPSAC3
#TranscodeVideo = H264TSAC3
# TranscodeAudio: Profile to use for transcoding audio files
# Currently supported: "LPCM", "MP3" or "WAV".
# Default: LPCM
#TranscodeAudio = MP3
# DefaultVBVBufSize: Whether or not to use the default DVD buffer size. Setting
# this to "false" means a greater bitrate and faster encoding, but it can
# generate incompatible videos dependent on the renderer.
#DefaultVBVBufSize = false
# MuxH264ToMpegTS: Set to "true" if the media renderer supports H.264 and MPEG-2
# in a MPEG-TS file. Ignored if MediaInfo = true.
#MuxH264ToMpegTS = false
# MuxDTSToMpeg: Set to "true" if the media renderer supports DTS in an MPEG
# file. Ignored if MediaInfo = true.
#MuxDTSToMpeg = false
# WrapDTSIntoPCM: Set to "true" if the media renderer supports DTS wrapped
# into LPCM in a MPEG file.
#WrapDTSIntoPCM = false
# MuxLPCMToMpeg: Set to "true" if the media renderer supports LPCM in an MPEG
# file. Ignored if MediaInfo = true.
#MuxLPCMToMpeg = false
# MaxVideoBitrateMbps: The maximum bitrate supported by the media renderer.
# Setting to "0" means unlimited.
# If computer is low on resources it is better to avoid using bandwidth limit which is much CPU demanding
# It is better to lower quality settings by defining "CustomMencoderQualitySettings".
# By lowering quality also bitrate is decreased but it is not so CPU aggresive so it is preferred to use it this way
#MaxVideoBitrateMbps = 0
# MaxVideoWidth: Maximum width supported by the media renderer. Setting to "0"
# means unlimited. This setting is ignored for files matching "Supported"
# formats when MediaInfo = true.
#MaxVideoWidth = 0
# MaxVideoHeight: Maximum height supported by the media renderer. Setting to
# "0" means unlimited. This setting is ignored for files matching "Supported"
# formats when MediaInfo = true.
#MaxVideoHeight = 0
# H264Level41Limited: Set to "true" if the media renderer supports only H.264
# L4.1 at most.
#H264Level41Limited = true
# TranscodeAudioTo441kHz: Set to "true" if music files need to be resampled at
# 44.1kHz.
#TranscodeAudioTo441kHz = false
# TranscodeFastStart: Set to "true" if the renderer has a short timeout delay
# and needs to receive transcoded video with minimal delay. If set to "false",
# UMS will take some time to buffer some of the transcoded video.
#TranscodeFastStart = true
# TranscodedVideoFileSize: The amount of transcoded data is unknown at the
# time of transcoding. Still, some renderers expect a size for the video file
# to be returned. Possible values are:
# 0: No size is sent to the renderer (default value)
# 100000000000: Fake size of 100 GB is sent to the renderer.
# -1: Specific value that works perfect for the PS3. It is against
# the DLNA spec though.
#TranscodedVideoFileSize = 0
# MimeTypesChanges: A list of mimetype transformations in the format
# "old/mime1=new/mime1|old/mime2=new/mime2|...". Ignored if MediaInfo = true.
#MimeTypesChanges =
# TranscodeExtensions: Comma separated list of file extensions that are forced
# to be transcoded and never streamed. Best left empty if MediaInfo = true,
# and define "Supported" formats instead.
#TranscodeExtensions =
# StreamExtensions: Comma separated list of file extensions that are forced
# to be streamed and never transcoded. Best left empty if MediaInfo = true,
# and define "Supported" formats instead.
#StreamExtensions =
# ForceJPGThumbnails: Some renderers (e.g. Sony Bravia TVs and Blu-ray
# players) require thumbnails to be represented as JPEGs (JPEG_TN) in the
# DLNA directory XML. Set this to true to force PMS to fake this representation.
# Note: this has no effect on real thumbnail file formats or content-type headers.
#ForceJPGThumbnails = false
# ThumbnailAsResource: Set to true if the renderer requires the use of the
# "res" element instead of the "albumArtURI" element for thumbnails in DLNA
# reponses. E.g. Samsung 2012 models do not recognize the "albumArtURI"
# element.
# Default value is false, i.e. use "albumArtURI"
# ThumbnailAsResource =
# ChunkedTransfer: Some renderers are particular about the "Content-Length"
# headers in requests (e.g. Sony Blu-ray players). By default, UMS will send
# a "Content-Length" that refers to the total media size, even if the exact
# length is unknown. Default value is false. Set this option to true to omit
# sending a length when it is unknown.
#ChunkedTransfer = False
# CustomMencoderQualitySettings: Overrides the MEncoder transcoding quality
# settings in UMS for this renderer. Default is empty, which means the UMS
# settings will be used.
#CustomMencoderQualitySettings =
# CustomMencoderOptions: Overrides the MEncoder custom options in UMS for
# this renderer. Default is empty, which means the UMS
# settings will be used.
#CustomMencoderOptions = -b 1500k -vcodec libx264 -vpre slow -vpre baseline -g 30 -o
#-channels 2 -lavdopts debug=0:threads=4 -lavcopts vcodec=mpeg4:acodec=libmp3lame:abitrate=128:keyint=0:vqscale=1:vqmin=1 -vf softskip,expand=::::1:16\/9:4 -lavdopts fast -mc 0.1 -af lavcresample=44100 -srate 44100 -o
#hold
# :abitrate=192:threads=8:keyint=0:vqscale=1:vqmin=1:vrc_maxrate=8192:vrc_buf_size=8192 -vf scale=1280:720 -aid 0 -nosub -noautosub -ofps 24000/1001 -lavdopts fast -mc 0.1 -af lavcresample=44100 -srate 44100
#
# SubtitleHttpHeader: Some devices recognize a custom HTTP header for
# retrieving the contents of a subtitles file. Set this option to the name of
# that custom header and UMS will send the URL for the subtitles file in that
# header (e.g. Samsung devices recognize the "CaptionInfo.sec" header).
# Default value is "", which means UMS will not send such header information.
#SubtitleHttpHeader =
# KeepAspectRatio: Some renderers like Panasonic TV internally rescale the video.
# This option sets the MEncoder custom options "-vf softskip,expand=::::1:16\/9:4"
# internally and set up keep aspect ratio for FFmpeg.
# Set this option to true to keep the original movie aspect ratio.
# Default value is false.
KeepAspectRatio = true
# RescaleByRenderer: Works only for FFmpeg and together with KeepAspectRatio. Normally
# the renderer is rescaling the video. If set this option to false the UMS will do that.
# It can make better video quality but the CPU and bandwidth are more utilised and can
# produce jerking video on WiFi.
# Default value is true.
#RescaleByRenderer =
#-----------------------------------------------------------------------------
# Other useful hidden params and their default values if not defined:
#
# Display audio tag in TRANSCODE folder if defined in container (useful to find out correct audio track like commentary etc.)
# ShowAudioMetadata = true
# Display subtitle tag in TRANSCODE folder if defined in container (showing subtitles info like forced, full, documentary etc.)
# ShowSubMetadata = true
# Some renderers can't show length of DVD titles so it will add it directly to title name to be shown
# ShowDVDTitleDuration = false
# Specified extension will be added to every file shared by UMS
# UseSameExtension = null
# ????????????????????????????
# DLNAProfileChanges = null
# PN is defined for every file sent to the renderer via DLNAOrgPN value. If
# this value is wrong, the renderer may refuse listing or playing this file.
# When it is set to false, no DLNAOrgPN is sent to renderer, which can help
# with troubleshooting.
# The PN is a description of the file, e.g. AVC_TS_HD_60_AC3_ISO
# Most renderers require this to be true.
# DLNAOrgPN = true
# ????????????????????????????
# MediaParserV2_ThumbnailGeneration = false
#-----------------------------------------------------------------------------
# IMAGES
#
# AutoExifRotate: Many cameras store information in the image file about the
# orientation of the camera while the picture was taken, allowing viewers to
# know which way was up. Set this option to "true" to allow UMS to rotate JPEG
# files based on EXIF information contained in the file, and relieve the
# renderer of that task.
AutoExifRotate = true
#-----------------------------------------------------------------------------
# SUPPORTED MEDIA FORMATS
#
# This section defines which media formats are supported by this renderer. If
# a file is supported and its mediainfo indicates that it falls within the
# capabilities of this renderer, UMS will stream the file to the renderer. All
# other files will be transcoded to the format specified in "TranscodeVideo"
# or "TranscodeAudio" before being sent to the renderer.
#
# Each format that the renderer supports should result in a "Supported" line
# that defines the capabilities of the renderer. When MediaInfo = true, media
# files are parsed and their properties are matched against all "Supported"
# lines. If a value for a specific property cannot be parsed, that property
# is assumed to match.
#
# The order of the "Supported" lines matters: when multiple lines match, the
# first match is used.
#
# The media parser and this configuration file will recognize the following
# formats and codecs. Use lower case names only. Regular expressions are
# supported.
#
# aac (Advanced Audio Codec)
# ac3 (Audio Coding 3)
# aiff (AIFF)
# alac (Apple Lossless)
# ape (Monkey's Audio)
# atrac (Atrac)
# avi (AVI container)
# bmp (Bitmap)
# divx (DivX Video)
# dts (Digital Theater Systems)
# dtshd (Digital Theater Systems)
# dv (Digital Video)
# eac3 (Extended AC3)
# flac (Free Lossless Audio Codec)
# flv (Flash Video)
# gif (GIF)
# h264 (H.264)
# jpg (JPEG)
# lpcm (Linear PCM)
# mjpeg (M-JPEG)
# mkv (Matroska)
# mov (Quicktime container, Apple)
# mp3 (MPEG Audio Layer 3)
# mp4 (ISOM/MPEG4 container, or MPEG4 codec)
# mpa (MPEG Audio)
# mpc (MusePack)
# mpeg1 (Codec used in VCD)
# mpeg2 (Codec used in DVD Videos and HDTV)
# mpegps (MPEG presentation stream, used in DVD Videos, VCDs, etc.)
# mpegts (MPEG transport stream, used in sat TV, Blu-ray discs (BDAV) etc.)
# ogg (Ogg Vorbis)
# png (PNG)
# ra (Real Audio)
# rm (Real Media, RMVB)
# tiff (TIFF)
# truehd (TrueHD)
# vc1 (VC-1)
# wavpac (WavPack)
# wav (WAVE file)
# wma (Windows Media Audio)
# wmv (Windows Media Video, tag also used for asf files)
#
# und (Undetermined, if the parser did not recognize one of above)
#
# Each of the "Supported" lines contains the following parameters separated by
# spaces or tabs:
#
# f: Regular expression to match the format of a file as parsed by the
# MediaInfo library (see the list above). This parameter is mandatory.
# Be careful when matching everything with ".+"; the renderer must be
# able to handle all formats.
#
# v: Regular expression to match the video codec of the file as parsed by
# the MediaInfo library (see the list above).
#
# a: Regular expression to match the audio codec of the file as parsed by
# the MediaInfo library (see the list above).
#
# m: The MIME type to send to the renderer. Use of this parameter is
# strongly recommended. If it is not set, an estimated value will be
# assigned.
#
# n: The maximum number of audio channels used in the file as parsed by
# the MediaInfo library.
#
# s: The maximum audio sample frequency used in the file as parsed by
# the MediaInfo library, specified in Hertz.
#
# b: The maximum audio bit rate used in the file as parsed by the
# MediaInfo library, specified in bits per second.
#
# w: The maximum video width used in the file as parsed by the MediaInfo
# library, specified in pixels.
#
# h: The maximum video height used in the file as parsed by the MediaInfo
# library, specified in pixels.
#
# qpel: Quarter pixel codec setting in the file as parsed by the MediaInfo
# library.
#
# gmc: The number of global motion compensation warp points in the file as
# parsed by the MediaInfo library.
#
#
# ============================================================================
#
# Definition and Usage
# The <video> tag specifies video, such as a movie clip or other video streams.
#
# Currently, there are 3 supported video formats for the <video> element: MP4, WebM, and Ogg:
#
# Browser MP4 WebM Ogg
# Internet Explorer 9+ YES NO NO
# Chrome 6+ YES YES YES
# Firefox 3.6+ NO YES YES
# Safari 5+ YES NO NO
# Opera 10.6+ NO YES YES
# MP4 = MPEG 4 files with H264 video codec and AAC audio codec
# WebM = WebM files with VP8 video codec and Vorbis audio codec
# Ogg = Ogg files with Theora video codec and Vorbis audio codec
# MIME Types for Video Formats
# Format MIME-type
# MP4 video/mp4
# WebM video/webm
# Ogg video/ogg
#
# The <audio> tag defines sound, such as music or other audio streams.
#
# Currently, there are 3 supported file formats for the <audio> element: MP3, Wav, and Ogg:
#
# Browser MP3 Wav Ogg
# Internet Explorer 9+ YES NO NO
# Chrome 6+ YES YES YES
# Firefox 3.6+ NO YES YES
# Safari 5+ YES YES NO
# Opera 10+ NO YES YES
#
# MIME Types for Audio Formats
# Format MIME-type
# MP3 audio/mpeg
# Ogg audio/ogg
# Wav audio/wav
# Supported video formats:
Supported = f:mp4 v:mp4|h264 a:aac m:video/mp4 n:2
Supported = f:webm v: a: m:video/webm n:2
Supported = f:ogg v: a: m:video/ogg n:2
# Supported audio formats:
Supported = f:wav n:2 s:48000 m:audio/wav
Supported = f:mp3 n:2 m:audio/mpeg
Supported = f:ogg n:2 m:audio/ogg
# Supported image formats:
Supported = f:jpg m:image/jpeg
Supported = f:png m:image/png
Supported = f:gif m:image/gif
Supported = f:tiff m:image/tiff
So as my base i'm using this as my TEST.html page:
Code: Select all
<!DOCTYPE HTML>
<html>
<body>
<video height="360" width="640" preload="none" controls>
<source src="http://172.10.1.10:1337/get/0$1$2$21/Avatar.2008.mp4" type="video/mp4">
Your browser does not support HTML5 video.
</video>
</body>
</html>
i also find that if i use this for my TEST2.html:
Code: Select all
<!DOCTYPE HTML>
<html>
<body>
<video height="360" width="640" preload="none" controls>
<source src="E:\Media\Movies\!Blu-Ray\Avatar.2009.mp4" type="video/mp4">
Your browser does not support HTML5 video.
</video>
</body>
</html>
So what is the actual path to get the video from UMS?