如何使用gstreamer在h265中进行流传输? [英] How to stream in h265 using gstreamer?

查看:1148
本文介绍了如何使用gstreamer在h265中进行流传输?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试同时使用最新的gstreamer和x265enc.我看到有人已经在 http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/log/ext/x265/gstx265enc.c 任何人都可以举一个已知可以正常工作的管道示例(gst-launch-1.0管道示例将非常有帮助)

1) gstreamer的x265enc插件的当前状态是什么?真的有效吗? 我需要使用哪个gstreamer分支来构建x265enc?我想构建将与x265enc插件兼容的整个gsteamer源代码. x265enc的系统要求是什么?如何构建?任何Wiki/基本说明都将非常有帮助.

我的目标是在vaughnlive.tv上以h265流的形式广播我的IP摄像机(h264流)

当前,我正在使用以下管道以h264格式广播:

GST_DEBUG = 2 gst-launch-1.0 flvmux名称= mux streamable = true! rtmpsink sync = true location ="rtmp://xxxxxxxxxxxx" rtspsrc location ="rtsp://xxxxxxx" caps ="application/x-rtp, media =(字符串)音频,时钟速率=(int)90000,encoding-name =(string)MPA, 有效载荷=(int)96!rtpmpadepay!mpe​​gaudioparse!队列!疯狂! 音频转换!队列 ! voaacenc比特率= 128000!刻薄! audio/mpeg,mpegversion = 4,stream-format = raw!多路复用器. rtspsrc location ="rtsp://xxxxxxx" caps ="application/x-rtp,media =(string)video,clock-rate =(int)90000, encoding-name =(string)H264!rtph264depay! video/x-h264,stream-format = avc,alignment = au,byte-stream = false!队列 !解码器!队列 !视频率! "video/x-raw,framerate = 30/1"!队列 ! x264enc线程= 4速度预设=超快比特率= 3072!多路复用器.

2) 谁能建议我如何使用x265enc元素将此管道更改为以h265格式广播?

解决方案

有些晚了,但是,也许有些人在当今有关gstreamer中有关H.265支持的信息时会发现这个问题.这是从Ubuntu 15.10上从源代码编译的gstreamer 1.6.1附带的,该软件包具有可用于libx265的软件包.

1

编码器 当我们有库libx265-dev时,将启用x265enc. 编码器位于gst-plugins-bad内部,因此在执行autogen.sh之后,您应该看到启用了x265enc.

您可能还需要h265parse,rtph265pay/depay

解码器

我看到了两个解码器,不知道哪个正在工作,我想libde265dec也有avdec_h265.

多路复用器

对于x264的多路复用器,我使用的是mpegtsmux,但这不支持video/x265,必须做一些工作.当使用filesink等时,matroskamux应该可以工作.

[16:39]   which container is suitable for x265enc, for x264enc I was using mpegtsmux?
[16:54]  otopolsky: mpegts would work if you add support for h265 there, not very difficult[16:55]  slomo_: so we need to just add the caps compatibility?
[16:55]  otopolsky: otherwise, matroskamux supports it. mp4mux/qtmux could get support for it relatively easily too
[16:55]  otopolsky: a bit more than that. look at what tsdemux does for h265
[16:56]  otopolsky: and check the gst_mpegts_descriptor_from_registration related code in tsmux
[17:00]  slomo_: thanks 

2

受质疑的flvmux也仅支持h265,而不支持h265. matroskamux不能用于流式传输,因此唯一的方法是修补mpegtsmux或flvmux等.

I am trying to use latest gstreamer and x265enc together. I saw that someone have already posted some commits in http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/log/ext/x265/gstx265enc.c Can anyone please give an example pipeline where it is known to working (gst-launch-1.0 pipeline example will be very helpful)

1) What is the current status of x265enc plugin for gstreamer ? does it work really ? Which branch of gstreamer I need to use to build x265enc? I want to build whole gsteamer source code which will be compatible with x265enc plugin. What are the system requirement for x265enc and how to build it ? Any wiki/basic instructions will be very helpful.

My goal is to broadcast my ip cameras (h264 streams) as h265 stream on vaughnlive.tv

Currently, I am using following pipeline to broadcast in h264 format:

GST_DEBUG=2 gst-launch-1.0 flvmux name=mux streamable=true ! rtmpsink sync=true location="rtmp://xxxxxxxxxxxx" rtspsrc location="rtsp://xxxxxxx" caps="application/x-rtp, media=(string)audio, clock-rate=(int)90000, encoding-name=(string)MPA, payload=(int)96" ! rtpmpadepay ! mpegaudioparse ! queue ! mad ! audioconvert ! queue ! voaacenc bitrate=128000 ! aacparse ! audio/mpeg,mpegversion=4,stream-format=raw ! mux. rtspsrc location="rtsp://xxxxxxx" caps="application/x-rtp,media=(string)video,clock-rate=(int)90000, encoding-name=(string)H264" ! rtph264depay ! video/x-h264,stream-format=avc,alignment=au,byte-stream=false ! queue ! decodebin ! queue ! videorate ! "video/x-raw,framerate=30/1" ! queue ! x264enc threads=4 speed-preset=ultrafast bitrate=3072 ! mux.

2) Can anyone please suggest on how should I change this pipeline to broadcast in h265 format using x265enc element?

解决方案

A little late but, maybe some people will find this question when seeking info about H.265 support in gstreamer nowadays. This is with gstreamer 1.6.1 compiled from source on Ubuntu 15.10 which has packages ready for libx265..

1,

Encoder There is x265enc which will be enabled when we have library libx265-dev. The encoder is inside gst-plugins-bad so after doing autogen.sh you should see x265enc enabled.

You may also need h265parse, rtph265pay/depay

Decoder

I see two decoders, dont know which one is working, I guess libde265dec there is also avdec_h265.

mux

For mux for x264 I was using mpegtsmux, but this does not support video/x265, some work has to be done. The matroskamux should be working when using filesink etc..

[16:39]  hi, which container is suitable for x265enc, for x264enc I was using mpegtsmux?
[16:54]  otopolsky: mpegts would work if you add support for h265 there, not very difficult[16:55]  slomo_: so we need to just add the caps compatibility?
[16:55]  otopolsky: otherwise, matroskamux supports it. mp4mux/qtmux could get support for it relatively easily too
[16:55]  otopolsky: a bit more than that. look at what tsdemux does for h265
[16:56]  otopolsky: and check the gst_mpegts_descriptor_from_registration related code in tsmux
[17:00]  slomo_: thanks 

2,

Questioned flvmux also does not support h265 only h264.. matroskamux cannot be used for streaming, so only way is to patch mpegtsmux or flvmux etc.

这篇关于如何使用gstreamer在h265中进行流传输?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆