0

How do you stream a raw H.265 incoming video using Red5?

I've seen this example to stream flv file, and this for the client side, and for H.264 with or without ffmpeg.

Basically the question can be split into two:

  • How do you stream it from a .h265 file? If from .265 file is not possible, how do you do it from a file that contains H.265 video? Any example?
  • How do you stream it from an incoming RTP session? I can get the session UDP/RTP unpacked and decode into raw H.265 NAL packets. I'm assuming some conversion is needed, any libraries available for that purpose? Examples?

If I can get an answer to the above first split question, I know I can redirect the incoming stream to a named pipe. That can be used as an indirect solution to the second split question. Streaming from the incoming UDP session directly is preferred, though.

minghua
  • 5,981
  • 6
  • 45
  • 71
  • Why someone voted it for too broad? The question is very specific about streaming a h.265 video in its NAL incoming format to the Red5 server. The answer could be broad, but any of those broad answers shall be satisfying to me as long as it gets the streaming working. – minghua Sep 23 '19 at 02:14
  • Just noticed [ant-media](https://github.com/ant-media/Ant-Media-Server) is forked from red5 and is actively developed. so the question does also apply to the ant-media server. – minghua Nov 14 '19 at 05:29
  • If red5 and ant-media cannot do h.265, I wonder whether some so-called [Video Management Software](https://kintronics.com/solutions/ip-camera-systems/video-recording-systems/video-management-software/) can be a better choice. – minghua Nov 14 '19 at 05:48

1 Answers1

0

This is some preliminary idea, though surely not the best solution.

From a previous article "How to stream in h265 using gstreamer", there is a solution to include the x265enc element to gstreamer.

From an aws kinesis video examples page, a command line can be used to process rtsp/rtp input in h.265 and convert it to h.264 format:

gst-launch-1.0 rtspsrc location="rtsp://192.168.1.<x>:8554/h265video" ! \
decodebin ! x264enc ! <video-sink>

The <video-sink> should be something specific to Red5 server. Or if streaming in h.265 format which Red5 might or might not take:

gst-launch-1.0 rtspsrc location="rtsp://192.168.1.<x>:8554/h265video" \
short-header=TRUE ! rtph265depay ! h265parse ! video/x-h265, alignment=au ! \
<video-sink>
minghua
  • 5,981
  • 6
  • 45
  • 71