title: FFMPEG streaming raw H264
body: <p>Im currently working on streaming a mp4 file encoded with h264 over TCP and decoding at the mobile side (Android).I successfully manage up connection and streaming h264 raw data but that image quality is too bad (half screen is green or purple and everything is pixelized).I started streaming with:</p>
  
  <pre><code>ffmpeg -re \                                                       
  -i test.mp4 \
  -vcodec libx264 \
  -vf scale=1920:1080 \
  -vprofile high \
  -preset ultrafast \
  -b:v 1M -maxrate 2M -bufsize 2M -pass 1 \
  -strict experimental \
  -pix_fmt yuv420p \
  -tune zerolatency \
  -movflags use_metadata_flag \
  -movflags empty_moov+default_base_moof+faststart \
  -f h264 tcp://10.230.253.241:9090
  </code></pre>
  
  <p>Result:
  <a href="https://i.stack.imgur.com/ly6Vj.jpg" rel="nofollow noreferrer">Image</a></p>
  
  <p>Am I on right road and its that possible with raw h264? Any advice would welcome! Thanks</p>