title: FFMPEG encrypt & decrypt Video offline
body: <p>I want encrypt &amp; decrypt Video file With FFMPEG oflfine mode in hard disk.</p>
  <p>I encrypt a Video File (mp4 Extention) by ffmpeg.exe Tools by this Command:</p>
  <pre><code>ffmpeg -i SampleVideo_1280x720_1mb.mp4 -vcodec copy -acodec copy
  -encryption_scheme cenc-aes-ctr -encryption_key
  76a6c65c5ea762046bd749a2e632ccbb -encryption_kid
  a7e61c373e219033c21091fa607bf3b8 SampleVideo_1280x720_1mb_encrypted.mp4
  </code></pre>
  <p>for decryption :
  i want decrypt and play video file (encrypted.mp4) in my player source c++
  (ffmpeg base) and *now i dont wnat use decrypt file with command line with
  ffplay.exe *like this :</p>
  <pre><code>ffplay SampleVideo_1280x720_1mb_encrypted.mp4 -decryption_key
  76a6c65c5ea762046bd749a2e632ccbb
  </code></pre>
  <p><strong>how i can do decrypt with Write programing code that use FFMPEG api?</strong></p>
  <p>thanks in advance.</p>