[Live-devel] Could not play h265 video over mpeg-ts

Ross Finlayson finlayson at live555.com
Fri Jan 17 07:13:51 PST 2020



> On Jan 17, 2020, at 5:42 AM, Avramoni, Sorin <sorin.avramoni at intel.com> wrote:
> 
> Dear all,
> 
> I am trying to send video H265 and audio AAC  from a camera and a mic using MPEG-TS, I previously sent video and audio using two rtsp sessions withH265VideoRTPSink and MPEG4GenericRTPSink and it works.

If you have already been able to stream raw video and raw audio over RTP, I’m not sure why you would then want to package and stream them in a Transport Stream (something that increases latency and network bandwidth).  But anyway…


> Here is the relevant code for video hevc over mpeg-ts:

At first glance, this looks OK, except for:

> H265VideoStreamDiscreteFramer* framer = H265VideoStreamDiscreteFramer::createNew(*dev, vdoSource,false);

Because you’re outputting the H.265 NAL units into a Transport Stream (rather than into RTP packets), the third parameter (“includeStartCodeInOutput”) to "H265VideoStreamDiscreteFramer::createNew()” should be True, not False.  (Note that the input NAL units must still *not* have a preceding ’start code’ (00000001); however, they need to be present in the Transport Stream, and setting the “includeStartCodeInOutput” parameter to True will do this.)

If this doesn’t fix your problem, then I suggest starting with our “testH265VideoToTransportStream” demo application (in the “testProgs” directory).  Make sure that this works OK for you (using a H.265 Elementary Stream video file from your camera).


Ross Finlayson
Live Networks, Inc.
http://www.live555.com/




More information about the live-devel mailing list