The easiest way to get a video or audio file into Vidrovr is to use our uploader endpoint. Simply curl a video there and it will be processed into the system. Please note all parameters are passed as form data parameters. We currently accept audio and video as acceptable upload types. Our uploading infrastrcture supports the following list of formats:
Here is an example shell request:
curl -X POST "https://dev.vidrovr.com/upload/uploader" \
-H "Content-Type: multipart/form-data" \
--data-raw "id"="example_user" \
--data-raw "password"="$password" \
--data-raw "filename"="FileName" \
--data-raw "data"="$data" \
--data-raw "api_key"="2d68d9e17625bc233c1db9f8d5b427a0"
Example of a successful response:
{
"msg":"you just have to play nice",
"id":"c0e4641ed361f76e57bc679f383d9b49315ff97b-f889-4f3e-9efb-eafb7f00d43d",
"resp":"upload_success"
}
Note: The id refers to a uniqle video asset id for the video that was uploaded to the Vidrovr system, this id can be used in metadata and asset retrieval across the whole vidrovr platform. This id is unique and will not be changed.
Vidrovr has implemented a webhooks interface for progrmatically managing the upload and retreival of metadata from our system in an asynchrnous way.
If after reading this you are still having difficulties getting it to work, feel free to reach out to the team and they will be more than willing to help! The best way to do this is to email support@vidrovr.com
So here goes – hang on this should not be a bumpy ride :-)
The webhook upload serves as a endpoint for programmatic uploading. Where notification requests are made by the Vidrovr service once an asset(s) has completed processing, and all of the metdata associated for a video has been generated.
The method takes a json data body and parses it in order to understand the requested parameters.
Please note, this method does not require any specific file to be explicitly uploaded to Vidrovr endpoint, simply point Vidrovr to to the correct publicly avaiable download_url and we will take care of the download for you. As such the file you are pointing to needs to be accessible by the general web.
The overall webhook flow looks like this:
The first POST request sent in the flow provides Vidrovr with the information necessary to pull down your asset and feed it into the processing engine.
What you will need is:
Please note you will need to provide part of your request information as a query parameter and part as a json body object. The query parameter portion will contain the api_key:
<API-KEY> https://platform.vidrovr.com/public2/async/v01/webhooks/upload_request?api_key=
You also need to provide data as part of the POST request in the form of a json data object:
{
"name":"TEST",
"download_url":"http://s3.amazonaws.com/vidrovr-test-bucket/vid_xsmall.mp4",
"notification_receipt_url":"http://callback_receipt_url.com",
"notification_complete_url":"http://callback_complete_url.com"
}
If you notice there are 4 parameters:
Here is an example curl request to get you started:
curl -X POST -i 'https://platform.vidrovr.com/public2/async/v01/webhooks/upload_request?api_key=<API-KEY>'
--data '{
"name":"TEST",
"download_url":"http://s3.amazonaws.com/vidrovr-test-bucket/vid_xsmall.mp4",
"notification_receipt_url":"http://callback_receipt_url.com",
"notification_complete_url":"http://callback_complete_url.com"
}'
If everything works successfully you should receive a 200 response code with a complete message.
You will later receive a receipt notification once the asset successfully uploaded to system ( our server will send a message to notification_receipt_url) this will include the id of the asset:
{
"received": true,
"begun_processing": true,
"name": "TEST",
"url": "http://s3.amazonaws.com/vidrovr-test-bucket/vid_xsmall.mp4", "metadata_url": "",
"id_asset": "60a2a3abea9e49ba2c3b01da30a03eb421951ccf-ed1b-46e7-bb21-55ffa8e02459"
}
The url parameter is the video source url where the asset was pulled from.
Once the video asset is processed our server will send a message to notification_complete_url. It will include the medata_url as part of the object in the metadata_url field
{
"received": true,
"begun_processing": true,
"name": "TEST",
"url": "http://s3.amazonaws.com/vidrovr-test-bucket/vid_xsmall.mp4",
"metadata_url": "https://production.vidrovr.com/public/api/v01/get_metadata?id=60a2a3ccea9e493a2c3b01da20a03eb421951ccf-ed1b-46e7-bb21-55ffa8e02459&api_key=<API-KEY>&confidence_scores=true&encoding=ascii",
"id_asset": "60a2a3abea9e49ba2c3b01da30a03eb421951ccf-ed1b-46e7-bb21-55ffa8e02459"
}
And this completes the journey. Hopefully you followed along and it helped to better understand how to use Vidrovr’s webhooks interface. If you are still having difficulties feel free to shoot us a message at support@vidrovr.com