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

使用VLC+RTSP方式播放一个mp4文件; 使用FFMPEG方式无声音只有视频, 不使用FFMPEG方式音视频都有! #246

Closed
leotian111 opened this issue Nov 7, 2022 · 5 comments

Comments

@leotian111
Copy link

hi, 请教下:
我在linux下启用_HAVE_FFMPEG_宏定义, 在makefile中添加了相关INCLUDES, LIBPATHS, LIBS后能成功编译, 但运行test -c rtsp_example后, 通过windows下的VLC播放器播放无声音只有视频, 不启用此宏是有声音和视频的. 请问是哪儿需要修改吗? 我使用的ffmpeg-4.3.4版本

@ireader
Copy link
Owner

ireader commented Nov 7, 2022

麻烦确认下RTSP describe 返回的sdp里有音频信息吗?

@leotian111
Copy link
Author

我通过抓包看到:

  1. describe回应报文里有音频信息; 但只有分别关于video,audio的m=xx,a=xx; 没有开头的v=0 o=xxx之类的; 但通过gdb查看是有的; 不使用FFMPEG时sdp回应报文是有v=0 o=xxx信息的.

  2. 抓取的报文有payload type=98; payload type=102的报文, 但VLC没声音

@leotian111
Copy link
Author

我现在在函数rtsp_ondescribe()中把if(it == s_describes.end())的执行路径注释掉了; 现在通过抓包看到describe回应报文里有开头的v=0 o=xxx之类, 也有分别关于video,audio的m=xx,a=xx; 也有payload type=98; payload type=102的报文, 但VLC没声音; 我把抓取的报文附上, 帮忙分析下, 多谢!
rtsp-noaudio3.zip

@ireader
Copy link
Owner

ireader commented Nov 8, 2022

从抓包信息看,sdp中有音频, 并且rtp包也有音频包。

VLC播放信息,有大量buffer too late (-22506652503 us): dropped
image

应该是音视频rtp时间戳未对齐导致。 周末再仔细分析下。

@leotian111
Copy link
Author

hi, 请教下:
现在有结果了吗?

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