title: How to optimize the FFMPEG h264/aac conversion while generating HLS segments too
body: <p>I am generating HLS segments using FFMPEG. Here is the command that I am using :  </p>
  
  <p>ffmpeg -i "rtmp://localhost/oflaDemo/33/hlsopt3 live=1" -y -c:v libx264 -b:v 1000k -vprofile baseline -preset medium -x264opts level=41 -threads 4 -s 480x360 -map 0:v -c:a libfaac -b:a 160000 -ac 1 -hls_time 3 -hls_list_size 3 -hls_wrap 10 -start_number 1 hlsopt3.m3u8</p>
  
  <p>I am working on Ubuntu 12.04 and using RED5 1.0.2 as my streaming server and I want to stream videos on android and ios devices. But the playback on devices is very jerky, they do not play video smoothly. Also my server's CPU utilization goes to more than 100%. </p>
  
  <p>After so much research I have found that the CPU utilization is due to the H264/mpeg-4 aac conversion, But without doing conversion it wont play on Ios and android devices. </p>
  
  <p>So please suggest me any solution. How I can play it smoothly on mobile devices and also save the CPU utilization.</p>
  
  <p>Please help me I have almost waisted 10 days on this.</p>
  
  <p>Any help would be really appreciated.  </p>