• SEARCH
  • DOWNLOADS
  • MY ACCOUNT
  • Buy (0)
  • CONTACT
  • Free Trial
Wowza Logo
  • PRODUCTS
    • Products

      • Wowza ClearCaster
      • Facebook Live appliance
      • Wowza Streaming Cloud
      • Cloud streaming services
      • Wowza Streaming Engine
      • Streaming server software
      • Wowza GoCoder & SDK
      • Mobile capture and encoding app
    • Capabilities

      • CDN
      • Ultra Low Latency
      • SRT
      • Player
      • WebRTC
      • Live Transcoding
      • See All Capabilities
  • DOCS & APIS

      Docs & APIs

      • Getting Started
      • User Guides
      • Technical Articles
      • Video Tutorials
      • API & SDK Docs
  • SOLUTIONS
    • Streaming Types

      • Live Video Streaming
      • Video on Demand
      • Audio-Only Streaming
      • IP Camera Streaming
      • VR and 360° Streaming
      • Chat
    • Industries

      • Broadcast & OTT
      • Education
      • Enterprise
      • Government
      • Live Events
      • Live Sports
      • Religious Organizations
    • Streaming Solutions

      • MediaDS—Integrated Streaming Device
      • Streaming Service Providers
      • Live Mobile Broadcasting
  • PRICING
    • Wowza ClearCaster

      • Facebook Live appliance
      • Starting at $2,995
      • Add to Cart
      • Request a Demo
    • Wowza Streaming Cloud

      • Cloud streaming services
      • Starter Plan: $49/month
      • Add to Cart
      • See All Plans
    • Wowza Streaming Engine

      • Streaming server software
      • Annual Plan: $65/month
      • Add to Cart
      • See All Plans
    • Wowza GoCoder SDK

      • SDK for mobile streaming
      • Talk to a Streaming Expert
      • Contact Us
      • Free Trial
  • RESOURCES

      Resources

      • Blog
      • Case Studies
      • Webinars
      • Videos
      • Podcasts
      • Test Players
      • Developer Tools
  • SUPPORT
    • Support

      • Forums
      • Software Updates
      • Open a Support Ticket
    • Plans & Services

      • Support Plans
      • Advisory Services
      • Live Event Support
  • My Account
  • Buy (0)
  • SEARCH
  • Ask a question
  • Forums
    • Wowza ClearCaster
    • Wowza Streaming Engine
    • Wowza Streaming Cloud
    • Wowza Player
    • Wowza GoCoder SDK
    • Wowza Developer Dojo
    • Topics
    • Questions
    • Users
    • Badges
  • Sign in
  • Community Home /
  • Wowza Developer Dojo /
  • Wowza Streaming Engine REST API /
avatar image
Question by Marcelo Henrique Carneiro · Apr 26, 2016 at 06:02 PM · wowza streaming engine rest api

REST API V.4 - Append to the same file not working.

Hi, i'm working in a node.js module to start and stop streaming from my own schedule.

Using the default Body params to start the stream not working to appending to the same file when restarting the same stream channel.

I'll paste the default Body params here, because i've tried to change all the fields, file patters and the file continue to put the version number at the end, mystream_0.mp4, 1.mp4 so on.

curl -X POST --header 'Accept:application/json; charset=utf-8' --header 'Content-type:application/json; charset=utf-8' http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/live/instances/_definst_/streamrecorders/myStream -d '

{

"restURI":"http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/live/instances/_definst_/streamrecorders/myStream",

"recorderName":"myStream",

"instanceName":"_definst_",

"recorderState":"Waiting for stream",

"defaultRecorder":true,

"segmentationType":"None",

"outputPath":"[output-path]",

"baseFile":"myrecord2.mp4",

"fileFormat":"MP4",

"fileVersionDelegateName":"com.wowza.wms.livestreamrecord.manager.StreamRecorderFileVersionDelegate",

"fileTemplate":"${BaseFileName}_${RecordingStartTime}_${SegmentNumber}",

"segmentDuration":900000,

"segmentSize":10485760,

"segmentSchedule":"0 * * * * *",

"recordData":true,

"startOnKeyFrame":true,

"splitOnTcDiscontinuity":false,

"option":"Version existing file",

"moveFirstVideoFrameToZero":true,

"currentSize":0,

"currentDuration":0,

"recordingStartTime":""

}'

Also how can i just start the streaming and not create a new one, like i do with Stop Stream, just passing the stream name and the action?.

Thanks in advance.

Marcelo.
Comment

People who like this

0 Show 0
10 |600 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image

Answer by Marcelo Henrique Carneiro · May 03, 2016 at 03:14 PM

No help on this issue someone?

tried with:

<Streams>

<StreamType>live</StreamType>

<StorageDir>${com.wowza.wms.context.VHostConfigHome}/content</StorageDir>

<KeyDir>${com.wowza.wms.context.VHostConfigHome}/keys</KeyDir>

<!-- LiveStreamPacketizers (separate with commas): cupertinostreamingpacketizer, smoothstreamingpacketizer, sanjosestreamingpacketizer, mpegdashstreamingpacketizer, cupertinostreamingrepeater, smoothstreamingrepeater, sanjosestreamingrepeater, mpegdashstreamingrepeater, dvrstreamingpacketizer, dvrstreamingrepeater -->

<LiveStreamPacketizers>cupertinostreamingpacketizer, mpegdashstreamingpacketizer, sanjosestreamingpacketizer, smoothstreamingpacketizer</LiveStreamPacketizers>

<!-- Properties defined here will override any properties defined in conf/Streams.xml for any streams types loaded by this application -->

<Properties>

<Property>

<Name>versionFile</Name>

<Value>false</Value>

<Type>Boolean</Type>

</Property>

<Property>

<Name>appendFile</Name>

<Value>true</Value>

<Type>Boolean</Type>

</Property>

</Properties>

</Streams>

No lucky, bellow my body params:

var bodyparam = {

"restURI" : WowzaApiProxy.REST_URL + "/streamrecorders/" + streamName,

"recorderName" : streamName,

"instanceName" : "_definst_",

"recorderState" : "",

"defaultRecorder" : false,

"segmentationType" : "None",

"outputPath" : "/Library/WowzaStreamingEngine-4.4.1/content/",

"baseFile" : streamName + '.mp4',

"fileFormat" : "MP4",

"fileVersionDelegateName" : "com.wowza.wms.livestreamrecord.manager.StreamRecorderFileVersionDelegate",

"fileTemplate" : "${BaseFileName}",

"segmentDuration" : 900000,

"segmentSize" : 10485760,

"segmentSchedule" : "0 * * * * *",

"recordData" : true,

"startOnKeyFrame" : true,

"splitOnTcDiscontinuity" : false,

"option" : " --- ",

"moveFirstVideoFrameToZero" : true,

"currentSize" : 0,

"currentDuration" : 0,

"recordingStartTime" : ""

};

As per docs the field "segmentationType" : "None" should be doing the work to append to the same file, but no lucky too.

Really need some help on this, don't know more what to try.

Thanks in advance.

M
Comment

People who like this

0 Show 2 · Share
10 |600 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Matt Young · May 04, 2016 at 04:06 AM 0
Share
Hello Marcelo

The "option" parameter allows for the following values:

"Append to existing file"
"Version existing file"
"Overwrite existing file"


So your query would have to include the following:

curl -X POST --header 'Accept:application/json; charset=utf-8' --header 'Content-type:application/json; charset=utf-8' http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/live/instances/_definst_/streamrecorders -d '
{
 "restURI":"http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/live/instances/_definst_/streamrecorders",
 "recorderName":"myStream",
"instanceName":"_definst_",
"recorderState":"Waiting for stream",
"defaultRecorder":true,
"segmentationType":"None",
...
"option":"Append to existing file",
...
}'


Your Wowza access logs should indicate that this has occurred:

INFO server comment - StreamRecorder[live/_definst_] recordStream:  action:startRecording stream:myStream format:mp4 versioning:append .... 


Thanks,

Matt
avatar image Marcelo Henrique Carneiro Matt Young · May 04, 2016 at 02:55 PM 0
Share
Thanks a bunch Matt.

It works. Are you part of the developer team?

We should not have Options been defined with white-space and camel case, etc. Well, at least in my entire programming life i never saw it, maybe in the old ages but i can't remember.

As the REST API is still fresh and maybe it will change, ok, but until that you guys definitely need to include it on that API Request Examples.

Also i could not found it in my localhost REST Swagger Docs ( http://localhost:xxxx/api-docs), also for each params there described we just have the param type (string, Number, ....). So also need to put there all the options for each property available.

Just my view point, don't want to cross the line and also i'm not complaining about, you guys do a awesome job, i can just thanks Wowza. But trying to help and point some issues is kind of "thanks" too.

Best regards,

Marcelo.
avatar image

Answer by Matt Young · May 05, 2016 at 08:06 AM

Hello Marcelo

We definitely appreciate the feedback! Currently we are working towards providing more in-depth documentation for the REST API and striving to improve the functionality upon each release. Thank you for taking the time to send us your thoughts & suggestions!

Thanks again,

Matt
Comment

People who like this

0 Show 0 · Share
10 |600 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

2 People are following this question.

avatar image avatar image

Related Questions

REST Api smil example ? 3 Answers

What is the "REST API is not licensed" error cause? 3 Answers

Live to VOD clip extraction: notification on completion? 1 Answer

add custom property ModuleSecureURLParams api wowza ? 2 Answers

Swagger API: 201 created 0 Answers

Hot Topics
  • AWS Hosting
  • Mobile SDK
  • Deployment Options
  • Load Balancing
  • Content Security
Product Sign-in
  • Wowza Streaming Cloud
  • Wowza Player
Under the Hood
  • Developer Tools
  • Wowza System Status
  • Test Players
  • Developer IDE
Resellers
  • Find a Reseller
  • Reseller Portal
  • Become a Reseller
Company
  • About Us
  • Blog
  • News
  • Events
  • Careers
  • Customers
  • Partners
  • Contact Us
Stay Connected
Get Monthly Newsletter
Select a Language
  • English
    • English
    • Español
    • 日本語
    • 한국어
    • हिन्दी भाषा
    • 中文
    • русский язык

© 2005–2018 Wowza Media Systems, LLC. All rights reserved.   Terms | Privacy | Trademarks | Legal


Enterprise
Social Q&A

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Create an article
  • Forums
  • Wowza ClearCaster
  • Wowza Streaming Engine
  • Wowza Streaming Cloud
  • Wowza Player
  • Wowza GoCoder SDK
  • Wowza Developer Dojo
  • Explore
  • Topics
  • Questions
  • Users
  • Badges