The down side is that
-x '1 2 3' -y 4 5

would have to be passed as

--extra-ffmpeg-param='-x '\''1 2 3'\'' -y 4 5'

You'd need nested quoting, which is very tricky.

This can probably be mitigated by mixing quotes.

--extra-ffmpeg-param='-x "1 2 3" -y 4 5'

And this isn't just tricky to build manually; this is also tricky to build programmatically from the shell. Like, what if you wanted to wanted to do the equivalent of ffmpeg -x "$x"? It would look something like

# to_shell_lit() - Creates a shell literal # Usage: printf '%s\n' "$( to_shell_lit "..." "..." "..." )" to_shell_lit() { local prefix='' local p for p in "$@" ; do printf "$prefix"\' printf %s "$p" | sed "s/'/'\\\\''/g" printf \' prefix=' ' done } --extra-ffmpeg-param="$( to_shell_lit -x "$x" )"

(Source)

This is part of the reason I suggested using multiple args.

-X '-x 1 2 3' -X '-y 4'
-X "-x $x" -X '-y 4'
or
-X 'x=1 2 3' -X 'y=4'
-X "x=$x" -X 'y=4'

In reply to Re^3: Parsing a command-line string into an array by ikegami
in thread Parsing a command-line string into an array by bliako

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.