Skip to main content
16-Pearl
September 5, 2024
Solved

Thingworx extension to compress videos

  • September 5, 2024
  • 1 reply
  • 3645 views

Hello Community,

    I am working on thingworx 9.3 and i want to have compression functionality in thingworx.

Usecase:- User would be able to upload vidoes from mashup into fileRepository but before storing into repository it needs to be compress and must have size of around 1.5 mb of file. Is it possible to do that?

 

IDEA 1:

Have a phython backend to compress the video and then video can come into thingworx repository via post request

 

IDEA 2: 

Have/Create an extension directly in thingworx so that user can upload it and then it would be compressed and save it in repository.

 

 

Background: I have vuforia studio experience and there the experience gets the video files which are 10 in number and then it shows the videos in experience. i cannot directly upload the videos in experience because i have around 90 experiences for this usecase and each experience has different model and different vidoes in it so that i have made it dynamic and upload the files in repository and getting them from there 

 

thats why i need mashup to load the files in repository but important is the videos need to be compressed. and that i dont want to do manuually again and again. i want to merge it into system so that it can be done automatically and save it in repository.

Best answer by Rocko

Generally it's better to have one configurable, dynamic experience than 100 fixed ones. It's easier to manage and maintain. Many things in Vuforia can be done in a dynamic way, so I think that's the better way.

1 reply

Rocko
19-Tanzanite
September 5, 2024

You can do this with by creating a thingworx extension, yes.

Ma understanding you want to use lossy compression to get under a certain size. You will have to search for a java media library that can do that, or you can run your python backend and have TWX send it over and receive the compressed result.

 

In any case you would want to do this in the background, depending on the size and the recoding you might run into timeouts otherwise.

MA873117416-PearlAuthor
16-Pearl
September 18, 2024

What  do you think is the best approach to either create an extension for this task or get the results from phython and get via POST?

 

If i would like to create an extension what are the best steps to create a java extension for beginner? as i found this link below:-

 

https://support.ptc.com/help/thingworx/platform/r9.5/en/index.html#page/ThingWorx/Help/Best_Practices_for_Developing_Applications/EclipsePluginInstallingThePlugin.html#wwID0E4MA4

But when i click this above link it just does not show me this plugin to download but it does shows lot of other stuff.  Would you like to recommend me steps to create an extension easily.

 

 

Java extension to compress videos and images.

https://stackoverflow.com/questions/50042483/mp4-video-compressor-in-java

 

 

 

 

Rocko
19-Tanzanite
September 18, 2024

Works without issues here. metadata.xml is in the zip.

Do you import the right way? Import>Extension>locate Zip File.

The zip also contains the jar file you mentioned.

 

You need to download the release zip file, not the source zip. https://github.com/mvonhasselbach/CreoViewRWExtension/releases/tag/v1.5.0