public class StreamRecorderParameters
extends Object
| Modifier and Type | Field | Description |
|---|---|---|
long |
backBufferTime |
Configures the number of milliseconds of packets to pull from the incoming stream buffer and write to file, before before beginning the recording.
|
boolean |
defaultAudioSearchPosition |
Configures the default search position for audio before
starting to record.
|
String |
fileFormat |
Configures the output file format
|
String |
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 used |
IStreamRecorderFileVersionDelegate |
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 is com.wowza.wms.livestreamrecord.manager.StreamRecorderFileVersionDelegate |
boolean |
moveFirstVideoFrameToZero |
Configures whether or not the recorder will set the first packet's timecode to 0, when recording fileFormat is FORMAT_MP4
|
IStreamRecorderActionNotify |
notifyListener |
Configures the StreamRecorder listener for the recorder
Valid values are the fully qualified class path to the class which implements the IStreamRecorderActionNotify interface. |
String |
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. |
String |
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. |
boolean |
recordData |
Configures whether or not the recorder will write data packets to the output file.
|
String |
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. |
long |
segmentDuration |
Configures the output file size in milliseconds for each recording segment, when segmentationType is SEGMENT_BY_DURATION.
This value is specified in milliseconds |
String |
segmentSchedule |
Configures the crontab schedule used to segment a recording, when segmentationType is SEGMENT_BY_SCHEDULE.
|
long |
segmentSize |
Configures the output file size in bytes for each recording segment, when segmentationType is SEGMENT_BY_SIZE.
This value is specified in bytes |
int |
skipKeyFrameUntilAudioTimeout |
Configures the audio timeout when waiting for audio sync.
|
boolean |
splitOnTcDiscontinuity |
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 |
startOnKeyFrame |
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 |
timeScale |
Configures the timescale in milliseconds for the recording
|
String |
versioningOption |
Configures the behavior when a new recording file is created with a name that already exists
|
| Constructor | Description |
|---|---|
StreamRecorderParameters(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.
|
public long backBufferTime
This value is in milliseconds.
default value is 0
NOTE: The incoming stream buffer contains approximately 8 seconds of packets
public boolean defaultAudioSearchPosition
public String fileFormat
Valid values are defined in IStreamRecorderConstants
public String fileTemplate
Valid values are null or a valid file version template string
Default value is null
StreamRecorderFileVersionDelegatepublic IStreamRecorderFileVersionDelegate fileVersionDelegate
com.wowza.wms.livestreamrecord.manager.StreamRecorderFileVersionDelegatepublic boolean moveFirstVideoFrameToZero
Valid values are true, false
default value is true
public IStreamRecorderActionNotify notifyListener
IStreamRecorderActionNotifypublic String outputFile
Example
mytestRecording, with no fileFormat specified will result in the default fileFormat being used and a recorded file name of mytestRecording.mp4
myOtherTest.mp4, with the the fileFormat specified as 1 (FLV), will result in the recorded file name of myOtherTest.mp4.flv
Valid values are any valid filename
default value is null
public String outputPath
Examples
c:\myfiles\recordings
/home/user/myfiles/recordings
Valid values are any valid path.
default value is null
public boolean recordData
Valid values are true, false
default value is false
public String segmentationType
Valid values are defined in IStreamRecorderConstants
public long segmentDuration
Valid 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)
public String segmentSchedule
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)
public long segmentSize
Valid 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)
public int skipKeyFrameUntilAudioTimeout
public boolean splitOnTcDiscontinuity
Valid values are true, false
default value is false
public boolean startOnKeyFrame
Valid values are true, false
default value is true
public long timeScale
This value is in milliseconds.
default value is 90000
NOTE: There are only two valid values 90000 and 100000
public String versioningOption
NOTE: APPEND_FILE and OVERWRITE_FILE are only applicable when the segmentationType is SEGMENT_NONE
Valid values are defined in IStreamRecorderConstants
public StreamRecorderParameters(IApplicationInstance appInstance)
appInstance - public StreamRecorderParameters(IApplicationInstance appInstance, StreamRecorderParameters params)
appInstance - params -