This is a thingworx sdk extension that uses ffmpeg to compress video.
- Create a new thing using the
VideoConversionThingTemplate
template. - Go to configuration and provide the path to the folder with the ffmpeg binary
- Provide the ffmpeg arguments that are used when user doesn't specify custom ones
- Test the configuration by running the
GetFFmpegVersion
service.
Using the thing created above is quite simple. Only once conversion happens at a time. Two services are of importance:
AddVideoProcessingJob
: Creates a new processing job and add it to the queue. The service returns a infotable row with the job id. The following parameters are neededsourceFileRepo
- File repository where the file to convert issourceFilePath
- Path to the file to converttargetFileRepo
- File repository where to store the converted filetargetFilePath
- Path to the file to convertedarguments
- If provided, the arguments that are passed to ffmpeg for conversion. If not provided, the ones in the configuration are used.
CancelProcessingJob
: Cancels a job, if queued or running.jobId
- Job to cancel
When a job is completed, two events can trigger and be subscribed:
ProcessingFinished
: a job has finished, and the conversion was successful.ProcessingFailed
: a job has finished but has thrown an error. Themessage
column contains information about why it failed.
The ProcessingQueue
property contains information about the jobs that have completed, are in queue, or are being processed.
#This Extension is provided as-is and without warranty or support. It is not part of the PTC product suite. This project is licensed under the terms of the MIT license