Skip to content

# -vrtp option stops sending RTP packets intermittently #465

Description

@FinancedCoup

-vrtp option stops sending RTP packets intermittently

Environment

  • OS: macOS 14.0 (Sonoma)
  • UXPlay version: 1.72
  • GStreamer version: 1.26.5
  • Device: iPhone SE 2 (iOS 18.0.1)

Description

The -vrtp option successfully establishes a GStreamer pipeline and initially sends RTP packets, but randomly stops sending packets after a few seconds or minutes. The UXPlay video window continues to display the iPhone screen smoothly, indicating the AirPlay connection is stable, but the RTP output ceases.

Command Used

uxplay -s 960x540 -fps 30 -vsync no -vd vtdec \
    -vrtp "config-interval=1 ! udpsink host=127.0.0.1 port=5004"

Expected Behavior

Continuous H.264 RTP packets should be sent to 127.0.0.1:5004 as long as the iPhone is connected via AirPlay.

Actual Behavior

  1. iPhone connects successfully via AirPlay
  2. UXPlay window displays iPhone screen smoothly (no lag or freezing)
  3. RTP packets are sent to port 5004 initially
  4. After ~5-60 seconds, RTP packets stop being sent
  5. UXPlay window continues to work normally
  6. No error messages in UXPlay output

This suggests the issue is specifically with the -vrtp GStreamer pipeline, not with the AirPlay reception or video decoding.

Reproduction Steps

  1. Start UXPlay with -vrtp option:
    uxplay -s 960x540 -fps 30 -vsync no -vd vtdec \
        -vrtp "config-interval=1 ! udpsink host=127.0.0.1 port=5004"
  2. Start a UDP listener on port 5004:
    gst-launch-1.0 udpsrc port=5004 ! application/x-rtp,encoding-name=H264,payload=96 \
        ! rtph264depay ! h264parse ! fakesink
  3. Connect iPhone via AirPlay to UXPlay
  4. Observe RTP packets being received initially
  5. Wait 30-60 seconds
  6. Observe that RTP packets stop arriving (GStreamer shows no new data)
  7. Note that UXPlay window continues to show iPhone screen smoothly

Tested Variations (all exhibit same issue)

# Without hardware decode
uxplay -s 960x540 -fps 30 -vsync no \
    -vrtp "config-interval=1 ! udpsink host=127.0.0.1 port=5004"

# With explicit rtph264pay
uxplay -s 960x540 -fps 30 -vsync no -vd vtdec \
    -vrtp "rtph264pay config-interval=1 ! udpsink host=127.0.0.1 port=5004"

# With h264parse in pipeline
uxplay -s 960x540 -fps 30 -vsync no -vd vtdec \
    -vrtp "config-interval=1 ! h264parse ! udpsink host=127.0.0.1 port=5004"

# Different resolutions and framerates
uxplay -s 1280x720 -fps 60 -vsync no -vd vtdec \
    -vrtp "config-interval=1 ! udpsink host=127.0.0.1 port=5004"

All variations show the same behavior: packets flow initially, then stop.

GStreamer Debug Output

With GST_DEBUG=3, the logs show the pipeline is created successfully:

Activity

  1. fduncanh commented on Oct 19, 2025

    @fduncanh
    Collaborator

    use uxplay -d ...... to see the data coming from the iPhone client being decrypted and sent to the gstreamer pipeline.

    I would expect that this keeps working, and your issue is with what happens afterwards.

    EDIT this expection is wrong

  2. fduncanh commented on Oct 19, 2025

    @fduncanh
    Collaborator

    I tried your instructions (with added uxplay option -d ) . (I dont understand "Note that UXPlay window continues to show iPhone screen smoothly" because I dont get a UxPlay window, just the terminal, using your instructions).

    I found that if the client screen is static, it stops sending video data, but if e.g. a youtube movie is playing on firefox, the udp listener continues to receive data.

    I also just ran uxplay normally, and see that if the client screen is not changing, eventually no new video data gets sent, and the uxplay video window on the server is static. This appears to be behavior of the client. (don't send new video frames untill something changes).

    I suppose the listener (if sending to a real videosink) should then keep displaying the last video frame it gets until new frames arrive?

  3. fduncanh commented on Oct 19, 2025

    @fduncanh
    Collaborator

    @FinancedCoup are you able to replace the fakesink on the udp listener pipeline with a real videosink?

  4. fduncanh commented on Jan 26, 2026

    @fduncanh
    Collaborator

    We now have a gstreamer-based receiver for vrtp video. May this can help in debugging?.

    From the current README:

    -vrtp pipeline: forward rtp packets of decrypted video to somewhere else, without rendering. Uses rtph264pay or rtph265pay as appropriate: pipeline should start with any rtph26xpay options (such as config_interval= or aggregate-mode =), followed by a sending method: e.g., "config-interval=1 ! udpsink host=127.0.0.1 port=XXXX". A gstreamer-based test receiver is

    gst-launch-1.0 -v \
    udpsrc port=XXXX \
    ! 'application/x-rtp, media=video, clock-rate=90000, encoding-name=H264, payload=96' \
    ! rtph264depay   ! h264parse   ! decodebin   ! videoconvert   !
    autovideosink sync=false 
    

    (Replace XXXX by the port you will use: make sure it is not blocked by a firewall; replace "264" by "265" if you are
    streaming h265 video).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions