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

关于pullrtmp2hls的文件名修改问题 #325

Open
sboy2000 opened this issue Oct 24, 2023 · 2 comments
Open

关于pullrtmp2hls的文件名修改问题 #325

sboy2000 opened this issue Oct 24, 2023 · 2 comments

Comments

@sboy2000
Copy link

golang的功力不够,为了自定义pullrtmp2hls生成的文件名,(毕竟时间已经可以自定义了),是不是得修改导入的包Muexer,因为这个pullrtmp2hls.go文件,似乎没看到写入文件名的过程,想先简单实现录像机功能,把记录下的文件替换ts为时间日期格式,去掉frameNUM的id索引产生的值等,还不知道怎么下手!请请教!

@q191201771
Copy link
Owner

自己实现一个IPathWriteStrategy,(见 path_strategy.go 中的 type IPathWriteStrategy interface
把hls.IPathStrategy设置成你自己实现的就可以了,(见 pkg/hls/var.go 中的 PathStrategy IPathStrategy = &DefaultPathStrategy{}

DefaultPathStrategy就是我实现的默认规则,(见 pkg/hls/var.go 中的 type DefaultPathStrategy struct

@sboy2000
Copy link
Author

好勒,谢谢指导!~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants