Skip to content
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

Add a keyboard action to copy last run ffmpeg commands to clipboard #1529

Closed
4 tasks done
YousufSSyed opened this issue Mar 30, 2023 · 10 comments
Closed
4 tasks done

Comments

@YousufSSyed
Copy link

I have a lot of issues to go through, so in order to make it easier for me to help you, I ask that you please try these things first

Description

Right now you can see previous FFmpeg commands on LosslessCut. However I don't want to make lossless cuts, I want to make lossy cuts with my own commands, this functionality won't be added to Losslesscut for a long time if ever. I'd like to see and copy the command after I make a clip and without hitting export, so I could edit that and run it in my terminal to create my clip.

Perhaps a button should be added next to "Export" called "Preview Command" to see the command, like you can see previous FFmpeg commands. I also think a hotkey should be added to copy what the command would be if you pressed export, without clicking any buttons on the screen.

@mifi
Copy link
Owner

mifi commented Apr 3, 2023

the problem is that it's not just one command that will be run when your press export. it's a multitude of different commands, and some depend on the result of the previous commands. I think it's going to complicate the code unnecessarily if I were to implement this. So unfortunately I don't think this will be implemented.

Kind of related: #750 #980

@mifi mifi closed this as completed Apr 3, 2023
@YousufSSyed
Copy link
Author

YousufSSyed commented Apr 3, 2023

@mifi How about copying all the commands to the clipboard, putting each command in a separate line?

@mifi
Copy link
Owner

mifi commented Apr 3, 2023

I think the «last ffmpeg commands» page should serve this purpose. You can even bind a keyboard shortcut to open it. Maybe it could be improved with a button though that would allow you to copy the last commands. Or maybe a keyboard shortcut to copy the last run commands to clipboard.

@mifi mifi reopened this Apr 3, 2023
@mifi mifi changed the title Add a button to preview / generate, and copy the FFmpeg command that would be used for exporting. Add a keyboard action to copy last run ffmpeg commands to clipboard Apr 3, 2023
@YousufSSyed
Copy link
Author

Why did you change the title?!
I don't want the extra step of exporting the video, why don't I just get what would be the "last ffmpeg command" without having to make the video first?

@mifi
Copy link
Owner

mifi commented Apr 3, 2023

Ok feel free to change the title back, but like I said it’s not feasible to implement «last commands only» like you asked, so I thought this could be a middle-way. But then I’ll have to close this issue again.

@mifi mifi closed this as completed Apr 3, 2023
@YousufSSyed
Copy link
Author

@mifi Maybe I should clarify, when losslesscut exports a video, a command shows up in "last ffmpeg commands." I want the command before exporting the video of what that command would be.

So you're saying that its not feasible to add? If so, can you elaborate?

@mifi
Copy link
Owner

mifi commented Apr 3, 2023

The problem is that when you press export:

  • losslesscut will generate one of many possible ffmpeg commands, depending on options
  • Then it will run this command
  • Then it will generate a new ffmpeg command, but this command’s arguments depends on the result of finishing running the first ffmpeg command
  • then it will run this new command
  • And so on…
  • Once finished running all the commands, losslesscut will collect them and put them on the «last ffmpeg commands» page

So my point is that before exporting any videos, the commands are not yet known and cannot be shown to the user

@YousufSSyed
Copy link
Author

@mifi So a dry run wouldn't be possible?

@mifi
Copy link
Owner

mifi commented Apr 3, 2023

not in the current state at least

@YousufSSyed
Copy link
Author

YousufSSyed commented Apr 4, 2023

@mifi Fine I'll leave it that. I opened another feature request to try to do what I want: A menu option and or shortcut to quickly copy the start end end times of the current segment to the clipboard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants