[Live-devel] Streaming JPEG over RTP

live king liveking130 at gmail.com
Sun Aug 17 06:15:49 PDT 2014


Hi Ross,

Thanks for the timely reply.I have taken a look at the Elphel code you
directed me to.
Currently I have used the  Elphel model to create my own class
MyJPEGVideoSource that inherits JPEGVideoSource.
I have copied the exact same code of ElphelJPEGDeviceSource classes and
just changed the file read (initially it was /dev/ccam_dma.raw ) from to a
jpg file on my hard disk.


ElphelJPEGDeviceSource*
ElphelJPEGDeviceSource::createNew(UsageEnvironment& env,
                  unsigned timePerFrame) {
  FILE* fid = fopen( " */dev/ccam_dma.raw* ", "rb");
  if (fid == NULL) {
    env.setResultErrMsg("Failed to open input device file");
    return NULL;
  }
  return new ElphelJPEGDeviceSource(env, fid, timePerFrame);
}

to this,

MyJPEGVideoSource*
MyJPEGVideoSource::createNew(UsageEnvironment& env,
                  unsigned timePerFrame) {
  FILE* fid = fopen(" * /path/to/my/jpgFile  *", "rb");
  if (fid == NULL) {
    env.setResultErrMsg("Failed to open input device file");
    return NULL;
  }
  return new MyJPEGVideoSource(env, fid, timePerFrame);
}

Now the the RTSP server to stream JPEG/RTP is ready and I am able to stream
this over a player like VLC.
The problem I am facing now is that  if I use a client such as
testRTSPClient and try to store the fReceiveBuffer to a .jpg file, the jpg
file is unreadable using a image viewer. I need the testRTSPClient to store
the jpg (as its of high priority to me).
Now is the problem with the RTSP server or is the testRTSPClient is
incapable of acquiring jpeg images is my question.
Or is there something kind of code that I  should add on to the
MyJPEGVideoSource , please do help.
Any kind of help is appreciated.

Thanks in Advance,
King





On Sat, Aug 16, 2014 at 5:20 PM, live king <liveking130 at gmail.com> wrote:

> Hi all,
>
> I want to use the test program testOnDemandRTSPServer to stream JPEG over
> RTP and use the testRTSPClient to save that frame received in
> fReceiveBuffer into a jpg file.
> Can anyone please suggest how I can go about doing it
>
>
> Thanks,
> King
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20140817/d7004e60/attachment.html>


More information about the live-devel mailing list