Capturing thumbnail for videos

Description

https://github.com/Bahmni/openmrs-module-bahmniapps/pull/75
https://github.com/Bahmni/bahmni-core/pull/16

Steps to reproduce the issue:
If the no. of videos loaded on the patient dashboard are more than a certain limit (6 videos), as Chrome does not support more than 6 connections per server, the dashboard page is stuck.
To resolve this issue, one proposed solution:
1. Instead of loading all the videos on page load, we load the thumbnails of the videos. When clicked on a thumbnail, the corresponding video is opened in a pop up.
2. To capture the thumbnails of the image, we looked at the below libraries :
1. javax.media library (Deprecated)
2. http://www.xuggle.com/xuggler/ (Could not find the source code)
3. https://github.com/bytedeco/javacv (A Java cpp library)

We used bytedeco library to create thumbnails for videos. The issues with this library:
As it is a java library built on cpp platform, the dependencies for this library include the major os platforms, which increase the bahmni-core omod size to 220MB approx.
To include just Linux platform, the size of bahmni-core omod is 25MB compared to the 1.5MB without this library.

Gliffy Diagrams

Activity

mksd October 11, 2017 at 7:42 AM

Sure, there must be a reason for those 200MB of artifacts!

JCodec doesn't provide any utilities to extract the first available frame for instance?
Also, are we good with the resulting OMOD size in the end?

Shruthi Pitta October 11, 2017 at 7:28 AM

JCodec works. There is one difference (may not be of huge impact for us) => bytedeco has an inbuilt algorithm to identify the key frame for a video where as JCodec needs the "seconds" as input to create a frame.

Shruthi Pitta October 11, 2017 at 5:12 AM

I will test with JCodec and update the thread.

mksd October 10, 2017 at 3:10 PM

Adding this to bahmnicore-api/pom.xml bumps the OMOD size from 1.9MB to 3.6MB:

I am not sure if the second dependency is needed.

So hopefully if this library does the job - which is to be tested - the size increase would manageable.

Shruthi Pitta October 10, 2017 at 12:14 PM

(People who actually worked on this PR) Did you try JCodec?

Unresolved
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Components

Sprint

Fix versions

Priority

Created September 20, 2017 at 9:25 AM
Updated November 15, 2017 at 6:22 AM