-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve support for external post-process programs #974
Comments
Thanks for your feature request
|
True, but it would make sense if the project would include all/most of the options you can configure when exporting, maybe not the actual file names but stuff like segment format, export type, and the path. Those would be then auto set when loading a project in LosslessCut. But one issue would remain with start/end segment times being saved as floats, like i mentioned there are cases where converting the float value to time string can result in 1ms differences.
Yea I figured that this would be an super edge case request. |
Yes I agree that some of these options could be saved in the project file, that is something I have to consider.
I'm not sure why you need the time to be exact, but I agree that such a format makes sense. Or just the calculated frame number (which we are already showing inside the UI)
That's true, and also why I want to leave the feature request open |
I assumed you don't like the idea of saving the list of latest exported files to the project file itself, so for the tool/script to reconstruct the exported file names based on the project file and do the stuff it does, it needs the "segment format" and segment time/start times. project file: {
...
cutSegments: [
{
start: 1023.023,
end: 1123.023,
name: '',
},
]
} exported file: //outputs 00.17.03.023
TimeSpan.FromSeconds(1023.023).ToString(@"hh\.mm\.ss\.fff");
//outputs 00.18.43.023
TimeSpan.FromSeconds(1123.023).ToString(@"hh\.mm\.ss\.fff"); As you can see there is a 1ms mismatch. |
Could you instead use the |
Yes that will work fine but requires me to use some special format. Or I could use the default format to get the This feature request was so that the tools/scripts could be more generic and not rely on assumptions, just parse the project file to get all the info they need. There is no problem in getting this to work if I hardcode some stuff. |
Ah, so you want to kknd of build an application or tool around losslesscut and distribute it as one working unit? Then yea i agree it would be better to have a programmatic api. I have created an issue for gathering these kinds of programmatic requests #980 |
More or less yes, it doesn't have to be distributed as one, it would use output from losslesscut to do its thing on the exported segments files and/or merged file. The output I suggested that could be used would the the project file since it is always created, and just needs a few tweaks. I didn't even think to suggest an api because I knew that it will be a bigger task, but for sure it will be more flexible and could provide even more data/events that would not be fit for the project file. |
How does your program know that the export is finished if there is no API? |
It doesn't, I just drag drop the project file manually after the export is done. |
Hi, I'm hopping something like this will happen. |
Would love this feature as well. I am using LC to cut larger video files from my Canon R6 MK II into clips. It works great overall but a bunch of the metadata like Exposure, Aperture, etc are missing in the clips that LC produces, even when using the Preserve all MP4/MOV metadata option during export. I think this is due to the non-standard metadata fields in the source file or the limited fields available in the resulting file formats. Not sure. Point being that I use exiftool to copy all the metadata from the original file to the clips but currently this has to be done manually afterwards. Would be amazing if I could just trigger my exiftool script automatically after exporting the file(s) from LC! |
This is a loose feature request but I recently had a project in mind recently that required me to cut/merge video files and I didnt want to reinvent the wheel with video processing so I wanted to use LosslessCut for that, and write a simple "post-process" application that would do the stuff I need on the exported files.
While writing I noticed that it is actually somewhat tricky to use .llc project files from external programs.
For example there is no way to know what files were actually exported. The external program could try to create the file names if it knows the segment export format that the user configured, and the .llc project file, but due to float inaccuracies I actually encountered a case where the segment time in the filename was off by 1ms.
I think the project file could contain information on the last export, something like this:
As a bonus, LosslessCut could allow users to specify an executable to run after each export that would pass the .llc project file path as argument. This way advanced users could create small post-process plugins/applications and rely on LosslessCut on the actual cutting/merging.
The text was updated successfully, but these errors were encountered: