[Live-devel] How to play a MPEG2-TS (H264 transport stream) live stream

Ross Finlayson finlayson at live555.com
Fri Apr 8 12:20:53 PDT 2016


Unfortunately I am a bit confused by your explanation of what you are trying to do.

>From what I can tell, you are trying to receive a H.264 video RTSP/RTP stream - using a RTSP client -  then, somehow, convert this H.264 video stream into a MPEG Transport Stream.  What you then want to do with the resulting Transport Stream (play it? re-stream it? just save it to a file?) is not clear to me.

In any case, you should start by using our demo applications, *unmodified*.  Only once you have gotten these to work should you think about modifying code.

I suggest starting by doing the following:
1/ Run “openRTSP” to receive your H.264 video RTSP/RTP stream.  This will write the resulting H.264 video data into a file, whose name begins with “video-“.
2/ Rename this video file to “in.264”
3/ Run our “testH264VideoToTransportStream” demo application.  This should give you a MPEG Transport Stream file named “out.ts”.

If you do all of this, is the file “out.ts” useful to you?  (What do you want to do with this?)

If (and only if) you reach this point successfully, we can then talk about how you can streamline steps 1/ to 3/ by making a (small) modification to our “testH264VideoToTransportStream” code.


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




More information about the live-devel mailing list