gst-launch-1.0和gst-launch-0.10在udp接收的问题

yangshen1990 2017-03-15 11:11:33
各位大拿,本人最近刚开始学习gstreamer,测试了这样一个功能,就是用ffmpeg发送rtp码流,然后用gstreamer接收并保存为264文件,但遇到这样一个问题
发送udp数据包,命令如下:
ffmpeg -re -i /home/tool/1280x720_00.h264 -vcodec copy -f rtp rtp://127.0.0.1:9000

接收命令有两个,第一个是用gst-launch-0.10
gst-launch-0.10 -v gstrtpbin name=rtpbin latency=100 udpsrc caps="application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)H264,payload=(int)96" port=9000 ! rtpbin.recv_rtp_sink_0 rtpbin. ! rtph264depay ! filesink location="rev.264" sync=false async=false
这种方法得到的264文件可以采用下面的命令播放,视频正常
ffplay /home/share8168/rev.264

第二个是用gst-launch-1.0
gst-launch-1.0 -v rtpbin name=rtpbin latency=100 udpsrc caps="application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)H264,payload=(int)96" port=9000 ! rtpbin.recv_rtp_sink_0 rtpbin. ! rtph264depay ! filesink location="rev.264" sync=false async=false
这种方法得到的264文件采用同样的命令播放时,会出现如下错误
[h264 @ 0x7f5f64000920] Format h264 detected only with low score of 1, misdetection possible!
[h264 @ 0x7f5f64001640] missing picture in access unit with size 971040
[h264 @ 0x7f5f64001640] no frame! 0KB vq= 0KB sq= 0B f=0/0
[h264 @ 0x7f5f64000920] decoding for stream 0 failed
[h264 @ 0x7f5f64000920] Could not find codec parameters for stream 0 (Video: h264): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
/home/share8168/rev.264: could not find codec parameters

请问导致这个问题的原因是什么,如何才能采用gst-launch-1.0保存出可以正常播放的文件?
...全文
1169 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
rightorwrong 2017-03-16
  • 打赏
  • 举报
回复
另一个命令接收时,还没接收到i帧(pps+sps)

2,542

社区成员

发帖
与我相关
我的任务
社区描述
专题开发/技术/项目 多媒体/流媒体开发
社区管理员
  • 多媒体/流媒体开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧