[Live-devel] testMPEG2TransportReceiver source code
Ross Finlayson
finlayson at live555.com
Mon Sep 10 22:03:20 PDT 2012
> I figured out for my requirement I need to use the MPEG2TransportStreamFramer.cpp is that correct..?
No.
> I will rephrase my requirement
>
> 1. I have IP Camera
> 2. I will the rtsp client to connect to it.
> 3. I start getting the frames (raw MPEG/H264) from the camera
> 4. I want construct a small chunks 1sec/2sec clips in .ts format.
>
> Please let me know how can I do this?
You want to feed your RTSP client's output (i.e., a sequence of video frames) into a "MPEG2TransportStreamFromESSource" object, and then feed this into a "FileSink" object.
I suggest using the "testRTSPClient" code ("testProgs/testRTSPClient.cpp") as a model.
At line 272, use a "FileSink" instead of a "DummySink".
Before line 282, create a "MPEG2TransportStreamFromESSource" object, and then call "addNewVideoSource()", taking "scs.subsession->readSource()" as the "inputSource" parameter. Then call "scs.subsession->sink->startPlaying(") on your "MPEG2TransportStreamFromESSource" object (instead of on "scs.subsession->readSource()" as the code currently does).
Ross Finlayson
Live Networks, Inc.
http://www.live555.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20120910/b269de88/attachment.html>
More information about the live-devel
mailing list