shell expansion and parameters with spaces in ts-exec:, mkv-exec, JPEG, etc. #172
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.
(replaces #156 due to merge conflict in input_ts.cpp)
In many instances, a shell command entered by user to supply a ts-exec: / mkv-exec: source or destination is not being treated as a shell expression but rather split by spaces.
This represents a problem when you need ffmpeg to play a file containing a space in ints file name or overlay a string of text with spaces. For example, the line:
ts-exec: ffmpeg -i "My File With Spaces.mpg" -c:v copy -mpegts -
will be split like this before invoking ffmpeg
ffmpeg|-i|"My|File|With|Spaces.mpg"|-c:v|copy|-mpegts -
Other shell escaping characters like
, \ , ' also do not work.The proposed PR solves this by actually invoking shell to interpret the entire command supplied by the user. (Inspired by https://github.com/php/php-src/blob/master/ext/standard/proc_open.c#L1211).
Note: WIN32 is implemented via CMD /C but untested.