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

H.264 hardware encoder bug #776

Open
cppcoffee opened this issue Feb 7, 2025 · 4 comments
Open

H.264 hardware encoder bug #776

cppcoffee opened this issue Feb 7, 2025 · 4 comments

Comments

@cppcoffee
Copy link

cppcoffee commented Feb 7, 2025

Use NanoPi R5C Rockchip RK3568B2 CPU to capturing the Windows 10 installation interface and then performing H.264 hardware encoding using RK3568 triggers a bug in the H.264 hardware encoder.

The command used is as follows:

gst-launch-1.0 rtspclientsink name=s location=rtsp://localhost:8554/mystream -e v4l2src device=/dev/video0 ! image/jpeg,width=1920,height=1080 ! mppjpegdec ! videoconvert ! mpph264enc rc-mode=vbr ! h264parse ! queue ! s.sink_0
Image Image
@cppcoffee
Copy link
Author

cppcoffee commented Feb 7, 2025

CPU:

root@NanoPi-R5C:/home/pi# lscpu
Architecture:            aarch64
  CPU op-mode(s):        32-bit, 64-bit
  Byte Order:            Little Endian
CPU(s):                  4
  On-line CPU(s) list:   0-3
Vendor ID:               ARM
  Model name:            Cortex-A55
    Model:               0
    Thread(s) per core:  1
    Core(s) per cluster: 4
    Socket(s):           -
    Cluster(s):          1
    Stepping:            r2p0
    CPU(s) scaling MHz:  100%
    CPU max MHz:         1992.0000
    CPU min MHz:         408.0000
    BogoMIPS:            48.00
    Flags:               fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp
Vulnerabilities:
  Itlb multihit:         Not affected
  L1tf:                  Not affected
  Mds:                   Not affected
  Meltdown:              Not affected
  Mmio stale data:       Not affected
  Retbleed:              Not affected
  Spec store bypass:     Not affected
  Spectre v1:            Mitigation; __user pointer sanitization
  Spectre v2:            Not affected
  Srbds:                 Not affected
  Tsx async abort:       Not affected

List devices:

root@NanoPi-R5C:/home/pi# v4l2-ctl --list-devices
USB3. 0 capture: USB3. 0 captur (usb-xhci-hcd.4.auto-1):
        /dev/video0
        /dev/video1
        /dev/media0

The video0 information:

root@NanoPi-R5C:/home/pi# v4l2-ctl -d /dev/video0 --all
Driver Info:
        Driver name      : uvcvideo
        Card type        : USB3. 0 capture: USB3. 0 captur
        Bus info         : usb-xhci-hcd.4.auto-1
        Driver version   : 6.1.25
        Capabilities     : 0x84a00001
root@NanoPi-R5C:/home/pi# v4l2-ctl -d /dev/video0 --all
Driver Info:
        Driver name      : uvcvideo
        Card type        : USB3. 0 capture: USB3. 0 captur
        Bus info         : usb-xhci-hcd.4.auto-1
        Driver version   : 6.1.25
        Capabilities     : 0x84a00001
                Video Capture
                Metadata Capture
                Streaming
                Extended Pix Format
                Device Capabilities
        Device Caps      : 0x04200001
                Video Capture
                Streaming
                Extended Pix Format
Media Driver Info:
        Driver name      : uvcvideo
        Model            : USB3. 0 capture: USB3. 0 captur
        Serial           :
        Bus info         : usb-xhci-hcd.4.auto-1
        Media version    : 6.1.25
        Hardware revision: 0x00002100 (8448)
        Driver version   : 6.1.25
Interface Info:
        ID               : 0x03000002
        Type             : V4L Video
Entity Info:
        ID               : 0x00000001 (1)
        Name             : USB3. 0 capture: USB3. 0 captur
        Function         : V4L2 I/O
        Flags            : default
        Pad 0x01000007   : 0: Sink
          Link 0x0200000d: from remote pad 0x100000a of entity 'Processing 2' (Video Pixel Formatter): Data, Enabled, Immutable
Priority: 2
Video input : 0 (Input 1: ok)
Format Video Capture:
        Width/Height      : 1920/1080
        Pixel Format      : 'MJPG' (Motion-JPEG)
        Field             : None
        Bytes per Line    : 0
        Size Image        : 4147200
        Colorspace        : sRGB
        Transfer Function : Rec. 709
        YCbCr/HSV Encoding: ITU-R 601
        Quantization      : Default (maps to Full Range)
        Flags             :
Crop Capability Video Capture:
        Bounds      : Left 0, Top 0, Width 1920, Height 1080
        Default     : Left 0, Top 0, Width 1920, Height 1080
        Pixel Aspect: 1/1
Selection Video Capture: crop_default, Left 0, Top 0, Width 1920, Height 1080, Flags:
Selection Video Capture: crop_bounds, Left 0, Top 0, Width 1920, Height 1080, Flags:
Streaming Parameters Video Capture:
        Capabilities     : timeperframe
        Frames per second: 60.000 (60/1)
        Read buffers     : 0

User Controls

                     brightness 0x00980900 (int)    : min=-128 max=127 step=1 default=-11 value=-11
                       contrast 0x00980901 (int)    : min=0 max=255 step=1 default=148 value=148
                     saturation 0x00980902 (int)    : min=0 max=255 step=1 default=180 value=180
                            hue 0x00980903 (int)    : min=-128 max=127 step=1 default=0 value=0

@HermanChen
Copy link
Collaborator

获取到的码流有问题么?

@cppcoffee
Copy link
Author

windows10 安装界面,测试到只有这两个界面出现问题,其他界面正常。1920x1080 分辨率,当碰到这两个界面就从 30帧 掉到 10+帧

@HermanChen
Copy link
Collaborator

把录下来的码流解码看看是不是有报错的情况?

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

2 participants