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

通过websocket获取的实时H264裸流byte[]能够转推流到其他rtmp地址吗 #426

Open
wangran99 opened this issue Nov 17, 2023 · 1 comment

Comments

@wangran99
Copy link

通过摄像头获取的实时inpustream可以给javacv推流到rmtp地址。通过websocket获取的实时H264裸流byte[]能够转推流到其他rtmp地址吗?
我试过能把本地mp4文件推流成功,摄像头转流成功。但是实时获取的字节数组没有成功。

image
实时获取的byte数组每次不一样长,抓取frame的时候有时候会报错。

@wangran99
Copy link
Author

尝试过把wesocket读到的byte【】写入ByteArrayOutputStream ,FFmpegFrameGrabber通过ByteArrayInputStream读流,不成功。

  ByteArrayInputStream bis = new ByteArrayInputStream(frameByteArray);
  FFmpegFrameGrabber grabber = new FFmpegFrameGrabber(bis);

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

1 participant