Class StreamRecorderParameters
All members of this class are public and therefore can be accessed and modified directly.
-
Field Summary
FieldsModifier and TypeFieldDescriptionlong
Configures the number of milliseconds of packets to pull from the incoming stream buffer and write to file, before before beginning the recording.boolean
Configures the default search position for audio before starting to record.Configures the output file formatConfigures the file version template string used by the default fileVersionDelegate, to generate a versioned file name for the recorder
NOTE: if set to null then a default file template string, as defined by StreamRecorderFileVersionDelegate, will be usedConfigures the fileVersionDelegate for the recorder
Valid values are the fully qualified class path to the class which implements the IStreamRecorderFileVersionDelegate interface.
Default value iscom.wowza.wms.livestreamrecord.manager.StreamRecorderFileVersionDelegate
boolean
Configures whether or not the recorder will set the first packet's timecode to 0, when recording fileFormat is FORMAT_MP4Configures the StreamRecorder listener for the recorder
Valid values are the fully qualified class path to the class which implements the IStreamRecorderActionNotify interface.Configures the output file name used for the recording
If segmentationType is not SEGMENT_NONE, then this value is used as the base file name for the file segments when using either of the fileVersionDelegates
NOTE 1: When set to null or "", the recorder will create the filename based upon the stream name and the value of fileFormat.Configures the output directory where recorded file will be written
NOTE: When set to null or "", the recorder will write files to the default content directory for the application.boolean
Configures whether or not the recorder will write data packets to the output file.Configures the type of recording segmentation the recorder will use
Segmentation provides a means by which the recording of an incoming live stream can be split into a series of files in order to manage them more easily.long
Configures the output file size in milliseconds for each recording segment, when segmentationType is SEGMENT_BY_DURATION.
This value is specified in millisecondsConfigures the crontab schedule used to segment a recording, when segmentationType is SEGMENT_BY_SCHEDULE.long
Configures the output file size in bytes for each recording segment, when segmentationType is SEGMENT_BY_SIZE.
This value is specified in bytesint
Configures the audio timeout when waiting for audio sync.boolean
Configures whether or not the recorder will create a new segment for a recording when packet timecode discontinuities are detected
A discontinuity is said to occur when 10 consecutive packets have timecodes which jump backward in time.boolean
Configures whether or not the recorder will wait until a video key frame is received to start writing packets to the output file, thus ensuring the first packet in the file contains a video key frame.long
Configures the timescale in milliseconds for the recordingConfigures the behavior when a new recording file is created with a name that already exists -
Constructor Summary
ConstructorsConstructorDescriptionStreamRecorderParameters
(IApplicationInstance appInstance) The constructor will read any defaults set via properties in application.xml and will use those values as the default values for this class.StreamRecorderParameters
(IApplicationInstance appInstance, StreamRecorderParameters params) The constructor will copy another StreamRecorderParameters object. -
Method Summary
-
Field Details
-
segmentationType
Configures the type of recording segmentation the recorder will use
Segmentation provides a means by which the recording of an incoming live stream can be split into a series of files in order to manage them more easily. The files can be limited by; size, duration, or split at a specific time (e.g. at the top of every hour). If SEGMENT_NONE is used, then the recording is written to a single file.Valid values are defined in IStreamRecorderConstants
-
versioningOption
Configures the behavior when a new recording file is created with a name that already existsNOTE: APPEND_FILE and OVERWRITE_FILE are only applicable when the segmentationType is SEGMENT_NONE
Valid values are defined in IStreamRecorderConstants
-
fileFormat
Configures the output file formatValid values are defined in IStreamRecorderConstants
-
startOnKeyFrame
public boolean startOnKeyFrameConfigures whether or not the recorder will wait until a video key frame is received to start writing packets to the output file, thus ensuring the first packet in the file contains a video key frame.Valid values are true, false
default value is true -
recordData
public boolean recordDataConfigures whether or not the recorder will write data packets to the output file.Valid values are true, false
default value is false -
moveFirstVideoFrameToZero
public boolean moveFirstVideoFrameToZeroConfigures whether or not the recorder will set the first packet's timecode to 0, when recording fileFormat is FORMAT_MP4
Valid values are true, false
default value is true -
splitOnTcDiscontinuity
public boolean splitOnTcDiscontinuityConfigures whether or not the recorder will create a new segment for a recording when packet timecode discontinuities are detected
A discontinuity is said to occur when 10 consecutive packets have timecodes which jump backward in time. i.e. the current packet's timecode is less than the previous packet's timecode.Valid values are true, false
default value is false -
backBufferTime
public long backBufferTimeConfigures the number of milliseconds of packets to pull from the incoming stream buffer and write to file, before before beginning the recording. This parameter is typically used with manual recordings to mitigate the delay between a start recording request and when data is actually written to file, thus ensuring that the beginning of an event is recorded to file.
This value is in milliseconds.
default value is 0
NOTE: The incoming stream buffer contains approximately 8 seconds of packets -
segmentSize
public long segmentSizeConfigures the output file size in bytes for each recording segment, when segmentationType is SEGMENT_BY_SIZE.
This value is specified in bytesValid values are any positive long value greater than 0, however a minimum size of 1048576 bytes (1 MB) is highly recommended to ensure the recorded file segments can start on a video key frame if configured to do so.
default value is 10485760 bytes (10 MB) -
segmentDuration
public long segmentDurationConfigures the output file size in milliseconds for each recording segment, when segmentationType is SEGMENT_BY_DURATION.
This value is specified in millisecondsValid values are any positive long value greater than 0, however a minimum size of 60000 ms (1 minute) is highly recommended to ensure the recorded file segments can start on a video key frame if configured to do so.
default value is 900000 ms (15 minutes) -
segmentSchedule
Configures the crontab schedule used to segment a recording, when segmentationType is SEGMENT_BY_SCHEDULE.
Crontab expressions
A crontab expression specifies the segmentation interval in minutes, hours, months, years, days of the month, or days of the week. The available crontab fields are (in order):
[Minute] [Hour] [Day_of_the_Month] [Month_of_the_Year] [Day_of_the_Week] [Year]
where:
Minute - Specifies the minute value (between 0 and 59) at which the segmentation occurs.
Hour - Specifies the hour (between 0 and 23 based on a 24-hour clock) at which the segmentation occurs.
Day_of_the_Month - Specifies the day (between 0 and 31) at which the split occurs. To specify that live recordings always be segmentation on the last day of the month, specify 31.
Month_of_the_Year - Specifies the month at which the segmentation occurs. You can specify the month by using the abbreviated name of the month (for example, Jan) or a numerical equivalent (for example, 1).
Day_of_the_Week - Specifies the day in a week at which the segmentation occurs. You can specify the day by using the abbreviated name of the day (for example, Mon) or a numerical equivalent (for example, 1).
Year - Specifies the year at which the segmentation occurs (for example, 2013).
Example
To segmentation a live recording every 30 minutes (at the top of each hour and every half-hour):
0,30 * * * * *
0,30 (simplified version)
for more details see (http://www.nncron.ru/help/EN/working/cron-format.htm).
Note: The nnCron nonstandard question mark character (?), which specifies that the server startup time is substituted into the cron expression, is NOT currently supported.Valid values are any valid crontab expression exception for '?'
default value is "0 * * * * *" (segment every hour at the top of the hour) -
outputFile
Configures the output file name used for the recording
If segmentationType is not SEGMENT_NONE, then this value is used as the base file name for the file segments when using either of the fileVersionDelegates
NOTE 1: When set to null or "", the recorder will create the filename based upon the stream name and the value of fileFormat. NOTE 2: The fileFormat will be appended to the file name to ensure the file extension matches the actual file format written.Example
mytestRecording
, with no fileFormat specified will result in the default fileFormat being used and a recorded file name ofmytestRecording.mp4
myOtherTest.mp4
, with the the fileFormat specified as 1 (FLV), will result in the recorded file name ofmyOtherTest.mp4.flv
Valid values are any valid filename
default value is null -
outputPath
Configures the output directory where recorded file will be written
NOTE: When set to null or "", the recorder will write files to the default content directory for the application.Examples
c:\myfiles\recordings
/home/user/myfiles/recordings
Valid values are any valid path.
default value is null -
notifyListener
Configures the StreamRecorder listener for the recorder
Valid values are the fully qualified class path to the class which implements the IStreamRecorderActionNotify interface. default value is null
- See Also:
-
fileVersionDelegate
Configures the fileVersionDelegate for the recorder
Valid values are the fully qualified class path to the class which implements the IStreamRecorderFileVersionDelegate interface.
Default value iscom.wowza.wms.livestreamrecord.manager.StreamRecorderFileVersionDelegate
-
fileTemplate
Configures the file version template string used by the default fileVersionDelegate, to generate a versioned file name for the recorder
NOTE: if set to null then a default file template string, as defined by StreamRecorderFileVersionDelegate, will be usedValid values are null or a valid file version template string
Default value is null
- See Also:
-
timeScale
public long timeScaleConfigures the timescale in milliseconds for the recordingThis value is in milliseconds.
default value is 90000
NOTE: There are only two valid values 90000 and 100000 -
defaultAudioSearchPosition
public boolean defaultAudioSearchPositionConfigures the default search position for audio before starting to record.
Default value is LiveStreamRecorderBase.DEFAULT_FORCE_AUDIO_SEARCH -
skipKeyFrameUntilAudioTimeout
public int skipKeyFrameUntilAudioTimeoutConfigures the audio timeout when waiting for audio sync. This value is in milliseconds.
default balue is LiveStreamRecorderBase.DEFAULT_SKIPKEYFRAMESUNTILAUDIOTIMEOUT
-
-
Constructor Details
-
StreamRecorderParameters
The constructor will read any defaults set via properties in application.xml and will use those values as the default values for this class.- Parameters:
appInstance
-
-
StreamRecorderParameters
The constructor will copy another StreamRecorderParameters object.- Parameters:
appInstance
-params
-
-