[Live-devel] report a bug of openRTSP

qiuchangyong qiuchangyong qiuchangyong at gmail.com
Fri Sep 7 00:06:26 PDT 2012


I try to use openRTSP to dump the rtsp stream to AVI file with command like
this "openRTSP -i w 352 -h 288 -f 25 rtsp://xxxx", where xxxx is the real
rtsp url, I've also change the code of "playCommon.cpp" in the line :
*aviOut = AVIFileSink::createNew(*env, *session, "stdout",*
to *aviOut = AVIFileSink::createNew(*env, *session, "openRTSP.avi"*
i can get the file, but it couldnot play, then i check the content of
openRTSP.avi file, find that the h264 start code is missing(the video codec
from stream is avc").
so i add something to AVIFileSink.cpp, useFrame, like this "
  fOurSink.fNumBytesWritten += fOurSink.addWord(fAVISubsessionTag);
  *if (strcmp(fOurSubsession.codecName(), "H264") == 0)//daniel hack
  {
   fOurSink.fNumBytesWritten += fOurSink.addWord(frameSize+4);
   fOurSink.fNumBytesWritten += fOurSink.addWord(fourChar(0x00, 0x00, 0x00,
0x01));//add start code
  }
  else
   fOurSink.fNumBytesWritten += fOurSink.addWord(frameSize);
*  fwrite(frameSource, 1, frameSize, fOurSink.fOutFid);

then it works, but still have an issue, the avi file generated can be
played in vlc, but cannot be played in Windows Media Player. maybe the lack
of index is the cause, i will investigate it later.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20120907/0c87329d/attachment.html>


More information about the live-devel mailing list