title: ffmpeg overwrite v4l2-ctl configuration -> how to do real raw device to network copy?
body: <p>I need to do a real device to a tcp socket copy like :</p>
  
  <pre><code>cat /dev/video0 | /bin/nc 127.0.0.1 8000 -w 1
  </code></pre>
  
  <p>This very basic command line work for my case. I want to do the same, but with the ffmpeg process.
  The aim is to standardize the streaming process, this case, a basic raw copy from a device to network, and advanced transcoding from any source to network, always with the same ffmpeg process.</p>
  
  <p>I use v4l2-ctl before ffmpeg to make a lot of configuration that I want to keep.</p>
  
  <p>I tried :</p>
  
  <pre><code>ffmpeg -loglevel debug -i /dev/video0 -f rawvideo tcp://127.0.0.1:8000
  
  ffmpeg -loglevel debug -f v4l2 -i /dev/video0 -f rawvideo tcp://127.0.0.1:8000
  </code></pre>
  
  <p>The probleme here ffmpeg kill my v4l2 configuration, and I <em>don't want</em> to setup it twice (v4l2-ctl interface + ffmpeg interface) in my code.</p>
  
  <p>I also tried :</p>
  
  <pre><code>ffmpeg -loglevel debug -f rawvideo -i /dev/video0 tcp://127.0.0.1:8000
  
  ffmpeg -loglevel debug -f rawvideo -i /dev/video0 -f rawvideo tcp://127.0.0.1:8000
  </code></pre>
  
  <p>I always get this stderr + exit :</p>
  
  <pre><code>[IMGUTILS @ 0x7ec1d5f0] Picture size 0x0 is invalid
  [AVIOContext @ 0x1e8bb40] Statistics: 26 bytes read, 0 seeks
  /dev/video0: Invalid argument
  </code></pre>
  
  <p>I also tried the</p>
  
  <pre><code>-c:v copy
  </code></pre>
  
  <p>parameter for all combination above without success:(</p>
  
  <p>How to do a raw binary copy (like "cat" or "dd" with NetCat) from a device to socket with ffmpeg (without killing v4l2 configuration) ?</p>
  
  <p>Pascal</p>