Jump to content
  • 0

Options for automating the configuration of the VoD Folder Path


Hussein Badakhchani
 Share

Question

Hello,

I would like to understand the options for automating the configuration of the VoD Folder Path. 

Is it possible to configure the VoD Folder path using a REST API call once the Antmedia server is installed  ? If so can you possibly share an example of call from curl?

Alternatively which files would I need to alter/add to change the default VoD Folder Path?

Thanks,
Hoos
 


Link to comment
Share on other sites

  • Answers 8
  • Created
  • Last Reply

Top Posters For This Question

8 answers to this question

Recommended Posts

  • 0
For us, even better than a REST API would be a Java API exposed through a plug-in or other interface.  We'd like to get a callback (1) that lets us specify the store location for the VoD file, and (2) another callback when the VoD file has been finalized, along with the full path.  then we can post-process or upload the file, etc.


Link to comment
Share on other sites

  • 0
Hi Hussein,

Thank you for your great question. Yes, you can configure VOD Folder in REST API. 


For example 

Change Setting request in here http://<Server-IP>:5080/rest/changeSettings/<App>

But the system will not allow it because you do not have permission. You can override this permission by deleting AuthenticationFilter. Here is AuthenticationFilter >> https://github.com/ant-media/ManagementConsole_WebApp/blob/master/src/main/webapp/WEB-INF/web.xml#L72

I'm hoping that I was able to answer your queries, Hussein.
Please feel free to get back to us if you still have any questions.
Link to comment
Share on other sites

  • 0
Hello Selim,

Thanks for the response, I think it will work. We'll be rolling out 10's, 100's and then maybe 1000s of Antmedia nodes so it maybe easier to hardcode the VoD directory. In which configuration file is the VoD Folder stored? Is is just a XML stanza that I can add to web.xml or another file?

Cheers,
Hoos


Link to comment
Share on other sites

  • 0
For future reference here are the details:

Disable the authentication filter in .../webapps/root/WEB-INF/web.xml

Execute the API call (here using curl)

curl -v --header "Content-Type: application/json" \
  --request POST \
  --data '{"vodFolder":"/var/vod"}' \

validate the change using 


You should see in the response:

...,"vodFolder":"/var/vod",...

Remember to enable the authentication filter before restarting Antmedia.
Link to comment
Share on other sites

  • 0
Thanks, Selim.  I'm afraid I wasn't clear: I wasn't referring to webhooks, which are very heavyweight (compared to a Java method call) and which are called after the fact, but rather a Java API that would allow us to write a code to, for example:

(1) compute and return the VoD storage path to be used for a recording that's about to start.  That is, this needs to run before the recording starts, and it needs to return a value to the recording method.

(2) receive the local pathname in the filesystem to trigger a postprocessor, etc.  This is also not something you can do with a webhook, given that it's a file name, not a URL.

So, just to be clear, I'm talking about Java code that runs within the Ant (Spring) context.  Red 5 offers a plugin mechanism, though it requires some kludges to get it to support both cases I've listed.

Link to comment
Share on other sites

  • 0
Hi Herb,

I get your points. We can provide a kind of solution for you. 
Ant Media Server can call a specific script after recording has finished. It calls the script with local pathname as a parameter. I mean you can write custom shell script for doing some specific things.

Unfortunately, there is not a version for running a script for a stream about to start. We may think adding a support like that. 

Btw, I think you can also use web hooks for post processor as well. I mean you can write a custom rest method on top of Ant Media Server and connect it to the webhooks.  If you need help for doing that I can provide some more details.

How does it sound?

Best Regards,
Selim
Link to comment
Share on other sites

 Share

×
×
  • Create New...