Trimming based on arbitrary frame ranges from JSON file
Posted: Sun Jun 16, 2024 11:24 am
Hi,
I started using FFAStrans just a couple of days ago to do some transcoding, and I am already thinking that I could do a lot more with it than I initially imagined.
However, I stumbled into something that is proving more difficult to solve than I thought.
For each video that I process, I need to export the full length video and a trimmed version.
The trimmed version is cut based on frame ranges that are stored in a JSON file. The frame range always differs from file to file, but the values are stored into the above JSON file.
I thought that I could use a "command executor" to run a python script that reads the necessary frame range and sets the value of start and end frame user variables that I set at the beginning of the workflow.
However, is it possible to set a user variable value from a Python script running via a Command Executor, at all?
After the command executor I run a custom AviSynth script to do the trimming, but I am wondering whether I should already trim in the command executor. I would rather just use the command executor to set the user variable value to the desired start and end frame, if possible, but is that possible?
Thanks for any pointer!
I started using FFAStrans just a couple of days ago to do some transcoding, and I am already thinking that I could do a lot more with it than I initially imagined.
However, I stumbled into something that is proving more difficult to solve than I thought.
For each video that I process, I need to export the full length video and a trimmed version.
The trimmed version is cut based on frame ranges that are stored in a JSON file. The frame range always differs from file to file, but the values are stored into the above JSON file.
I thought that I could use a "command executor" to run a python script that reads the necessary frame range and sets the value of start and end frame user variables that I set at the beginning of the workflow.
However, is it possible to set a user variable value from a Python script running via a Command Executor, at all?
After the command executor I run a custom AviSynth script to do the trimming, but I am wondering whether I should already trim in the command executor. I would rather just use the command executor to set the user variable value to the desired start and end frame, if possible, but is that possible?
Thanks for any pointer!