lisamelton / video-transcoding-scripts

Utilities to transcode, inspect and convert videos.
MIT License
603 stars 76 forks source link

Specify output filename #4

Closed dashorst closed 9 years ago

dashorst commented 9 years ago

Adds the ability to specify an output file name to the script.

When transcoding a TV series (from DVD) it is necessary to be able to specify the output format. For example the disc for The X-Files Season 1 Eps 1-4 is named "XFILES_DISC1" and when you want to transcode all episodes you have to manually rename the generated files. Being able to specify the output name solves this.

I have made the option such that it remains the current functionality, but allows to override the default name generation.

lisamelton commented 9 years ago

Martijn, after thinking about this for a few days and also waiting to see if anyone else would comment on your pull request, I've decided to say "no" to this feature.

For a command line tool like transcode-video.sh, I can think of no case where it's not possible to rename its output, even in a batch script, on the line following the invocation of that command. Especially with the predictability of the output filename.

So, I'm not convinced of the need for this feature with your example case. Since you would have to invoke the script four times for that DVD disc image folder, you can simply rename the output four times. And this can easily be done automatically. I do this myself all the time.

I hate to be harsh, but I don't want to complicate transcode-video.sh and my other scripts with a feature like this. Why is it complicated? Let's look at your patch.

While you inserted the change in the correct place (and picked an excellent name for the option), you're not doing any validation of the output name argument. Why is this important?

And these are only a few issues to resolve in what would likely be many lines of code that would also complicate testing.

As always, thanks for the patch and thanks for making me think about this. I really appreciate it.

hdready commented 9 years ago

Martijn, in my Form of These scripts you find The crop-Transcode-batch.sh. I started using commands to make inputs like "do you want to move this file" & "where?" and "do you want to use big transcoding rates?". It would be easy to Implement a renamer with this logic as well. So before transcoding it would ask you to input the name of the output file. That said, you'd have to adapt the script yourself because I did a lot of tinkering on the transcode-video.sh to have it 'my way'. But I guess this would be an easy one-liner in the batch script.

lisamelton commented 9 years ago

Martijn, I'm now reconsidering your request. I actually have a simple patch now which handles this reasonably well, including the edge cases. But I'm still on the fence about whether to land it. I've asked folks on Twitter to weigh in with their opinions on it.

lisamelton commented 9 years ago

OK, the --output option just landed. Enjoy. :)

command-tab commented 9 years ago

:+1: Thank you!

dashorst commented 9 years ago

:100: :+1: