[FFmpeg-user] libx264 vs android 4.4
Patrick Shirkey
pshirkey at boosthardware.com
Fri Jul 11 13:33:56 CEST 2014
On Fri, July 11, 2014 8:37 pm, Carl Eugen Hoyos wrote:
> Patrick Shirkey <pshirkey <at> boosthardware.com> writes:
>
>> On Fri, July 11, 2014 4:55 pm, Carl Eugen Hoyos wrote:
>> > Patrick Shirkey <pshirkey <at> boosthardware.com> writes:
>> >
>> >> ffmpeg -f rawvideo -i /dev/graphics/fb0
>> >
>> > This looks plain wrong.
>
>> The commandline works if I do not use libx264 for
>> the stream codec.
>
> http://ffmpeg.org/ffmpeg-devices.html#fbdev
> indicates that ffmpeg -f fbdev -i /dev/graphics/fb0
> should be used but I unfortunately cannot test here.
>
> Concerning that x264 doesn't work at all, please test:
> $ ffmpeg -f lavfi -i testsrc -pix_fmt yuv420p out.mov
> If this doesn't work, we have to find out why.
>
> If it works, please replace "-f lavfi -i testsrc" with
> the framebuffer input.
>
Both of these commands work:
++++++
$ ffmpeg -f lavfi -i testsrc -pix_fmt yuv420p out.mov
Input #0, lavfi, from 'testsrc':
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0: Video: rawvideo (RGB[24] / 0x18424752), rgb24, 320x240
[SAR 1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
File 'out.mov' already exists. Overwrite ? [y/N] y
[libx264 @ 0x2ca35b0] using SAR=1/1
[libx264 @ 0x2ca35b0] using cpu capabilities: ARMv6 NEON
[libx264 @ 0x2ca35b0] profile High, level 1.3
[libx264 @ 0x2ca35b0] 264 - core 142 r2431 a5831aa - H.264/MPEG-4 AVC
codec - Copyleft 2003-2014 - http://www.videolan.org/x264.html - options:
cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1
psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1
cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=3
lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0
bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1
b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25
scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0
qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
[mov @ 0x2ca27f0] Using AVStream.codec.time_base as a timebase hint to the
muxer is deprecated. Set AVStream.time_base instead.
Output #0, mov, to 'out.mov':
Metadata:
encoder : Lavf55.45.100
Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p,
320x240 [SAR 1:1 DAR 4:3], q=-1--1, 25 fps, 12800 tbn, 25 tbc
Metadata:
encoder : Lavc55.69.100 libx264
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
Press [q] to stop, [?] for help
++++++
$ ffmpeg -f fbdev -i /dev/graphics/fb0 -pix_fmt yuv420p out.mov
[fbdev @ 0x2f7aeb0] w:800 h:480 bpp:32 pixfmt:bgra fps:25/1
bit_rate:307200000
Input #0, fbdev, from '/dev/graphics/fb0':
Duration: N/A, start: 1405078097.050518, bitrate: 307200 kb/s
Stream #0:0: Video: rawvideo (BGRA / 0x41524742), bgra, 800x480,
307200 kb/s, 25 tbr, 1000k tbn, 25 tbc
File 'out.mov' already exists. Overwrite ? [y/N] y
[libx264 @ 0x2f7d250] using cpu capabilities: ARMv6 NEON
[libx264 @ 0x2f7d250] profile High, level 3.0
[libx264 @ 0x2f7d250] 264 - core 142 r2431 a5831aa - H.264/MPEG-4 AVC
codec - Copyleft 2003-2014 - http://www.videolan.org/x264.html - options:
cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1
psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1
cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=3
lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0
bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1
b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25
scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0
qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
[mov @ 0x2f7c370] Using AVStream.codec.time_base as a timebase hint to the
muxer is deprecated. Set AVStream.time_base instead.
Output #0, mov, to 'out.mov':
Metadata:
encoder : Lavf55.45.100
Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p,
800x480, q=-1--1, 25 fps, 12800 tbn, 25 tbc
Metadata:
encoder : Lavc55.69.100 libx264
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
++++++
- Theoretically, this one should work but it still gives me the same error:
++++++
$ ffmpeg -f fbdev -i /dev/graphics/fb0 -pix_fmt yuv420p -preset:v fast
http://localhost:8090/feed1.ffm
[fbdev @ 0x2118ee0] w:800 h:480 bpp:32 pixfmt:bgra fps:25/1
bit_rate:307200000
Input #0, fbdev, from '/dev/graphics/fb0':
Duration: N/A, start: 1405077717.339715, bitrate: 307200 kb/s
Stream #0:0: Video: rawvideo (BGRA / 0x41524742), bgra, 800x480,
307200 kb/s, 25 tbr, 1000k tbn, 25 tbc
Codec AVOption preset (Set the encoding preset (cf. x264 --fullhelp))
specified for output file #0 (http://localhost:8090/feed1.ffm) has not
been used for any stream. The most likely reason is either wrong type
(e.g. a video option with no video streams) or that it is a private option
of some encoder which was not actually used for any stream.
No pixel format specified, yuv444p for H.264 encoding chosen.
Use -pix_fmt yuv420p for compatibility with outdated media players.
[libx264 @ 0x211f040] broken ffmpeg default settings detected
[libx264 @ 0x211f040] use an encoding preset (e.g. -vpre medium)
[libx264 @ 0x211f040] preset usage: -vpre <speed> -vpre <profile>
[libx264 @ 0x211f040] speed presets are listed in x264 --help
[libx264 @ 0x211f040] profile is optional; x264 defaults to high
Output #0, ffm, to 'http://localhost:8090/feed1.ffm':
Metadata:
creation_time : now
Stream #0:0: Video: h264, 480x800, q=2-31, 100 kb/s, 25 fps, 1000k
tbn, 1 tbc
Metadata:
encoder : Lavc55.69.100 libx264
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
Error while opening encoder for output stream #0:0 - maybe incorrect
parameters such as bit_rate, rate, width or height
++++++
- I I use -vpre fast instead of -preset:v fast I get the following error.
IIUC this is because ffmpeg does not support passing the -vpre flag to
libx264 anymore.
++++++
$ ffmpeg -f fbdev -i /dev/graphics/fb0 -pix_fmt yuv420p -vpre fast
http://localhost:8090/feed1.ffm
[fbdev @ 0x2584cf0] w:800 h:480 bpp:32 pixfmt:bgra fps:25/1
bit_rate:307200000
Input #0, fbdev, from '/dev/graphics/fb0':
Duration: N/A, start: 1405077949.460116, bitrate: 307200 kb/s
Stream #0:0: Video: rawvideo (BGRA / 0x41524742), bgra, 800x480,
307200 kb/s, 25 tbr, 1000k tbn, 25 tbc
File for preset 'fast' not found
++++++
--
Patrick Shirkey
Boost Hardware Ltd
More information about the ffmpeg-user
mailing list