Video streaming 通过RTP将H.264视频从Live555传输到VLC

Video streaming 通过RTP将H.264视频从Live555传输到VLC,video-streaming,live,vlc,rtp,h.264,Video Streaming,Live,Vlc,Rtp,H.264,如果您能帮助我解决H264流媒体问题,我将不胜感激,这是我数周来一直在努力解决的问题 我需要将H264视频从Live555(在Linux机器上)传输到VLC Media Player(在Windows机器上)使用RTSP时效果非常好,但我需要在不使用RTSP的情况下使用RTP,而使用RTP时我看不到视频。VLC甚至无法识别流是H264 这是通过RTSP传输的SDP文件(有效的配置): 但是如果我从RTSP切换到RTP,它就不工作了。我已经试着在VLC播放器中加载上面的SDP文件,但是没有帮助 以

如果您能帮助我解决H264流媒体问题,我将不胜感激,这是我数周来一直在努力解决的问题

我需要将H264视频从Live555(在Linux机器上)传输到VLC Media Player(在Windows机器上)使用RTSP时效果非常好,但我需要在不使用RTSP的情况下使用RTP,而使用RTP时我看不到视频。VLC甚至无法识别流是H264

这是通过RTSP传输的SDP文件(有效的配置):

但是如果我从RTSP切换到RTP,它就不工作了。我已经试着在VLC播放器中加载上面的SDP文件,但是没有帮助

以下是VLC Player 0.8.6d的一些调试输出:

main input debug: thread 4016 (input) created at priority 1 (input/input.c:265)
main input debug: `rtp://@190.40.15.63:8554' gives access `rtp demux' `' path `@190.40.15.63:8554'
main input debug: creating demux: access='rtp' demux='' path='@190.40.15.63:8554'
main demuxer debug: looking for access_demux module: 0 candidates
main demuxer warning: no access_demux module matched "rtp"
main input debug: creating access 'rtp' path='@190.40.15.63:8554'
main access debug: looking for access2 module: 6 candidates
access_udp access debug: opening server=:0 local=190.40.15.63:8554
main access debug: net: connecting to '[]:0@[190.40.15.63]:8554
main access debug: looking for netrowk module: 1 candidate
ipv6 access debug: 190.40.15.63: Host or service not found
main access debug: using network module "ipv6"
main access debug: removing network module "ipv6"
main access debug: looking for netrowk module: 1 candidate
ipv4 access debug: resolving 190.40.15.63:8554...
ipv4 access debug: resolving :0...
main access debug: using network module "ipv4"
main access debug: removing network module "ipv4"
main access debug: using access2 module "access_udp"
main private debug: pre buffering
access_udp access debug: no RTP header detected
main input debug: creating demux: access='rtp' demux='' path='@190.40.15.63:8554'
main demuxer debug: looking for demux2 module: 45 candidates
ts demuxer warning: TS module discarded (lost sync)
ffmpeg demuxer debug: detected format: mp3
(可能有打字错误,因为我必须手动复制-不要问:))

在VLC 1.0.5中,我得到一个未知有效负载类型错误,由于未知网络堆栈错误,SDP根本无法加载。显示的其他错误包括不支持的SDP连接信息和Sap解复用器警告:无效的SDP

任何帮助都将不胜感激

谢谢,


Ilya

我要做的是使用SDP文件,而不是直接打开流。结果表明,SDP数据仅在使用RTSP时传输。流式传输RTP时,我必须自己提供SDP文件

所以我所做的是:

  • 使用RTSP(有效的方法)流
  • 使用Wireshark记录通过RTSP传输的SDP文件
  • 将SDP另存为扩展名为.SDP的文本文件
  • 在VLC中,打开SDP文件,而不是直接打开网络流

  • 它变魔术了

    一个简短的评论:您的SDP文件在技术上是无效的。您应该使用base-64编码SPS和PPS信息,用逗号分隔,并将其附加到sprop参数集。您将其设置为字符串“H264”,这肯定是错误的(尽管很不幸,这很常见)。也可以通过使用
    *env打印SDP内容来实现
    
    main input debug: thread 4016 (input) created at priority 1 (input/input.c:265)
    main input debug: `rtp://@190.40.15.63:8554' gives access `rtp demux' `' path `@190.40.15.63:8554'
    main input debug: creating demux: access='rtp' demux='' path='@190.40.15.63:8554'
    main demuxer debug: looking for access_demux module: 0 candidates
    main demuxer warning: no access_demux module matched "rtp"
    main input debug: creating access 'rtp' path='@190.40.15.63:8554'
    main access debug: looking for access2 module: 6 candidates
    access_udp access debug: opening server=:0 local=190.40.15.63:8554
    main access debug: net: connecting to '[]:0@[190.40.15.63]:8554
    main access debug: looking for netrowk module: 1 candidate
    ipv6 access debug: 190.40.15.63: Host or service not found
    main access debug: using network module "ipv6"
    main access debug: removing network module "ipv6"
    main access debug: looking for netrowk module: 1 candidate
    ipv4 access debug: resolving 190.40.15.63:8554...
    ipv4 access debug: resolving :0...
    main access debug: using network module "ipv4"
    main access debug: removing network module "ipv4"
    main access debug: using access2 module "access_udp"
    main private debug: pre buffering
    access_udp access debug: no RTP header detected
    main input debug: creating demux: access='rtp' demux='' path='@190.40.15.63:8554'
    main demuxer debug: looking for demux2 module: 45 candidates
    ts demuxer warning: TS module discarded (lost sync)
    ffmpeg demuxer debug: detected format: mp3