title: Raspberry Pi Youtube Stream with ffmpeg: libx264 unknown
body: <p>I want to use my raspberry pi 3 for a youtube stream via an usb camera. Therefore, I compiled and installed the following tools:</p>
  
  <p>ffmpeg, libx264, libav-tools</p>
  
  <p>However, when running the following code i always get an <strong>error that the libx264 encoder is unknown</strong>:</p>
  
  <pre><code>ffmpeg -f v4l2 -framerate 25 -video_size 640x480 -i /dev/video0 
  -codec:v libx264 -b:v 700k -maxrate 700k -bufsize 700k -an -f 
  flv rtmp://a.rtmp.youtube.com/live2/MYYOUTUBECODE
  </code></pre>
  
  <p>I installed x264 via clone and make install using <a href="http://www.jeffreythompson.org/blog/2014/11/13/installing-ffmpeg-for-raspberry-pi/" rel="nofollow noreferrer">this guideline</a>. How can I check if this encoder was installed correctly? I am already stuck for 2 days on this problem - please help! </p>
  
  <p>Related hints (e.g. l<a href="https://stackoverflow.com/questions/9764740/unknown-encoder-libx264">ibavcodec-extra codec</a>, <a href="https://superuser.com/questions/893086/unknown-encoder-x264-in-ffmpeg-despite-following-proper-installation-instructi">type errors</a>) regarding this problem unfortunately also didn't help further.</p>
  
  <p>Thank You.</p>
  
  <p>The entire console output is:</p>
  
  <pre><code>ffmpeg version N-81043-ga49ed9e Copyright (c) 2000-2016 the FFmpeg developers
    built with gcc 4.9.2 (Raspbian 4.9.2-10)
    configuration: 
    libavutil      55. 28.100 / 55. 28.100
    libavcodec     57. 50.100 / 57. 50.100
    libavformat    57. 42.100 / 57. 42.100
    libavdevice    57.  0.102 / 57.  0.102
    libavfilter     6. 47.100 /  6. 47.100
    libswscale      4.  1.100 /  4.  1.100
    libswresample   2.  1.100 /  2.  1.100
  [video4linux2,v4l2 @ 0x24132f0] The driver changed the time per frame from 1/25 to 1/30
  Input #0, video4linux2,v4l2, from '/dev/video0':
  Duration: N/A, start: 161119.368327, bitrate: 147456 kb/s
  Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 640x480,     
  147456 kb/s, 30 fps, 30 tbr, 1000k tbn, 1000k tbc
  
  Unknown encoder 'libx264' 
  </code></pre>