-
Re: How to get video information from Jive Rest API Cloud
jgoldhammer Jun 8, 2018 5:17 AM (in response to james1.hicks)1 person found this helpfulHi James,
please have a look at the resources json structure. There is a downloadOptions url. Please call this url via GET and you will get a url to the mp4 of different solutions.
-
Re: How to get video information from Jive Rest API Cloud
james1.hicks Jun 8, 2018 10:46 AM (in response to jgoldhammer)Hey Jens,
Thank you for your reply! I was getting anxious.
Using GET on downloadOptions returns 404 Not Found. Any ideas?
-
Re: How to get video information from Jive Rest API Cloud
jgoldhammer Jun 9, 2018 10:24 PM (in response to james1.hicks)James,
can you post the url you are using? I have found out that sometimes the endpoint does not return data- please try a other new video. Maybe you have to parse the videometadata field... The json contains the download URL, but without the auth token...
-
Re: How to get video information from Jive Rest API Cloud
james1.hicks Jun 11, 2018 7:46 AM (in response to jgoldhammer)The URL I am using is: https://mysite.com/api/core/v3/videos/downloadOptions/26612
Using the above GET url, I get a 404 Not Found, do you have an example of the response you are getting? Do you think there is something I must enable in the admin console to be able to reach this?
Would I need to use an auth token to get the embed url from the above GET url? How would I go about doing that if so?
In the videometadata field, are you talking about the download_url link?
-
Re: How to get video information from Jive Rest API Cloud
jgoldhammer Jun 13, 2018 11:23 AM (in response to james1.hicks)James,
please inspect the json of the content endpoint carefully.
So search for a video via contents endpoint.
https://community.jivesoftware.com/api/core/v3/contents?filter=type(video)
Use the downloadoptions url to get the download url
https://community.jivesoftware.com/api/core/v3/videos/downloadOptions/1248847
This download url will be direct download of the video as mp4 file.
I think the download link will not be valid a longer time because the auth_token will expire.
If this method will not work, you can use the videoMetadata to get the download url and append the authtoken field to create this url by hand.
authtoken" : "ba91e713d8527833d6f637195b36f866918f7396b872fe4fecf09ac0de8ab674",
"autoplay" : false,
"height" : 437,
"playerBaseURL" : "https://video-svc.jivesoftware.com",
"playerName" : "9_0_0",
"width" : 763,
"watermarkURL" : "https://community.jivesoftware.com/images/transparent.png",
"videoType" : "video_perceptive_type",
"videoMetadata" : "{\"title\":\"Aurea\\u2019s Acquisition of Artemis_ What it Means to You\",\"description\":null,\"created_at\":\"2018-06-11 03:22:55 UTC\",\"publisher_name\":\"176311\",\"hidden\":false,\"video_id\":\"1b73f07bda61a\",\"status\":\"available\",\"contributor\":\"176311\",\"site_name\":\"jivespace\",\"library_name\":\"jivespace\",\"main_asset_url\":\"https://video-svc.jivesoftware.com/videos/1b73f07bda61a/assets/13586512/file.mp4\",\"source_asset_url\":\"https://video-svc.jivesoftware.com/videos/1b73f07bda61a/assets/13586509/file.mp4\",\"hits_count\":0,\"plays_count\":0,\"duration\":1840.111,\"total_size\":104654545,\"availability\":\"available\",\"main_asset_id\":13586512,\"progress\":100,\"artist\":\"\",\"genre\":\"\",\"assets\":[{\"id\":13586509,\"size\":30314498,\"status_code\":30,\"acodec\":\"mp4a\",\"audio_bitrate\":64,\"container\":\"mp4\",\"download_url\":\"https://video-svc.jivesoftware.com/videos/1b73f07bda61a/assets/13586509/file.mp4\",\"duration\":1840.064,\"frame_rate\":7.53180324163,\"hresolution\":1920,\"is_main_asset\":false,\"vcodec\":\"avc1\",\"video_bitrate\":66,\"video_format_name\":\"source\",\"vresolution\":1080,\"status\":\"complete\",\"detailed_status\":null},{\"id\":13586510,\"size\":null,\"status_code\":20,\"acodec\":null,\"audio_bitrate\":null,\"container\":null,\"download_url\":\"https://video-svc.jivesoftware.com/videos/1b73f07bda61a/assets/13586510/file\",\"duration\":null,\"frame_rate\":null,\"hresolution\":null,\"is_main_asset\":false,\"vcodec\":null,\"video_bitrate\":null,\"video_format_name\":\"H264_360p\",\"vresolution\":null,\"status\":\"inprogress\",\"detailed_status\":{\"code\":150,\"message\":\"Downloading file\",\"progress\":\"100\"}},{\"id\":13586511,\"size\":null,\"status_code\":20,\"acodec\":null,\"audio_bitrate\":null,\"container\":null,\"download_url\":\"https://video-svc.jivesoftware.com/videos/1b73f07bda61a/assets/13586511/file\",\"duration\":null,\"frame_rate\":null,\"hresolution\":null,\"is_main_asset\":false,\"vcodec\":null,\"video_bitrate\":null,\"video_format_name\":\"H264_480p\",\"vresolution\":null,\"status\":\"inprogress\",\"detailed_status\":{\"code\":150,\"message\":\"Downloading file\",\"progress\":\"100\"}},{\"id\":13586512,\"size\":74340047,\"status_code\":30,\"acodec\":\"mp4a\",\"audio_bitrate\":64,\"container\":\"mp4\",\"download_url\":\"https://video-svc.jivesoftware.com/videos/1b73f07bda61a/assets/13586512/file.mp4\",\"duration\":1840.111,\"frame_rate\":7.52998052835,\"hresolution\":1280,\"is_main_asset\":true,\"vcodec\":\"avc1\",\"video_bitrate\":256,\"video_format_name\":\"H264_720p\",\"vresolution\":720,\"status\":\"complete\",\"detailed_status\":null}],\"screenshots\":[{\"frame\":0.0,\"content_type\":\"image/jpeg\",\"width\":1920,\"height\":1080,\"size\":112256,\"url\":\"https://video-svc.jivesoftware.com:443/videos/1b73f07bda61a/screenshots/original.jpg\"}],\"tags\":[],\"custom_fields\":[{\"name\":\"jive_video_ID\",\"value\":\"13292\"}]}",
"type" : "video",
Any questions left?
Thanks
Jens
-
Re: How to get video information from Jive Rest API Cloud
james1.hicks Jun 13, 2018 12:26 PM (in response to jgoldhammer)Hey Jens,
Yeah this helped in seeing what I am suppose to be getting when I go to the '/api/core/v3/videos/downloadOptions/26689'. When I go to any of the downloadOptions for any of the videos, I get a 404 not found. Do I need to enable something to see this?
-
Re: How to get video information from Jive Rest API Cloud
jgoldhammer Jun 13, 2018 11:25 PM (in response to james1.hicks)James,
no- I have not found out this. I have seen that old videos have this problem in my cloud instance. Please upload a new one and test this.
I guess this is a bug. Nevertheless you have the option to parse the videometa field, extract the download url and append the auth token. Please try this instead.
Thanks
Jens
-
Re: How to get video information from Jive Rest API Cloud
james1.hicks Jun 14, 2018 8:03 AM (in response to jgoldhammer)I opened a ticket with Jive. Thank you so much for your help. I was hitting the downloadOptions before I opened this case and was getting 404 response, I loved that you took a screen shot of what the response should be with the list of options, it helps in knowing that we are broken.
Thank you!
-
Re: How to get video information from Jive Rest API Cloud
romainpaillas Jun 18, 2018 11:27 AM (in response to james1.hicks)Hello James Hicks, I have the same behavior on different instances since 2016.3.10 instance. Are you in this version too ?
-
Re: How to get video information from Jive Rest API Cloud
james1.hicks Jun 18, 2018 12:26 PM (in response to romainpaillas)Hey Romain Paillas,
Yes I am on this version. Do you get a 404 error when you try to make call to your /downloadOptions/ too?
-
Re: How to get video information from Jive Rest API Cloud
romainpaillas Jun 18, 2018 12:48 PM (in response to james1.hicks)I manage many instances and on 50% of them I got a 404.
I've opened a support case ticket the 1st June, but no solutions was found for the moment.
-
Re: How to get video information from Jive Rest API Cloud
james1.hicks Jul 10, 2018 1:24 PM (in response to romainpaillas)1 person found this helpfulHey Romain,
Sorry for getting back to you late. I opened a ticket as well. It seems that there is an issue in the service that they use to communicate to their video hosting website for some instances. They are now aware of the issue and will hopefully look at it.
Thanks,
James
-
-
-
-
-
-
-
Re: How to get video information from Jive Rest API Cloud
SunilKr Jul 11, 2018 6:44 AM (in response to jgoldhammer)Hi Jens Goldhammer,
Endpoint 'api/core/v3/contents?filter=type(video)' on my hosted instance not having the 'downloadOptions' URL. And if I prepare the downloadOption URL with value from content list like 'https://<myJiveInstace.com>/api/core/v3/videos/downloadOptions/243402 ', it gives 404 error code.
We are on hosted 8.0.4.0. Is there any filter or settings which allow to get the downloadOptions URL?
-
Re: How to get video information from Jive Rest API Cloud
jgoldhammer Jul 11, 2018 6:51 AM (in response to SunilKr)Hi Sunil,
Do you have the video plugin installed? Since Jive 9 it is integrated, but in Jive 8 you have to install it. For me, It works on jive 9.
Thanks
Jens
-
Re: How to get video information from Jive Rest API Cloud
SunilKr Jul 11, 2018 10:53 PM (in response to jgoldhammer)
-
-
-
-
-
-
-
-
Re: How to get video information from Jive Rest API Cloud
arunmurty Aug 9, 2018 7:59 AM (in response to james1.hicks)I am trying to the run the video download using HTTP URL client as part of a Java batch, and for some reason the files are getting downloaded as 0 KB. Is there anything particular the client has to do while streaming. Please note that I am also setting the MIME type to "video/mp4" in the request. I've tried a bunch of different client methods, and they are all downloading the videos as 0 KB. Trying to figure out why the streaming stops at 0 KB
Earlier i was able to get hold all of the contents/documents without issues but for some reason contents/videos are all being pulled down, but as 0 KB file.
Please note that when I use the below like URL (with auth) from a browser, it downloads the video without any issues.
Any help appreciated
-
Re: How to get video information from Jive Rest API Cloud
jgoldhammer Aug 9, 2018 8:07 AM (in response to arunmurty)1 person found this helpfulArun,
using wget or postman also works.
I guess without any Java code I cannot help here.
I have used SpringRestTemplate in the past and it works like a charm to download the videos from Jive cloud...
Thanks
Jens
-
Re: How to get video information from Jive Rest API Cloud
arunmurty Aug 9, 2018 10:53 AM (in response to jgoldhammer)Thanks for the reply before. You are right. Strangely WGET works perfect here. But I am delivering a Java deliverable to a customer and that is not pulling down the MP4 video files.
Now I tried a Spring REST Template sample that you had mentioned earlier, and still it is the same issue. I end up getting 0 KB files generated.
Here is the Java snippet below that I tried, and still it is 0 KB. I am wondering is it the MediaType in the header? Or is there some access issue on the server preventing my download? But the strangeness is , I can download the same with my browser & WGET without issues
public static void downloadMp4(String downloadURL,String fileName){
RestTemplate restTemplate = new RestTemplate();
// Optional Accept header
RequestCallback requestCallback = request -> request.getHeaders()
.setAccept(Arrays.asList(MediaType.MULTIPART_FORM_DATA));
// Streams the response instead of loading it all in memory
ResponseExtractor<Void> responseExtractor = response -> {
// Here I write the response to a file but do what you like
Path path = Paths.get(fileName);
InputStream body = response.getBody();
try {
Files.copy(body, path);
}catch (Throwable t) {
t.printStackTrace();
}
return null;
};
restTemplate.execute(URI.create(downloadURL), HttpMethod.GET, requestCallback, responseExtractor);
}
-
Re: How to get video information from Jive Rest API Cloud
arunmurty Aug 9, 2018 2:50 PM (in response to arunmurty)I was able to fix the download issue using a bit of parallel thread based processing and running with OKHTTPClient : OkHttp
Neat client which did the streaming work for me. Thanks for your help.
-
-
-