Index of Objects
StartTime: The beginning of the specified time interval; a long int value; the number of 100-nanosecond intervals that have elapsed since January 1, 0001 at 00:00:00.000 in the Gregorian calendar.
StopTime: The end of the specified time interval, a long int value; a long int value; the number of 100-nanosecond intervals that have elapsed since January 1, 0001 at 00:00:00.000 in the Gregorian calendar.
<EPGRequest xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">
<TVServiceID>814324611156</TVServiceID>
<StartTime>2143246111560000</StartTime>
<StopTime>2143246119280000</StopTime>
</EPGRequest>"
<EPGSearch xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">
<MatchType>StartsWith</MatchType>
<TextType>Title</TextType>
<TextToSearch>easte</TextToSearch>
<LimitToDateRange>false</LimitToDateRange>
</EPGSearch>
SeriesRequestSubType: One of the SeriesRequestSubTypes values.
KeepUntil: One of the KeepUntilTypes values.
"<?xml version=\"1.0\" encoding=\"utf-16\"?> <RecordingRequest xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">
<RequestCreationDate>2010-10-14T21:32:13.5344+01:00</RequestCreationDate>
<RequestType>OneTime</RequestType>
<SeriesRequestSubType>ThisChannelThisTime</SeriesRequestSubType>
<FirstRunOnly>false</FirstRunOnly>
<KeepNumberOfEpisodes>0</KeepNumberOfEpisodes>
<TVProgrammeID>5910974516426290</TVProgrammeID>
<StartTime>0001-01-01T00:00:00</StartTime>
<ServiceID>0</ServiceID>
<Duration>0</Duration>
<MCChannelID>0</MCChannelID>
<KeepUntil>NotSet</KeepUntil>
<Quality>-1</Quality>
<Prepadding>60</Prepadding>
<Postpadding>60</Postpadding>
</RecordingRequest>"
RECORD A SERIES:
"<?xml version=\"1.0\" encoding=\"utf-16\"?>
<RecordingRequest xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">
<RequestCreationDate>2010-10-14T21:32:47.3094+01:00</RequestCreationDate>
<RequestType>Series</RequestType>
<SeriesRequestSubType>ThisChannelAnyTime</SeriesRequestSubType>
<FirstRunOnly>false</FirstRunOnly>
<KeepNumberOfEpisodes>0</KeepNumberOfEpisodes>
<TVProgrammeID>5910974516414091</TVProgrammeID>
<StartTime>0001-01-01T00:00:00</StartTime>
<ServiceID>0</ServiceID>
<Duration>0</Duration>
<MCChannelID>0</MCChannelID>
<KeepUntil>NotSet</KeepUntil>
<Quality>-1</Quality>
<Prepadding>60</Prepadding>
<Postpadding>60</Postpadding>
</RecordingRequest>"
1. Simple request using pre-defined quality:
<MediaStreamingRequest xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">
<StreamingType>HttpLiveStreaming</StreamingType>
<InputFile>C:\\Users\\Public\\Videos\\Sample Videos\\Wildlife.wmv</InputFile>
<Quality>2</Quality>
<StartAt>0</StartAt>
<UseAudioStreamIndex>0</UseAudioStreamIndex>
<UseCustomParameters>false</UseCustomParameters>
<ClientID>name_of_your_client</ClientID>
<ClientDevice>browser</ClientDevice>
<CustomParameters />
</MediaStreamingRequest>
<MediaStreamingRequest xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">
<StreamingType>HttpLiveStreaming</StreamingType>
<InputFile>C:\\Users\\Public\\Videos\\Sample Videos\\Wildlife.wmv</InputFile>
<Quality>0</Quality>
<StartAt>0</StartAt>
<UseAudioStreamIndex>0</UseAudioStreamIndex>
<UseCustomParameters>true</UseCustomParameters>
<ClientID>silverpotato</ClientID>
<ClientDevice>browser</ClientDevice>
<CustomParameters>
<Description>High</Description>
<CustomFFMpegTemplate />
<FrameWidth>512</FrameWidth>
<FrameHeight>384</FrameHeight>
<BitRateDeviation>100k</BitRateDeviation>
<AudioCodec>MP3</AudioCodec>
<AudioBitRate>48k</AudioBitRate>
<AudioSampleRate>48000</AudioSampleRate>
<AudioVolumePercent>100</AudioVolumePercent>
<X264SubQ>6</X264SubQ>
<X264Level>0</X264Level>
<X264Profile />
<VideoBitRate>600k</VideoBitRate>
<MotionSearchRange>16</MotionSearchRange>
<Partition_I4x4>true</Partition_I4x4>
<Partition_I8x8>true</Partition_I8x8>
<Partition_P8x8>true</Partition_P8x8>
<SegmentDuration>4</SegmentDuration>
<OutputSquarePixels>true</OutputSquarePixels>
<DeInterlace>false</DeInterlace>
</CustomParameters>
</MediaStreamingRequest>
There follows some notes on the various parameters.
Quality
An integer that specifies pre-defined encoding settings - generally, the higher the number the greater the bitrate and size.
This number should be one of the MediaStreamingQuality constants.
StartAt
Begin playback from this point into the file. Specified in seconds.
UseAudioStreamIndex
If several audio streams are available (as retrieved by the probe method), then
this specifies the index of the stream to be decoded.
UseCustomParameters
If this is set to 'True', then the Quality setting is ignored. Instead, an XML element, named CustomParameters should follow, setting out
explicitly the various encoding settings that should be used.
CustomParameters
A set of VideoEncodingParameters
<Description>High</Description>
<CustomFFMpegTemplate />
<FrameWidth>512</FrameWidth>
<FrameHeight>384</FrameHeight>
<BitRateDeviation>100k</BitRateDeviation>
<AudioCodec>MP3</AudioCodec>
<AudioBitRate>48k</AudioBitRate>
<AudioSampleRate>48000</AudioSampleRate>
<AudioVolumePercent>100</AudioVolumePercent>
<X264SubQ>6</X264SubQ>
<X264Level>0</X264Level>
<X264Profile />
<VideoBitRate>600k</VideoBitRate>
<MotionSearchRange>16</MotionSearchRange>
<Partition_I4x4>true</Partition_I4x4>
<Partition_I8x8>true</Partition_I8x8>
<Partition_P8x8>true</Partition_P8x8>
<SegmentDuration>4</SegmentDuration>
<OutputSquarePixels>true</OutputSquarePixels>
<DeInterlace>false</DeInterlace>
</CustomParameters>
FrameWidth, FrameHeight
The size in pixels of the encoded frame, including any letterboxing or pillarboxing.
AspectRatio
For example, '4:3'. It is recommended not to set this parameter, and the value will be automatically determined at the time of streaming.
VideoBitRate
The audio bitrate to use when encoding the video. Ensure you have a high enough bitrate for your proposed FrameWidth/FrameHeight.
See the 'Quality' parameter above for some sensible suggested defaults for various
frame sizes.
AudioBitRate
The audio bitrate to use when encoding the video. In general, '48k' is sensible for lower bitrates and '64k' is ample for
higher bitrates. Unusual values can produce non-standard streams that may not play back on certain devices.
AudioCodec
Can be MP3 or AAC
X264Level
The constraint level for X264 encoding. If zero, this is ignored. Can be set, e.g. to 30 to produce valid streams for the original iPhone 3G
X264Profile
The X264 profile to use for encoding - baseline or main. If blank/null, this is ignored. Set to "baseline" to produce valid streams for the original iPhone 3G
SegmentDuration
To produce an HTTP Live Stream, a server splits ('chunks') a video into segments of equal duration. By default, Remote Potato sets this as 4 seconds which
provides seekable video without too much buffering. You can alter this value by specifying a different value, in seconds.
Partition_I4x4, Partition_I8x8, Partition_P8x8
H264 encoding parameters. If in doubt set to 'True', 'True', 'False'.
DeInterlace
If you know the source file is from a television recording, you may wish to set this to True. The default is False.
Additional parameters
Not all parameters are mentioned here. In general, the encoding parameters correspond with those passed to the
ffmpeg encoder, which uses X264
to encode the video. See the ffmpeg documentation for more information.
<WTVStreamingVideoRequest xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">
<Quality>Normal</Quality>
<FileName>C:\\Users\\Public\\Recorded TV\\Two and a Half Men_Viva_2010_03_30_20_59_00.wtv</FileName>
<StartAtTicks>0</StartAtTicks>
</WTVStreamingVideoRequest>"
Low
Normal
Med
High
UltraHigh
Custom
To choose your own encoding options, set the parameter 'Quality' to the string 'Custom' then also pass all of these parameters:
| PARAMETER | EXAMPLE |
|---|---|
| CustomFrameHeight | 320 (multiple of 2) |
| CustomFrameWidth | 240 (multiple of 2) |
| CustomEncoderFPS | 25 |
| CustomEncoderSmoothness | 40 (from 10-100) |
| CustomVideoBitrate | 60000 |
FullPath
GetDurationOfMediaFiles: If this is set to TRUE then the server assumes the files are media files and attempts to retrieve duration information for them as part of its response.
Alternatively, to obtain the root folders of a known media library, use one of the following values for FullPath:
PICTURES_LIBRARY
VIDEO_LIBRARY
... </TVService>
IsDRMProtected: If set to TRUE the programme cannot be streamed.
SeriesID: If the TV Programme is part of a series, all shows in the same series will have the same Series ID.
GuideImageUri: A Uri, if available, that corresponds to a thumbnail representing the TV Programme or TV series.
<Id>5910974516452936</Id>
<MCProgramID>3940649679285032</MCProgramID>
<Title>The Hole</Title>
<ServiceID>8162774324610962</ServiceID>
<Description>Thriller about four students at a British public school who decide to spend a weekend of delinquency and revelry in an abandoned bomb shelter while playing truant from a school field trip - but the prank goes awfully wrong.</Description>
<StartTime>634226985000000000</StartTime>
<StopTime>634227060000000000</StopTime>
<IsHD>false</IsHD>
<IsFirstShowing>false</IsFirstShowing>
<IsSeries>false</IsSeries>
<IsDRMProtected>false</IsSeries>
<ProgramType>Movie</ProgramType>
<StarRating>4</StarRating>
<HasSubtitles>true</HasSubtitles>
<OriginalAirDate>631737792000000000</OriginalAirDate>
<SeriesID>0</SeriesID>
<IsLongTermTenant>false</IsLongTermTenant>
<isGeneratedFromFile>false</isGeneratedFromFile>
<GuideImageUri></isGeneratedFromFile>
</TVProgramme>
<ID>10133099166914591</ID>
<RequestType>Series</RequestType>
<Title>All Our Working Lives Revisited</Title>
<ServiceID>8162774324611156</ServiceID>
<Priority>58880</Priority>
<SeriesID>8725724283265902</SeriesID>
</RPRequest>
<Id>10977524097603602</Id>
<RPRequestID>9288674237339651</RPRequestID>
<TVProgrammeID>5910974516452936</TVProgrammeID>
<State>Scheduled</State>
<SeriesID>0</SeriesID>
<RequestType>OneTime</RequestType>
<Title>The Hole</Title>
<KeepUntil>-4</KeepUntil>
<Quality>0</Quality>
<Partial>false</Partial>
<ManualRecordingStartTime>0001-01-01T00:00:00</ManualRecordingStartTime>
<ManualRecordingDuration>0</ManualRecordingDuration>
<ManualRecordingServiceID>0</ManualRecordingServiceID>
</RPRecording>
- A collection of RPRequest objects
- A collection of RPRecording objects
- A collection of TVProgramme objects
<RPRecordingsBlob xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">
<RPRequests>
<RPRequest>
...
</RPRequest>
</RPRequests>
<RPRecordings>
<RPRecording>
...
</RPRecording>
</RPRecordings>
<TVProgrammes>
<TVProgramme>
...
</TVProgramme>
</TVProgrammes>
</RPRecordingsBlob>"
The other showings are broken into two collections: Other Showings In Series, and 'Other Showings Of This', both being collections of TVProgramme objects.
<TVProgrammeInfoBlob xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">
<TVProgrammeId>3940649679413543</TVProgrammeId>
<Crew>
<Id>0</Id>
<TVProgrammeId>0</TVProgrammeId>
</Crew>
<OtherShowingsInSeries>
<TVProgramme>
...
</TVProgramme>
</OtherShowingsInSeries>
<OtherShowingsOfThis>
<TVProgramme>
...
</TVProgramme>
</OtherShowingsOfThis>
</TVProgrammeInfoBlob>"
ErrorMessage: This can be ignored if the result is OK
<RecordingResult xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">
<Completed>true</Completed>
<Success>true</Success>
<RequestResult>OK</RequestResult>
<ErrorMessage>An unknown error occurred.</ErrorMessage>
<WereConflicts>false</WereConflicts>
<GeneratedRecordingsBlob>
<RPRequests>
<RPRequest>
<ID>9288674233131510</ID>
<RequestType>OneTime</RequestType>
<Title>American Idol</Title>
<ServiceID>8162774324620349</ServiceID>
<Priority>22016</Priority>
<SeriesID>0</SeriesID>
</RPRequest>
</RPRequests>
<RPRecordings>
<RPRecording>
<Id>10977524093395456</Id>
<RPRequestID>9288674233131510</RPRequestID>
<TVProgrammeID>5910974511949223</TVProgrammeID>
<State>Scheduled</State>
<SeriesID>0</SeriesID>
<RequestType>OneTime</RequestType>
<Title>American Idol</Title>
<KeepUntil>-4</KeepUntil>
<Quality>0</Quality>
<Partial>false</Partial>
<ManualRecordingStartTime>0001-01-01T00:00:00</ManualRecordingStartTime>
<ManualRecordingDuration>0</ManualRecordingDuration>
<ManualRecordingServiceID>0</ManualRecordingServiceID>
</RPRecording>
</RPRecordings>
<TVProgrammes>
<TVProgramme>
<Id>5910974511949223</Id>
<MCProgramID>3940649674826266</MCProgramID>
<Title>American Idol</Title>
<ServiceID>8162774324620349</ServiceID>
<Description>The search for America's newest pop sensation continues with the final set of auditions, which come from San Francisco, California. Will any of the hopefuls manage to impress judges Randy Jackson, Jennifer Lopez and Aerosmith's Steven Tyler? Presented by Ryan Seacrest.</Description>
<StartTime>634331280000000000</StartTime>
<StopTime>634331319000000000</StopTime>
<IsHD>false</IsHD>
<IsFirstShowing>true</IsFirstShowing>
<IsSeries>true</IsSeries>
<IsDRMProtected>false</IsDRMProtected>
<ProgramType>None</ProgramType>
<StarRating>0</StarRating>
<HasSubtitles>false</HasSubtitles>
<OriginalAirDate>634328928000000000</OriginalAirDate>
<SeriesID>8725724278104424</SeriesID>
<IsLongTermTenant>false</IsLongTermTenant>
<isGeneratedFromFile>false</isGeneratedFromFile>
</TVProgramme>
</TVProgrammes>
</GeneratedRecordingsBlob>
</RecordingResult>
<ArrayOfAVStream xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">
<AVStream>
<StreamIndex>0</StreamIndex>
<CodecName>wmav2</CodecName>
<Channels>2</Channels>
<CodecType>Audio</CodecType>
<AudioCodecSubType>Unset</AudioCodecSubType>
<Width>0</Width>
<Height>0</Height>
<DurationSeconds>30.09</DurationSeconds>
<Language>eng</Language>
</AVStream>
<AVStream>
<StreamIndex>1</StreamIndex>
<CodecName>vc1 (advanced)</CodecName>
<Channels>0</Channels>
<CodecType>Video</CodecType>
<AudioCodecSubType>Unset</AudioCodecSubType>
<Width>1280</Width><Height>720</Height>
<DurationSeconds>30.09</DurationSeconds>
<Language>eng</Language>
</AVStream>
</ArrayOfAVStream>
Further clarification on some of the less obvious parameters follows:
StreamIndex
A unique integer that represents the stream. In the case of files with multiple audio streams, this can be referenced in a
MediaStreamingRequest
to indicate which audio stream should be used.
Channels (Audio streams only)
This is set to 1 for a mono stream, or 2 for stereo. Values greater than 2 indicate surround sound.
CodecName
This is an internal name that represents the audio/video codec used to encode the stream. Clients may wish to use this
to guard against incompatibilities or playback issues caused by certain codecs.
<Completed>true</Completed>
<Success>true</Success>
<ErrorText />
<LiveStreamingIndexPath>/httplivestream/41404/index.m3u8</LiveStreamingIndexPath>
<ResultCode>OK</ResultCode>
<StreamerID>41404</StreamerID>
<FrameWidth>320</FrameWidth>
<FrameHeight>240</FrameHeight>
</MediaStreamingResult>
If the value of 'Success' is not 'True', then the operation failed and the client should display the contents of the 'ErrorText' XML Element to the user to indicate the reason for failure.
If the operation succeeded, the new HTTP Live Stream can be accessed by pointing a suitable media player at the streaming URL. The streaming URL is calculated by appending the value of the 'LiveStreamingIndexPath' element to the base URL of the server.
For example, if the Remote Potato Server is located at http://www.mypotato.com:9080/ then, given the example response above, the media player should attempt to open the URL http://www.mypotato.com:9080/httplivestream/41404/index.m3u8 to play the stream.
The object indicates the success / failure of this request along with any additional relevant information.
<WTVStreamingVideoResult xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">
<Port>9081</Port>
<StreamerID>12345</StreamerID>
<ResultCode>OK</ResultCode>
<ResultString />
</WTVStreamingVideoResult>"
Arrays of such objects are returned by methods such as /xml/filebrowse/dir/
Name: The file name, with extension. Does not include full path information; to get this, check the parameters of the parent object, e.g. FileBrowseResult.
Size: The size of the item, in bytes.
Duration: The duration of a media file. This is only set if the FileBrowseRequest had the GetDurationOfMediaFiles flag set to TRUE.
<IsDirectory>true</IsDirectory>
<Name>C:\Users\john\Videos</Name>
<Size>0</Size>
<Duration>0</Duration>
</BrowseItem>
The object contains lists of folders and files within the requested folder, plus additional information.
Success: Did the method complete successfully. If not, check the ErrorText property to see why not.
Directories: An array of BrowseItems representing the folders
Files: An array of BrowseItems representing the files.
ErrorText: A string containing any error information
<Success>true</Success>
<ErrorText>OK</ErrorText>
<BaseDirectory> C:\Users\john </BaseDirectory> <Directories>
<BrowseItem>
<IsDirectory>true</IsDirectory>
<Name>C:\Users\john\Videos</Name>
<Size>0</Size>
<Duration>0</Duration>
</BrowseItem>
</Directories>
<Files >
<BrowseItem>
<IsDirectory>false</IsDirectory>
<Name>videofile.avi</Name>
<Size>0</Size>
<Duration>0</Duration>
</BrowseItem>
</Files >
</FileBrowseResult>
