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

使用main函数的示例代码,传入ts文件,输出的ts文件只有音频流,没有视频流 #3

Closed
liminglu opened this issue Jun 9, 2020 · 6 comments

Comments

@liminglu
Copy link

liminglu commented Jun 9, 2020

hi,您好,

使用main.cpp,传递一个使用ffmpeg生成的test.ts文件,执行完程序后,输出的test.tsout.ts只有音频流,还请帮助,谢谢。

@akanchi
Copy link
Owner

akanchi commented Jun 9, 2020

ffmpeg生成ts的命令相关参数可以提供一下吗?或者提供一下你测试的ts文件

@liminglu
Copy link
Author

liminglu commented Jun 9, 2020

3cd1f8962a6c5967796ab8fc4229b6fb

@akanchi

@akanchi
Copy link
Owner

akanchi commented Jun 9, 2020

这样看不出什么问题,你生成一段测试的ts文件发给我吧

@akanchi
Copy link
Owner

akanchi commented Jun 9, 2020

3cd1f8962a6c5967796ab8fc4229b6fb

@akanchi

不过你这张图的tbc有点怪,原test.ts能正常播放吗

@liminglu
Copy link
Author

3cd1f8962a6c5967796ab8fc4229b6fb @akanchi

不过你这张图的tbc有点怪,原test.ts能正常播放吗

@akanchi 源视频是可以播放的,另外输出的test.tsout.flv也是可以的(说明源文件应该好的),详见压缩包
test.ts.zip
谢谢。

@akanchi
Copy link
Owner

akanchi commented Jun 10, 2020

3cd1f8962a6c5967796ab8fc4229b6fb @akanchi

不过你这张图的tbc有点怪,原test.ts能正常播放吗

@akanchi 源视频是可以播放的,另外输出的test.tsout.flv也是可以的(说明源文件应该好的),详见压缩包
test.ts.zip
谢谢。

static const uint16_t MPEGTS_PMT_PID = 0x100;
原test.ts中视频流的pid和muxer中定义的pmt_pid冲突了,导致无法识别视频流。
你可以临时修改一下MPEGTS_PMT_PID的值可以解决这个问题。

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