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

shell expansion and parameters with spaces in ts-exec:, mkv-exec, JPEG, etc. #172

Open
wants to merge 1 commit into
base: development
Choose a base branch
from

Conversation

m1tk4
Copy link

@m1tk4 m1tk4 commented Apr 30, 2023

(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.

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

Successfully merging this pull request may close these issues.

1 participant