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

新手问题: 我想把视频和声音分开推流, 视频一个文件,声音一个一个文件,整合到一起 请问我该怎么做 #119

Open
gitchenze opened this issue Jan 17, 2024 · 1 comment

Comments

@gitchenze
Copy link

阅读了 example 里面的例子 有些看的懂有些看不懂 可以帮助我么
我现在用 example_rtmp_server.go + example_mp4_to_rtmp_server.go 现在可以播放一个mp4文件
obs拉流正常播放,但是声音我想替换为我一个 mp3的文件,不用原来mp4 自带的,我追踪代码 到了这里
else if pkg.Cid == mp4.MP4_CODEC_AAC {
pts := audio_ts_adjust.adjust(int64(pkg.Pts))
cli.WriteAudio(codec.CODECID_AUDIO_AAC, pkg.Data, uint32(pts), uint32(pts))

实在是不知道怎么处理 可以帮助我么
@yapingcat
Copy link
Owner

yapingcat commented Jan 17, 2024

你的场景建议使用ffmpeg 推流好一点,音视频重新编码然后在推流

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