【发布时间】:2023-03-02 21:48:02
【问题描述】:
我是 Gstreamer 的新手。我正在尝试使用 gstreamer 进行网络流式传输。我可以使用下面的 gst 命令来实现。它对我来说工作正常。
在发射器:gst-launch-1.0 -v filesrc location=/home/user/Downloads/big_buck_bunny_480p_h264.mov!解码器! x264enc ! rtph264pay! udpsink 主机=127.0.0.1 端口=5000
在接收方:gst-launch-1.0 -v udpsrc port=5000 caps = "application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264 ,有效载荷=(int)96“! rtph264depay!解码器!视频转换!自动视频接收器
在这里,我使用同一台 Ubuntu PC 来传输和接收视频。
但现在我想在我的 android 手机而不是 ubuntu PC 上播放接收到的视频。 我的意思是 ubuntu PC 应该作为发射器,Android 手机作为接收器。有什么方法可以实现吗?
安卓手机连接到网络 10.xx.yy.zz 。 (Android手机和Ubuntu PC在同一个局域网中)所以我将发射器的udpsink主机更改为10.xx.yy.zz。现在我期待视频可以在 android 设备上播放。但它没有。我在发射器和接收器端收到以下日志消息
在发射机处: /gstpipeline:pipeline0/gstrth264pay:rtph264pay0.gstpad:sink:caps = video / x-h264,codec_data =(buffer)016400305680becb22cd9608f162d9608f162d9608f162d96010568ebecb22cd9608f162d96010568ebecb22cd9608f162d96010568ebecb22c,stream-format =(string)avc,对齐=(string)au,level =(字符串)3 , profile=(string)high, width=(int)854, height=(int)480, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)24/1 /GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0: 时间戳 = 456403579 /GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0: seqnum = 50171 管道预装... 将管道设置为 PLAYING ... 新时钟:GstSystemClock
在接收方: (string)H264, payload=(int)96" !rtph264depay !decodebin !videoconvert !autovideosink 将管道设置为 PAUSED ... /GstPipeline:pipeline0/GstUDPSrc:udpsrc0.GstPad:src: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, payload=(int )96 /GstPipeline:pipeline0/GstRtpH264Depay:rtph264depay0.GstPad:sink: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, payload=(int )96 管道是实时的,不需要 PREROLL ... 将管道设置为 PLAYING ... 新时钟:GstSystemClock
请帮忙。提前致谢。
【问题讨论】:
标签: android video-streaming gstreamer