[FFmpeg-user] h264_v4l2m2m won't write to .mkv

Neale Pickett neale at woozle.org
Mon Mar 6 20:39:58 EET 2023


> When asking questions, do not use -hide_banner, it conceals
> possibly-important information (please read the list FAQ, linked from the
> list info page). A few blanks lines for readability wouldn't hurt, either.

My apologies, I misinterpreted the word "avoid".
Here's the same thing with full output, on a blank video.
This behavior is consistent with every input file I've tried,
including a png.

sweetums:/home/neale/tmp % ffmpeg -y -t 2 -s 320x200 -f rawvideo
-pix_fmt yuv420p -r 25 -i /dev/zero -c:v h264_v4l2m2m out.mkv
ffmpeg version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2000-2021 the
FFmpeg developers
  built with gcc 11 (Ubuntu 11.2.0-19ubuntu1)
  configuration: --prefix=/usr --extra-version=0ubuntu0.22.04.1
--toolchain=hardened --libdir=/usr/lib/aarch64-linux-gnu
--incdir=/usr/include/aarch64-linux-gnu --arch=arm64 --enable-gpl
--disable-stripping --enable-gnutls --enable-ladspa --enable-libaom
--enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca
--enable-libcdio --enable-libcodec2 --enable-libdav1d
--enable-libflite --enable-libfontconfig --enable-libfreetype
--enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack
--enable-libmp3lame --enable-libmysofa --enable-libopenjpeg
--enable-libopenmpt --enable-libopus --enable-libpulse
--enable-librabbitmq --enable-librubberband --enable-libshine
--enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt
--enable-libssh --enable-libtheora --enable-libtwolame
--enable-libvidstab --enable-libvorbis --enable-libvpx
--enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid
--enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2
--enable-omx --enable-openal --enable-opencl --enable-opengl
--enable-sdl2 --enable-pocketsphinx --enable-librsvg
--enable-libdc1394 --enable-libdrm --enable-libiec61883
--enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
Input #0, rawvideo, from '/dev/zero':
  Duration: N/A, start: 0.000000, bitrate: 19200 kb/s
  Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 320x200,
19200 kb/s, 25 tbr, 25 tbn, 25 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (h264_v4l2m2m))
Press [q] to stop, [?] for help
[h264_v4l2m2m @ 0xaaaafd94cec0] Using device /dev/video11
[h264_v4l2m2m @ 0xaaaafd94cec0] driver 'bcm2835-codec' on card
'bcm2835-codec-encode' in mplane mode
[h264_v4l2m2m @ 0xaaaafd94cec0] requesting formats: output=YU12 capture=H264
[h264_v4l2m2m @ 0xaaaafd94cec0] Failed to set gop size: Invalid argument
Could not write header for output file #0 (incorrect codec parameters
?): Invalid data found when processing input
Error initializing output stream 0:0 --
Conversion failed!



sweetums:/home/neale/tmp % ffmpeg -y -t 2 -s 320x200 -f rawvideo
-pix_fmt yuv420p -r 25 -i /dev/zero -c:v h264_v4l2m2m out.nut
ffmpeg version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2000-2021 the
FFmpeg developers
  built with gcc 11 (Ubuntu 11.2.0-19ubuntu1)
  configuration: --prefix=/usr --extra-version=0ubuntu0.22.04.1
--toolchain=hardened --libdir=/usr/lib/aarch64-linux-gnu
--incdir=/usr/include/aarch64-linux-gnu --arch=arm64 --enable-gpl
--disable-stripping --enable-gnutls --enable-ladspa --enable-libaom
--enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca
--enable-libcdio --enable-libcodec2 --enable-libdav1d
--enable-libflite --enable-libfontconfig --enable-libfreetype
--enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack
--enable-libmp3lame --enable-libmysofa --enable-libopenjpeg
--enable-libopenmpt --enable-libopus --enable-libpulse
--enable-librabbitmq --enable-librubberband --enable-libshine
--enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt
--enable-libssh --enable-libtheora --enable-libtwolame
--enable-libvidstab --enable-libvorbis --enable-libvpx
--enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid
--enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2
--enable-omx --enable-openal --enable-opencl --enable-opengl
--enable-sdl2 --enable-pocketsphinx --enable-librsvg
--enable-libdc1394 --enable-libdrm --enable-libiec61883
--enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
Input #0, rawvideo, from '/dev/zero':
  Duration: N/A, start: 0.000000, bitrate: 19200 kb/s
  Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 320x200,
19200 kb/s, 25 tbr, 25 tbn, 25 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (h264_v4l2m2m))
Press [q] to stop, [?] for help
[h264_v4l2m2m @ 0xaaab0b1d5e60] Using device /dev/video11
[h264_v4l2m2m @ 0xaaab0b1d5e60] driver 'bcm2835-codec' on card
'bcm2835-codec-encode' in mplane mode
[h264_v4l2m2m @ 0xaaab0b1d5e60] requesting formats: output=YU12 capture=H264
[h264_v4l2m2m @ 0xaaab0b1d5e60] Failed to set gop size: Invalid argument
Output #0, nut, to 'out.nut':
  Metadata:
    encoder         : Lavf58.76.100
  Stream #0:0: Video: h264 (H264 / 0x34363248), yuv420p(progressive),
320x200, q=2-31, 200 kb/s, 25 fps, 51200 tbn
    Metadata:
      encoder         : Lavc58.134.100 h264_v4l2m2m
[nut @ 0xaaab0b1d3a00] Non-monotonous DTS in output stream 0:0;
previous: 0, current: 0; changing to 1. This may result in incorrect
timestamps in the output file.
frame=   50 fps=0.0 q=-0.0 Lsize=       1kB time=00:00:01.96 bitrate=
 4.5kbits/s speed=25.8x
video:1kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 60.982658%



sweetums:/home/neale/tmp % ffmpeg -y -i out.nut out.mkv
ffmpeg version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2000-2021 the
FFmpeg developers
  built with gcc 11 (Ubuntu 11.2.0-19ubuntu1)
  configuration: --prefix=/usr --extra-version=0ubuntu0.22.04.1
--toolchain=hardened --libdir=/usr/lib/aarch64-linux-gnu
--incdir=/usr/include/aarch64-linux-gnu --arch=arm64 --enable-gpl
--disable-stripping --enable-gnutls --enable-ladspa --enable-libaom
--enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca
--enable-libcdio --enable-libcodec2 --enable-libdav1d
--enable-libflite --enable-libfontconfig --enable-libfreetype
--enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack
--enable-libmp3lame --enable-libmysofa --enable-libopenjpeg
--enable-libopenmpt --enable-libopus --enable-libpulse
--enable-librabbitmq --enable-librubberband --enable-libshine
--enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt
--enable-libssh --enable-libtheora --enable-libtwolame
--enable-libvidstab --enable-libvorbis --enable-libvpx
--enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid
--enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2
--enable-omx --enable-openal --enable-opencl --enable-opengl
--enable-sdl2 --enable-pocketsphinx --enable-librsvg
--enable-libdc1394 --enable-libdrm --enable-libiec61883
--enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
[h264 @ 0xaaaafd5946e0] no frame!
Input #0, nut, from 'out.nut':
  Metadata:
    encoder         : Lavf58.76.100
  Duration: 00:00:01.96, start: 0.000000, bitrate: 4 kb/s
  Stream #0:0: Video: h264 (High) (H264 / 0x34363248), yuv420p,
320x200, 25 fps, 25 tbr, 51200 tbn, 60 tbc
    Metadata:
      encoder         : Lavc58.134.100 h264_v4l2m2m
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[h264 @ 0xaaaafd5c1120] no frame!
Error while decoding stream #0:0: Invalid data found when processing input
[libx264 @ 0xaaaafd5ba1b0] using cpu capabilities: ARMv8 NEON
[libx264 @ 0xaaaafd5ba1b0] profile High, level 1.3, 4:2:0, 8-bit
[libx264 @ 0xaaaafd5ba1b0] 264 - core 163 r3060 5db6aa6 - H.264/MPEG-4
AVC codec - Copyleft 2003-2021 - 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=6 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
Output #0, matroska, to 'out.mkv':
  Metadata:
    encoder         : Lavf58.76.100
  Stream #0:0: Video: h264 (H264 / 0x34363248), yuv420p(progressive),
320x200, q=2-31, 25 fps, 1k tbn
    Metadata:
      encoder         : Lavc58.134.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
frame=   50 fps=0.0 q=-1.0 Lsize=       2kB time=00:00:01.88 bitrate=
10.6kbits/s speed=11.2x
video:1kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 62.933857%
[libx264 @ 0xaaaafd5ba1b0] frame I:1     Avg QP: 9.00  size:    68
[libx264 @ 0xaaaafd5ba1b0] frame P:13    Avg QP: 9.69  size:    22
[libx264 @ 0xaaaafd5ba1b0] frame B:36    Avg QP:12.67  size:    14
[libx264 @ 0xaaaafd5ba1b0] consecutive B-frames:  4.0%  0.0%  0.0% 96.0%
[libx264 @ 0xaaaafd5ba1b0] mb I  I16..4: 100.0%  0.0%  0.0%
[libx264 @ 0xaaaafd5ba1b0] mb P  I16..4:  0.0%  0.0%  0.0%  P16..4:
0.0%  0.0%  0.0%  0.0%  0.0%    skip:100.0%
[libx264 @ 0xaaaafd5ba1b0] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8:
0.0%  0.0%  0.0%  direct: 0.0%  skip:100.0%
[libx264 @ 0xaaaafd5ba1b0] 8x8 transform intra:0.0%
[libx264 @ 0xaaaafd5ba1b0] coded y,uvDC,uvAC intra: 0.0% 0.4% 0.0%
inter: 0.0% 0.0% 0.0%
[libx264 @ 0xaaaafd5ba1b0] i16 v,h,dc,p: 92%  0%  8%  0%
[libx264 @ 0xaaaafd5ba1b0] i8c dc,h,v,p: 100%  0%  0%  0%
[libx264 @ 0xaaaafd5ba1b0] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0xaaaafd5ba1b0] kb/s:3.35


On Mon, Mar 6, 2023 at 11:26 AM Carl Zwanzig <cpz at tuunq.com> wrote:
>
> On 3/6/2023 10:20 AM, Neale Pickett wrote:
> >  ffmpeg -y -hide_banner
>
> When asking questions, do not use -hide_banner, it conceals
> possibly-important information (please read the list FAQ, linked from the
> list info page). A few blanks lines for readability wouldn't hurt, either.
>
> Have you tried this with a similar MP4 file or is it just this one file?
>
> z!
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-user mailing list