Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using bcm2835-codec wastes dmesg (similar to #817) #5423

Open
jjsuwa-sys3175 opened this issue Apr 10, 2023 · 0 comments
Open

Using bcm2835-codec wastes dmesg (similar to #817) #5423

jjsuwa-sys3175 opened this issue Apr 10, 2023 · 0 comments

Comments

@jjsuwa-sys3175
Copy link

Describe the bug

A problem similar to #817 also occurs with bcm2835-codec.

Steps to reproduce the behaviour

For example, using FFmpeg with h264_v4l2m2m for a very short time:

pi@Raspi3B:/tmp$ sudo dmesg -C; ffmpeg -hide_banner -y -t 2 -f v4l2 -input_format mjpeg -video_size 1920:1080 -framerate 30 -i /dev/video0 -c:v h264_v4l2m2m -num_capture_buffers 32 -pix_fmt yuv420p -b:v 2500k /tmp/test.mp4; dmesg
Input #0, video4linux2,v4l2, from '/dev/video0':
  Duration: N/A, start: 786.464202, bitrate: N/A
  Stream #0:0: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 1920x1080, 30 fps, 30 tbr, 1000k tbn
Stream mapping:
  Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (h264_v4l2m2m))
Press [q] to stop, [?] for help
[swscaler @ 0x55a394de90] deprecated pixel format used, make sure you did set range correctly
    Last message repeated 3 times
[h264_v4l2m2m @ 0x55a3922950] Using device /dev/video11
[h264_v4l2m2m @ 0x55a3922950] driver 'bcm2835-codec' on card 'bcm2835-codec-encode' in mplane mode
[h264_v4l2m2m @ 0x55a3922950] requesting formats: output=YU12/yuv420p capture=H264/none
Output #0, mp4, to '/tmp/test.mp4':
  Metadata:
    encoder         : Lavf60.4.101
  Stream #0:0: Video: h264 (avc1 / 0x31637661), yuv420p(tv, bt470bg/unknown/unknown, progressive), 1920x1080, q=2-31, 2500 kb/s, 30 fps, 15360 tbn
    Metadata:
      encoder         : Lavc60.9.100 h264_v4l2m2m
[mp4 @ 0x55a3920860] 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=   61 fps= 26 q=-0.0 Lsize=     463kB time=00:00:01.96 bitrate=1927.7kbits/s dup=25 drop=0 speed=0.842x    
video:462kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.238809%
[  789.149795] ------------[ cut here ]------------
[  789.149813] WARNING: CPU: 0 PID: 1069 at drivers/media/common/videobuf2/videobuf2-core.c:2035 __vb2_queue_cancel+0x1b8/0x220 [videobuf2_common]
[  789.149860] Modules linked in: md5 cmac aes_arm64 aes_generic libaes hmac nls_utf8 cifs cifs_arc4 cifs_md4 sg zstd zstd_compress zram zsmalloc snd_usb_audio snd_hwdep snd_usbmidi_lib snd_rawmidi uvcvideo snd_seq_device brcmfmac brcmutil cfg80211 bcm2835_v4l2(C) bcm2835_codec(C) bcm2835_isp(C) v4l2_mem2mem bcm2835_mmal_vchiq(C) videobuf2_vmalloc videobuf2_dma_contig videobuf2_memops videobuf2_v4l2 raspberrypi_hwmon videobuf2_common snd_bcm2835(C) rfkill snd_pcm videodev snd_timer snd mc vc_sm_cma(C) uio_pdrv_genirq uio drm fuse drm_panel_orientation_quirks backlight ip_tables x_tables ipv6
[  789.150048] CPU: 0 PID: 1069 Comm: ffmpeg Tainted: G        WC         6.1.21-v8+ #1642
[  789.150057] Hardware name: Raspberry Pi 3 Model B Rev 1.2 (DT)
[  789.150063] pstate: 20000005 (nzCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[  789.150072] pc : __vb2_queue_cancel+0x1b8/0x220 [videobuf2_common]
[  789.150101] lr : __vb2_queue_cancel+0x3c/0x220 [videobuf2_common]
[  789.150130] sp : ffffffc0089abae0
[  789.150134] x29: ffffffc0089abae0 x28: ffffffef3d5e3938 x27: 0000000000000000
[  789.150148] x26: 0000000040045613 x25: ffffff8003b06d28 x24: 0000000000000000
[  789.150162] x23: ffffff8007862700 x22: ffffffefa3cad858 x21: ffffff800f6ec828
[  789.150177] x20: ffffff800f6ec828 x19: ffffff800f6ec828 x18: ffffff80067c0028
[  789.150191] x17: 00000001a30eb914 x16: ffffffefa3969bb0 x15: ffffff800b43e888
[  789.150205] x14: 0000000000000000 x13: ffffff80067c0028 x12: ffffff800b43e6c8
[  789.150219] x11: 0000000000000000 x10: ffffff80067c0030 x9 : ffffffef3d63124c
[  789.150233] x8 : ffffff800b43e6f0 x7 : 0000000000000000 x6 : 0000000000000001
[  789.150247] x5 : ffffff8003b0581c x4 : ffffff80052f5c40 x3 : ffffff80067c0008
[  789.150261] x2 : 0000000000000002 x1 : 0000000000000000 x0 : 0000000000000007
[  789.150275] Call trace:
[  789.150279]  __vb2_queue_cancel+0x1b8/0x220 [videobuf2_common]
[  789.150308]  vb2_core_streamoff+0x2c/0xc8 [videobuf2_common]
[  789.150337]  vb2_streamoff+0x24/0x78 [videobuf2_v4l2]
[  789.150362]  v4l2_m2m_streamoff+0x44/0x130 [v4l2_mem2mem]
[  789.150394]  v4l2_m2m_ioctl_streamoff+0x20/0x30 [v4l2_mem2mem]
[  789.150421]  v4l_streamoff+0x2c/0x38 [videodev]
[  789.150510]  __video_do_ioctl+0x184/0x3d8 [videodev]
[  789.150583]  video_usercopy+0x2d8/0x740 [videodev]
[  789.150656]  video_ioctl2+0x20/0x38 [videodev]
[  789.150729]  v4l2_ioctl+0x48/0x68 [videodev]
[  789.150802]  __arm64_sys_ioctl+0xb0/0xf0
[  789.150816]  invoke_syscall+0x4c/0x110
[  789.150827]  el0_svc_common.constprop.3+0xfc/0x120
[  789.150838]  do_el0_svc+0x34/0xd0
[  789.150847]  el0_svc+0x30/0x88
[  789.150858]  el0t_64_sync_handler+0x98/0xc0
[  789.150868]  el0t_64_sync+0x18c/0x190
[  789.150876] ---[ end trace 0000000000000000 ]---

Device (s)

Raspberry Pi 3 Mod. B

System

Firmware version: the latest (raspberrypi/rpi-firmware@0b15297)
Kernel version: 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux

Logs

No response

Additional context

There is no problem with the encoding result itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant