fluent-ffmpeg / node-fluent-ffmpeg

A fluent API to FFMPEG (http://www.ffmpeg.org)
MIT License
7.94k stars 880 forks source link

-vf seems to error only on fluent-ffmpeg #994

Open oatmealine opened 4 years ago

oatmealine commented 4 years ago

Version information

Code to reproduce

ffmpeg()
// ...
  .outputOptions(['-vf "drawtext=\\"fontfile=./assets/DejaVuSans.ttf: text='A': fontcolor=black: fontsize=140: box=1: boxcolor=white: x=(w-text_w)/2: y=0\\""'])

Expected results

FFmpeg should render a video with text on top

Observed results

FFmpeg errors, and only if doing this through fluent-ffmpeg:

Unrecognized option 'vf "drawtext=\"fontfile=./assets/DejaVuSans.ttf: text='A': fontcolor=black: fontsize=140: box=1: boxcolor=white: x=(w-text_w)/2: y=0\""'.
Error splitting the argument list: Option not found

Full log: ffmpeg.log

turbopasi commented 4 years ago

I am currently using -vf myself with fluent-ffmpeg - -vf crop=1920:1080:n*2:0 . But I am adding it with .addOption([ '-vf ... ' ]) . Try using addOption, maybe it solves your Issue

oatmealine commented 4 years ago

@turbopasi same result

rascala commented 4 years ago

Splitting the params into two parts worked for me. Something like this should work

 .outputOptions('-vf', "drawtext=fontfile=./assets/DejaVuSans.ttf: text='A': fontcolor=black: fontsize=140: box=1: boxcolor=white: x=(w-text_w)/2: y=0")