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

請教一下 #23

Open
humanjeff opened this issue Aug 7, 2021 · 3 comments
Open

請教一下 #23

humanjeff opened this issue Aug 7, 2021 · 3 comments

Comments

@humanjeff
Copy link

請問一定有要httpserver才能進行rtmp server的傳送嗎?
我看ffmpeg的命令是抓推送到httpserver的URL
有可能可以直接收到串流就傳送到 rtmp server?

@glaciall
Copy link
Owner

glaciall commented Aug 7, 2021

不是,推送到rtmp server的实现是我偷了个懒,借用ffmpeg就可以很方便简单的实现rtmp推流而已。
如果想直接串流推送到rtmp服务器,可以看一下https://github.com/faucamp/SimpleRtmp这个项目。

@humanjeff
Copy link
Author

我有發現seq+1的地方好像早了,應該要在publishVideo以後
long timestamp = packet.seek(16).nextLong();
PublishManager.getInstance().publishVideo(tag, sequence, timestamp, pt, data);
// 碰到结束标记时,序号+1
if (pkType == 0 || pkType == 2) {
sequence += 1;
SessionManager.set(nettyChannel, "video-sequence", sequence);
}
這樣在裡面抓Seq變化才可以抓到完整的一禎

@glaciall
Copy link
Owner

我的那一帧h.264的nalu不是通过消息头来分的,是通过内容的00 00 00 01的标志头进行分的,具体你刚说的那个ffmpeg api怎么用,你得看手册,我没有用过。

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