ffmpeg - Node.js spawn not working with quotes inside argument -
i'm trying run command spawn
var args = ['-ss','00:00:15','-i',storage_path + doc.file_name,'-vframes','1','-vf','"scale='+size*2+':ih*'+size*2+'/iw,crop='+size+':'+size+'"','-f','image2','-q:v','5',storage_path + output_name]; var command = spawn('ffmpeg', args);
the issue seems part here: '"scale='+size*2+':ih*'+size*2+'/iw,crop='+size+':'+size+'"'
when log args, get:
[ '-ss', '00:00:15', '-i', '/a/video.mp4', '-vframes', '1', '-vf', '"scale=150:ih*150/iw, crop=75:75"', '-f', 'image2', '-q:v', '5', '/a/75.jpg' ]
if take that, , .join(' ')
, command: -ss 00:00:15 -i /a/video.mp4 -vframes 1 -vf "scale=150:ih*150/iw, crop=75:75" -f image2 -q:v 5 /a/75.jpg
when run ffmpeg this, good.
any ideas how format spawn arguments?
thank you!
don't use quotes vf
:
'scale='+size*2+':ih*'+size*2+'/iw,crop='+size+':'+size
Comments
Post a Comment