title: Redirect file contents from android to computer
body: <p>I'm executing an adb shell call to create a new image file with ffmpeg. Currently, I save the outputted jpg of the ffmpeg conversion to the device, and then pull the file to the computer using adb pull. I'm wondering if I can cut out having to save it on the android first, and just save it directly to the computer instead.</p>
  
  <p>Here is the code (essentially) I am trying to run:</p>
  
  <pre><code>adb shell "screencap | /data/local/tmp/tools/./ffmpeg -f rawvideo -vcodec mjpeg -q:v 5 -" &gt; C:/Users/User/Desktop/new.jpg
  </code></pre>
  
  <p>Unfortunately, when I run this, it copies not only the output data of the ffmpeg call, but everything that would have been printed to the adb standard output. So I am left with a jpg file that has all of my image data, but with a bunch of words at the top (the output of the adb shell call).</p>
  
  <p>Thank you.</p>