This repository was archived by the owner on Sep 29, 2023. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For a project I'm working on, I need to be able to transcode to multiple output files, with different options, in one transcoding process.
Here is an example, of how I would expect a ffmpeg call in this context to look
ffmpeg -i 149336093 -f webm -vf scale=-2:90 -y "./output/90px.webm" -f webm -vf scale=-2:240 -y "./output/240px.webm"
As this is currently not possible with this library, I tried to implement the changes necessary for that.
The changes include
output
attribute ofTranscoder
to a slice of stringoptions
attribute ofTranscoder
to a slice of slices of stringwithAdditionalOptions
, that appends a newOptions
object to theoptions
attribute, instead of overwriting itStart(opts)
are appended firstt.options
(Which were not being used in the code until now, as I noticed)t.options
slice, than there are output files int.output
, the remaining options get squashed together before the last output fileThese changes proved to run just fine for me in my tests. Here is the piece of code, that I tested them with in my project, it all worked out as expected:
If there are any problems with my PR I'll be happy to fix them. Thank you very much for your work on this library!