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

运行mkv-writer-test.cpp, 将flv文件转换为mkv文件,mkv有视频无音频。 #136

Open
asmgcc opened this issue Mar 30, 2021 · 6 comments

Comments

@asmgcc
Copy link

asmgcc commented Mar 30, 2021

No description provided.

@asmgcc
Copy link
Author

asmgcc commented Mar 30, 2021

FLV内部为 h265+aac 数据格式

@ireader
Copy link
Owner

ireader commented Mar 30, 2021

未复现你的问题,上传下测试文件?

@asmgcc
Copy link
Author

asmgcc commented Mar 30, 2021

2021_03_30_192327_00.zip
测试flv文件,请将后缀zip修改为rar再解压。

@ireader
Copy link
Owner

ireader commented Mar 31, 2021

定位的原因是flv文件只有视频sequence header,没有音频sequence header,导致mkv只写入了视频track,音频track丢弃了。

image

@ireader
Copy link
Owner

ireader commented Mar 31, 2021

mkv目前需要先addtrack,然后才能写音视频数据。

这块我看看怎么改一下。

@asmgcc
Copy link
Author

asmgcc commented Mar 31, 2021

这个flv文件是利用media-server/libflv 库mux出来的, 是只有视频轨无音频轨吗,但是播放器播放可以听到声音。
还有一个问题反馈一下:利用libmkv 将一个h265文件和aac文件 mux成mkv,如果先添加video track后添加audio track,那么mux出来mkv文件播放只有视频无音频, 如果先添加audio track后添加video track,mkv播放只有音频无视频。

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