Wowza Community

How do i get the file name after streaming stopped?


I want get the file name after streaming ended and saved in the content folder.

Every time the filename increased by _+1. So how do get that name?


Was this for nDVR recording or an mp4 to play back as VOD @prashant jha?

You are correct @prashant jha, Wowza Streaming Engine appends _[SegmentNumber] to the end of the file name of the current recording as needed to create a unique file name. This is done incrementally for the group of files that belong to the same recording session:

myStream_2014-02-11- recordingmyStream_2014-02-11- recording

To get the names please see the following article and I have shared some examples below:

The default delegate allows you to specify a template string that defines the filenames of the recorded segments.

  • public void setFileTemplate(String template) - Enables a custom filename template string to be specified.
  • public String getFileTemplate() - Returns the current filename template string.

The template string can contain any valid filename characters as well as any valid template key, in any order.

These strings are for used with:

  • Start Recording Segment By Size
  • Start Recording Segment By Duration
  • Start Recording Segment By Schedule

Valid template keys are:

  • ${SourceStreamName} - The name of the live stream.
  • ${SegmentNumber} - An incrementing value that represents the current number of recorded segments that have been created for this live stream, starting at 0.
  • ${RecordingStartTime} - The time at which the recording was started.
  • ${SegmentTime} - The time at which the recorded segment was created.

Let me know if that is what you needed…