-1

I want to use my raspberry pi 3 for a youtube stream via an usb camera. Therefore, I compiled and installed the following tools:

ffmpeg, libx264, libav-tools

However, when running the following code i always get an error that the libx264 encoder is unknown:

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

I installed x264 via clone and make install using this guideline. How can I check if this encoder was installed correctly? I am already stuck for 2 days on this problem - please help!

Related hints (e.g. libavcodec-extra codec, type errors) regarding this problem unfortunately also didn't help further.

Thank You.

The entire console output is:

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' 
Community
  • 1
  • 1
tm011036
  • 21
  • 5

1 Answers1

1

You compiled ffmpeg with no additional configuration options. Encoding with x264 requires libx264-dev as a dependency and adding --enable-gpl and --enable-libx264 configuration options.

llogan
  • 121,796
  • 28
  • 232
  • 243