nyanmisaka / ffmpeg-rockchip

FFmpeg with async and zero-copy Rockchip MPP & RGA support
Other
325 stars 47 forks source link

当摄像头设备分辨率为1920x1080时,tbr帧率识别错误? #54

Closed floydelcy closed 3 months ago

floydelcy commented 3 months ago

Hi,nyanmisaka

我在推流摄像头设备时发现当/dev/video0的分辨率为1920x1080时,ffprobe出帧率为1000k tbr,提示increasing probesize,导致没有输出,设置为1280x720时ffprobe帧率为 59.94 tbr,正常输出 v4l2-ctl -d /dev/video0 --set-fmt-video=width=1920,height=1080,pixelformat='NV12'

./dev/ffmpeg/ffmpeg  -i /dev/video0  -c:v h264_rkmpp -payload_type 126 -f rtp udp://127.0.0.1:8004
ffmpeg version ba84e56 Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 12 (Debian 12.2.0-14)
  configuration: --prefix=/usr --enable-gpl --enable-version3 --enable-libdrm --enable-rkmpp --enable-rkrga
  libavutil      58. 29.100 / 58. 29.100
  libavcodec     60. 31.102 / 60. 31.102
  libavformat    60. 16.100 / 60. 16.100
  libavdevice    60.  3.100 / 60.  3.100
  libavfilter     9. 12.100 /  9. 12.100
  libswscale      7.  5.100 /  7.  5.100
  libswresample   4. 12.100 /  4. 12.100
  libpostproc    57.  3.100 / 57.  3.100
[video4linux2,v4l2 @ 0x55a6fcac70] ioctl(VIDIOC_G_INPUT): Inappropriate ioctl for device
[video4linux2,v4l2 @ 0x55a6fcac70] ioctl(VIDIOC_G_PARM): Inappropriate ioctl for device
[video4linux2,v4l2 @ 0x55a6fcac70] Time per frame unknown
[video4linux2,v4l2 @ 0x55a6fcac70] Stream #0: not enough frames to estimate rate; consider increasing probesize
Input #0, video4linux2,v4l2, from '/dev/video0':
  Duration: N/A, start: 1371.892581, bitrate: N/A
  Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 1920x1080, 1000k tbr, 1000k tbn
nyanmisaka commented 3 months ago

No one can guarantee that the framerate from the probing results of ffmpeg/ffprobe is completely accurate. When it's not accurate, you have to set it manually.

Closing as this is not an issue of MPP/RGA components.