title: FFMPEG : Capture and Stream from Android Mobile Camera
body: <p>I am checking for how we can use ffmpeg command line in android like using WritingMinds ffmpeg compiled for Android or any other Git project.</p>
  
  <p>I am trying to set following command:</p>
  
  <p>-loglevel trace -f android_camera -camera_index 0 -video_size hd720 -framerate 30 -input_queue_size 2 -i discarded -map 0 -vcodec libx264 -y /sdcard/editor_input/out.mp4"</p>
  
  <p>But it gives Unrecognized option 'camera_index'.</p>
  
  <p>There are some project like "<a href="https://github.com/CrazyOrr/FFmpegRecorder" rel="nofollow noreferrer">https://github.com/CrazyOrr/FFmpegRecorder</a>" which has Recorder App to store MP4 file but they seems uses FFMPEG APIs and code for getting frames and all, I Just want to directly use ffmpeg as commandline like we use in Linux.</p>
  
  <p>Can someone please guide what is best way to capture from android camera and stream MPEGTS stream on UDP?</p>
  
  <p>Thanks.</p>