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

录制的视频速度较快,而且音频调用writePacket时报错av_interleaved_write_frame failed, ret: -22 #3

Closed
CaffreySun opened this issue Aug 10, 2022 · 7 comments

Comments

@CaffreySun
Copy link

如题

@onlyet
Copy link
Owner

onlyet commented Aug 10, 2022

-22是参数不对,可能音频某个参数设置错了。

@CaffreySun
Copy link
Author

网上说时pts有问题,音视频知识薄弱,没看懂pts这么计算的

@onlyet
Copy link
Owner

onlyet commented Aug 10, 2022

理论上是采集的时候记录音频/视频帧的时间戳,pts是采集时间戳-起始时间,然后AVPacket在写进文件前需要转换为AVStream的时基。

@onlyet
Copy link
Owner

onlyet commented Aug 10, 2022

方便的话留个QQ交流

@CaffreySun
Copy link
Author

Q779612573

@onlyet
Copy link
Owner

onlyet commented Aug 11, 2022

最新代码支持录制麦克风,可以选择录制扬声器或者麦克风。

@CaffreySun
Copy link
Author

666

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