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

录屏推流过程中切换横竖屏怎么改变录制视频长宽? #31

Open
jhflovehqy opened this issue Apr 9, 2020 · 1 comment

Comments

@jhflovehqy
Copy link

你好,现在被一个问题卡死了,就是在推流时设置的是横屏,但是推流过程中切换到竖屏时尺寸发生了变化,怎么能够在推流过程中去修改推流大小呢?

@myrao
Copy link
Owner

myrao commented Apr 12, 2020

推流改变宽高有两种情况:

  • 分辨率不变,仅对 surfaceTexture 中的画面进行旋转,所以旋转后会看到横屏视频转为竖屏上下有黑边,视频画面内容变小,但原始帧的分辨率没变
  • 分辨率或者别的 meta-data 已经改变,这就得重新再次将编码器的参数再次初始化一次,拉流的解码器对整个视频的 meta-data 重新再次拉取

一般来说推流过程中是不推荐第二种强行改变视频宽高的,因为拉流那边的播放器兼容性不一,有些是不支持过程中再次解析 meta-data 的

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