javascript - nodejs adding double quotes to command arguments? -


example:

ffmpeg -i test.mkv -metadata title="test 123" -c copy temp.mkv 

ffmpeg sees ""test 123"". happens spawn() , execfile()

if run same command in windows shell ffmpeg sees correctly "test 123"

so what's nodejs?

here's nodejs code:

var process = spawn('ffmpeg', [   '-i',   infile,   '-metadata',   'title="test 123"',        '-c',   'copy',   outfile ]); 

you need switch "title='test 123'" since double quotes have precedence on single quotes. stdin should parse right title="test 123".


Comments

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -