-
Notifications
You must be signed in to change notification settings - Fork 26
Add --output
option.
#182
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 --output
option.
#182
Conversation
Ah, joke's on me for not reading the other PRs:
I have my uses for it, but I'll keep it in my local copy henceforth. |
@lisamelton, I hope you might reconsider including an Additionally, because the transcode-video project included the |
Alternatively ...
|
@ttyS0, I appreciate the work-around tip. Respectfully, I still hope that @lisamelton will consider the value of accepting the pull request to add the |
@apenngrace The name collision is an intentional feature. It's to prevent you from transcoding your output into the same working directory as your source. Seriously. Too many users have inadvertently deleted their source files by using the same working directory for both source and output. Follow @ttyS0 's fine advice or simply |
Lisa has intentionally designed this into the solution. It's been discussed many times. Because the workaround (changing the present working directory) is so simple, there's nothing to be gained by repeating the request. |
@loshlee Thanks! You totally get it. 👍 |
@lisamelton, right, I understand that we would not want to overwrite source file. But your code already checks if the output file already exists. This pull request does not introduce that problem. I just tried this pull request out. I used the @loshlee and @lisamelton, anyways, I understand the work-around. It was a nice option to have when it was available on your other project. It was a feature I liked, that's all. I will go ahead and follow your suggestions. |
@apenngrace I think you misunderstand. Of course I wouldn't allow Many users of my original transcoding script, myself included, learned that lesson the hard way. |
Code entirely borrowed from
transcode-video
(resolve_output
,opts.on '--output ARG'
, help text). For consistency's sake, I skipped the short option (-o
). Also, I appreciated that the change to useresolve_output
was a one-liner.There are two minor COMBAK notes for your feedback (lines 480 and 1190 in 241b41e).
Dockerfile
I'm on NixOS and way too lazy to set up the dependencies at the OS level. I might send this file as a separate PR, although I don't have a Docker Hub account with which to get the image to the masses.
Test script
Results
(The size difference? I suspect the VP9 original has a much lower bitrate than the 1.5 MB/s the AVC output was written in, but
mediainfo
won't tell me what it is. I needed a very small video to test with anyway.)Relevant log lines
You can see at the end of the ffmpeg commands that the output path resolved correctly.