代码之家  ›  专栏  ›  技术社区  ›  escargot agile

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

  •  7
  • escargot agile  · 技术社区  · 15 年前

    我需要从Live555流H264视频(在Linux机器上)到VLC媒体播放器(在Windows机器上)。 有了RTSP它工作得很好,但是我需要使用没有RTSP的RTP,而有了RTP我看不到视频。 VLC甚至不知道流是H264。

    v=0
    o=- 1277647151953158 1 IN IP4 190.40.14.100
    s=Session streamed by "testH264VideoAudioStreamer"
    i=test-h264-mux.mpg
    t=0 0
    a=tool:LIVE555 Streaming Media v2007.05.24
    a=type:broadcast
    a=control:*
    a=source-filter: incl IN IP4 * 190.40.14.100
    a=rtcp-unicast: reflection
    a=range:npt=0-
    a=x-qt-text-nam:Session streamed by "testH264VideoAudioStreamer"
    a=x-qt-test-inf:test-h264=mux.mpg
    m=video 8554 RTP/AVP 96
    c=IN IP4 190.40.15.63/7
    a=rtpmap:96 H264/90000
    a=fmtp:96 packetization-mode=1;profile-level-id=000042;sprop-parameter-sets=H264
    a=control:track1
    

    但是如果我从RTSP切换到RTP,它就不起作用了。我试过在VLC播放器中加载上面的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
    

    (可能有打字错误,因为我必须手动复制-不要问:))

    在vlc1.0.5中,我得到一个 未知负载类型 错误,并且由于 . 显示的其他错误包括 不支持SDP连接信息 .

    谢谢您,

    伊利亚

    1 回复  |  直到 15 年前
        1
  •  8
  •   escargot agile    15 年前

    所以我做的是:

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