title: how to use ffmpeg with gpu support on macos
body: <p>when i exec ffmpeg command, it use my cpu to render videos, it take long time to do this job, how i can force ffmpeg use my gpu to render? 
  i have a mac os with AMD Radeon R9 M370X 2048 MB Graphic card. 
  what i must install and what command i must use for this work? 
  i use this commands when my script run:</p>
  
  <pre><code>    $source_decoder = "ffmpeg -i $film_aval_source -vf drawtext=\"text_shaping=1:fontfile=$font_source:
                 text='$esme_film': fontcolor=black: fontsize=$font_size: box=1: boxcolor=black@0:
                  boxborderw=0: x=(w-text_w)/2: y=(h-text_h)/2 :enable='between(t,5,10)'\"  -c:a copy -force_key_frames 0:05:00,0:6:00 $film_aval_dest";
  
      $source_decoder = "ffmpeg -i $film_aval_source -i ".$path."/Data.jpg -filter_complex '[0:v][1:v]overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2:enable=between(t\,5\,10)' -codec:a copy $film_aval_dest";
  
      $convert1 = "ffmpeg -i $film_aval_dest -map 0 -flags:v +global_header -c:v libx264 -bsf:v dump_extra ".$path."output1.ts";
  
      $convert_logo = "ffmpeg -i $path_tmp -i ".$main_path."/data/logo.png -filter_complex 'overlay=4:4' -codec:a copy $path_tmp2";
  
      $convert2 = "ffmpeg -i $path_tmp2 -map 0 -flags:v +global_header -c:v libx264 -bsf:v dump_extra ".$path."output2.ts";
      $merge = "ffmpeg -i 'concat:".$path."output1.ts|".$path."output2.ts' -map 0 -flags:v +global_header -c:v libx264 -bsf:v dump_extra ".$path."output_new.ts";
      $convert3 = "ffmpeg -i  ".$path."output_new.ts -acodec aac -vcodec copy ".$path."video_out2.mp4";
  </code></pre>
  
  <p>thanks</p>