[FFmpeg-user] libx264 - unknown decoder,

Sw@g sweetthdevil at gmail.com
Sun Jun 26 12:21:57 CEST 2011



On 06/26/2011 04:21 AM, Lou wrote:
> On Sun, Jun 26, 2011 at 04:02:43AM +0100, Sw at g wrote:
>>
>> On 06/26/2011 03:45 AM, Lou wrote:
>>> On Sun, Jun 26, 2011 at 03:28:48AM +0100, Sw at g wrote:
>>>> Hi all,
>>>>
>>>> I am recording a webcam using ffmpeg (ideally to replace mencoder) on
>>>> archlinux (the latest package has been updated on 7th of June) and when
>>>> running the following command I run into the "Unknown decoder 'libx264'"
>>>>
>>>> But as you can see from the error ffmpeg has been build with the
>>>> --enable-libx264 options.
>>>>
>>>> Any suggestions?
>>>>
>>>> Looking forward for your reply,
>>>>
>>>> Regards,
>>>>
>>>> $ ffmpeg -f video4linux2 -vcodec libx264 -b 3000k -r 15 -crf 16 -pix_fmt
>>>> yuv420p -i /dev/video0 out.avi
>>>> ffmpeg version git-N-30610-g1929807, Copyright (c) 2000-2011 the FFmpeg
>>>> developers
>>>>     built on Jun  7 2011 19:14:56 with gcc 4.6.0 20110513 (prerelease)
>>>>     configuration: --enable-gpl --enable-libx264 --enable-x11grab
>>>>     libavutil    51.  6. 1 / 51.  6. 1
>>>>     libavcodec   53.  6. 1 / 53.  6. 1
>>>>     libavformat  53.  2. 0 / 53.  2. 0
>>>>     libavdevice  53.  1. 1 / 53.  1. 1
>>>>     libavfilter   2. 14. 0 /  2. 14. 0
>>>>     libswscale    0. 14. 1 /  0. 14. 1
>>>>     libpostproc  51.  2. 0 / 51.  2. 0
>>>> Unknown decoder 'libx264'
>>> You're applying '-vcodec libx264' as an input option, and your input is
>>> being decoded, so FFmpeg is expecting a decoder called libx264 but there
>>> is no such thing.
>>>
>>> If you want to encode with libx264 then use it as an output option (after
>>> -i foo).
>> Many thanks for your reply,
>>
>> I tried like your suggested:
>> ffmpeg -f video4linux2 -b 3000k -r 15 -crf 16 -pix_fmt yuv420p -i -vcodec libx264 /dev/video0 out.avi
> With this command you're telling FFmpeg that your input is named "-vcodec".
>
>> but that give me an error:
>> [video4linux2 @ 0x9fab8e0] Cannot open video device -vcodec : No such file or directory
>>
>> So I tried:
>> ffmpeg -f video4linux2 -b 3000k -r 15 -crf 16 -pix_fmt yuv420p -i /dev/video0 out.mkv -vcodec libx264
>>
>> that work without error, but when I check mediainfo -f out.mkv then I can see the "Codec : V_MPEG4/ISO/ASP" so obviously ffmpeg hasn't encode with libx264.
>>
>> What would the command be exactly?
> I'm not sure what you want, but you can start with something like:
>
> ffmpeg -f video4linux2 -r 15 -i /dev/video0 -vcodec libx264 -preset medium \
> -crf 26 -threads 0 output.mkv
>
> If the quality is too crappy then decrease the crf value until it looks
> good enough to you.
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user

Many thanks that work like a charm,

regards,


More information about the ffmpeg-user mailing list