【发布时间】:2015-06-29 21:41:18
【问题描述】:
我第一次使用 gstreamer 并尝试使用 Gstreamer(RTP 和 UDP)将 MP4 视频文件从服务器传输到客户端。 我正在尝试使用的命令行:
在服务器端:
gst-launch-1.0 -v filesrc location = file_name.mp4 ! decodebin ! x264enc ! rtph264pay ! udpsink host=192.1XX.XX.XX port=9001
在客户端:
gst-launch-1.0 -v udpsrc port=9001 caps = "application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, payload=(int)96" ! rtpstreamdepay ! decodebin ! videoconvert ! autovideosink
我能够成功流式传输视频。但是,我不想在服务器端进行decodebin 和x264enc 操作。
所以,我去掉了这些操作,在服务器端使用了这个命令行
gst-launch-1.0 -v filesrc location =file_name.MP4 ! rtpstreampay ! udpsink host=192.1XX.XX.XX port=9001
我无法流式传输视频。
谁能指导我,为什么在这种情况下我们需要在发送数据时进行解码和编码操作。 有什么方法可以在不使用这些操作的情况下发送数据。
谢谢。
【问题讨论】:
标签: udp video-streaming gstreamer mp4 rtp