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裸流,使用用FlvMuxer的writeSampleData接口,推流成功,但无法播放 #830

Open
sheng930920 opened this issue Oct 13, 2021 · 7 comments

Comments

@sheng930920
Copy link

推H.264裸流,使用用FlvMuxer的writeSampleData接口,推流成功,但无法播放,能指引一下吗

VideoFeeder.getInstance().provideTranscodedVideoFeed().addVideoDataListener(new VideoFeeder.VideoDataListener() {
                @Override
                public void onReceive(byte[] videoBuffer, int length) {

                    MediaCodec.BufferInfo bufferInfo = new MediaCodec.BufferInfo();
                    bufferInfo.offset = 0;
                    bufferInfo.presentationTimeUs = System.currentTimeMillis() * 1000;
                    bufferInfo.size = videoBuffer.length;
                    sendVideoData(ByteBuffer.wrap(videoBuffer), bufferInfo);
                }
            });

image

image

@begeekmyfriend
Copy link
Owner

不清楚SRS官网播放器用什么协议了,你用ffplay rtmp://试试?

@sheng930920
Copy link
Author

流媒体服务器上显示是有推流上去的,但使用ffplay去测试也是无法播放
image

image

@begeekmyfriend
Copy link
Owner

那你得看SRS的日志了,或者用ffmpeg推流试试能否看到

@begeekmyfriend
Copy link
Owner

推个其它公有CDN试一试,如果可以,你可以给SRS报个bug,或者本地编译一个SRS,你可以看到后台日志

@TaylorsZ
Copy link

请问这个最后解决了吗?

@Swordce
Copy link

Swordce commented Apr 27, 2022

@sheng930920 @TaylorsZ 请问解决这个问题了吗

@xxxxxxbin6
Copy link

@begeekmyfriend 大佬,我现在用usb摄像头能拿到h264的流,能使用你这个库用rtmp推到流媒体服务器吗

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

5 participants