-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[Feature request] Export script instead of running FFMPEG directly #612
Comments
Hi. what's the use case for this? |
I'm using a very simple pipeline/build system for some video edits with a number of stages, so the idea is just to have some very simple code structure I can drop into the pipeline I've coded up, one that is only a plain scripting language with only dependencies on FFMPEG, excluding the web app dependencies used by the LosslessCut GUI. Beyond the CSV files, there's a few additional user data points that need to be included for full reproducibility of the edit actions. Another point, sometimes we point users to running FFMPEG directly for diagnosing bugs, but is there currently any way to easily get the commands that LosslessCut generates? Another related idea I was thinking, maybe we just want a console window of a sort within LosslessCut to view the commands that are run. But anyway, my overall thoughts. I like the idea that LosslessCut is largely a lightweight GUI front-end to FFMPEG and it seems like it could use a few improvements toward making its interaction with FFMPEG a little bit more transparent/discoverable to the user. |
Yes, press |
Okay, yeah now I see the last run FFMPEG commands on the bottom of the help screen, a bit of an inconvenience that you need to actually run the export first before seeing them but it's still workable. Also, I did not see the final merge command all in the command output log, it should have listed that command line with the segments to merge passed in as a here document (since the command pipes from standard input). @mifi So what are your thoughts on this overall idea? There's a number of ways to proceed here. I've written a proof of concept Python script for just parsing out the project files and generating FFMPEG commands.
|
I think if I understand you correctly, you need a modified version of losslesscut to integrate into your own software stack. In such case I think it should be easy for you to fork losslesscut and then make the changes you need for that. I'm not sure if it would be very useful for others, but we can leave it open to see if any others are interested in this. |
Thinking this through more, a lot of the practicality of implementing what I really want really hinges off of issue #545. Probably it's best explained like this. Inkscape has a command-line export and that is really nifty if you want to graphically author something, store the source in version control, but be able to also plumb it into a build system for generating the production image. But in any case for that to work well in general, LosslessCut needs to be able to generate project files that encapsulate all relevant parameters in them. I think it's fair to close this issue for now and we can reopen when #545 (or similar) is addressed. |
I would definitely find a use for this, I use VapourSynth scripts and having a nice GUI that exports the video to TEMP and runs a command right after trimming would be convenient Of course very few people would use something like this but it would be really useful for me to be able to customize the output command somewhere |
The most basic implementation would be to write the generated FFMPEG commands to a shell script file rather than executing. The export parameters and CSV project file are listed in comments at the top.
Alternatively, a Python script could be used that reads the parameters from the top and then parse them out using the same logic inside LosslessCut's JavaScript code.
Mainly I'm opening this issue for discussion since I was planning on implementing something similar for my own use and was curious if you'd be interested a pull request to merge this to master.
The text was updated successfully, but these errors were encountered: