Skip to content

libx264 can't disable B frame in pyav #776

Description

@zhiweny1122

I use a logitech usb camera and chrome browser to visit the janus server.
I use aiortc to pull the browser stream and the aiortc always fail.
the Pyav always create B frames when I use it in aiortc .
Can you tell me how to diable B frame in libx264 codec of pyav ?
Obviously ffmpeg can disable frame when converting video.
It doesn't work even though I set the pts and time_base to None.

pts 218112 vlastpts 0 dts 218112 kind audio
*** pts 97 vlastpts 0 dts 96 kind video
*** pts 219136 vlastpts 0 dts 219136 kind audio
*** pts 220160 vlastpts 0 dts 220160 kind audio
*** pts 102 vlastpts 0 dts 97 kind video
*** pts 221184 vlastpts 0 dts 221184 kind audio
*** pts 100 vlastpts 0 dts 98 kind video
*** pts 222208 vlastpts 0 dts 222208 kind audio
*** pts 223232 vlastpts 0 dts 223232 kind audio
*** pts 99 vlastpts 0 dts 99 kind video
*** pts 224256 vlastpts 0 dts 224256 kind audio
^C[aac @ 0x55ff1b7bf780] Qavg: 286.566
[libx264 @ 0x55ff1b7c72c0] frame I:1 Avg QP:20.14 size: 8587
[libx264 @ 0x55ff1b7c72c0] frame P:38 Avg QP: 5.65 size: 9357
[libx264 @ 0x55ff1b7c72c0] frame B:103 Avg QP:13.23 size: 651
[libx264 @ 0x55ff1b7c72c0] consecutive B-frames: 1.4% 4.2% 4.2% 90.1%
[libx264 @ 0x55ff1b7c72c0] mb I I16..4: 25.9% 63.9% 10.2%
[libx264 @ 0x55ff1b7c72c0] mb P I16..4: 0.8% 1.1% 1.2% P16..4: 24.5% 5.2% 4.5% 0.0% 0.0% skip:62.8%
[libx264 @ 0x55ff1b7c72c0] mb B I16..4: 0.0% 0.0% 0.0% B16..8: 11.8% 1.0% 0.2% direct: 0.9% skip:86.1% L0:42.0% L1:51.2% BI: 6.8%
[libx264 @ 0x55ff1b7c72c0] final ratefactor: 9.28
[libx264 @ 0x55ff1b7c72c0] 8x8 transform intra:48.4% inter:38.3%
[libx264 @ 0x55ff1b7c72c0] coded y,uvDC,uvAC intra: 51.4% 41.4% 30.4% inter: 6.5% 5.5% 4.1%
[libx264 @ 0x55ff1b7c72c0] i16 v,h,dc,p: 38% 21% 30% 11%
[libx264 @ 0x55ff1b7c72c0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 41% 20% 25% 2% 2% 2% 3% 2% 3%
[libx264 @ 0x55ff1b7c72c0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 46% 26% 15% 2% 3% 2% 2% 2% 2%
[libx264 @ 0x55ff1b7c72c0] i8c dc,h,v,p: 63% 14% 20% 3%
[libx264 @ 0x55ff1b7c72c0] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x55ff1b7c72c0] ref P L0: 83.4% 9.1% 6.0% 1.5%
[libx264 @ 0x55ff1b7c72c0] ref B L0: 89.2% 10.2% 0.6%
[libx264 @ 0x55ff1b7c72c0] ref B L1: 97.2% 2.8%
[libx264 @ 0x55ff1b7c72c0] kb/s:718.62

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions