--hls-liveradio-opts
Jeremy Nicoll - ml get_iplayer
jn.ml.gti.91 at wingsandbeaks.org.uk
Mon Dec 15 09:51:41 PST 2014
"Vangelis forthnet" <northmedia1 at the.forthnet.gr> wrote:
> ... which means that I input it correctly in my GiP command, however
> further down the log I am seeing that it was not parsed correctly, since:
>
>INFO: Command: ".\ffmpeg\bin\ffmpeg.exe" ... "-headers"
"\"X-Forwarded-For:"
>"31.3.xxx.xxx\"" ...
I think this shows that each individual word/token on the ffmpeg command
line has been wrapped up in double-quotes? So for example the '-headers'
parameter shows up in the final command as '"-headers"'.
Then if one had a multi-word parameter, eg '-x yz', it would become
'"-x" "yz"' when it should (perhaps?) have been '"-x yz"'?
I noticed this a while ago and thought it was odd seeing eg '-x' turning
into '"-x"'. It seems to me that perl only needs to enclose any parameter
in double quotes if it has embedded spaces in it.
I'm guessing the escaped double quotes inside your parameter are not the
problem. I wonder if, in:
>package Streamer::hls;
>........
># Add custom options to ffmpeg for this type if specified
>with --hls-<type>-opts
> if ( defined $opt->{'hls'.$prog->{type}.'opts'} ) {
> push @cmdopts, ( split /\s+/,
that 'split' is splitting the option string into words when it shouldn't be?
But to my (ignorant-of-perl) eyes this doesn't explain where the extra
double quotes come from. What does 'push' do? Or is there some other
process that scans along a built command line and inserts more quotes?
--
Jeremy Nicoll - my opinions are my own.
More information about the get_iplayer
mailing list