<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#CCCCCC">
<div class="moz-cite-prefix">Last year when I did this, decoding
h264 with libavcodec required finding specific nals, the sps and
pps, and holding on to them for all subsequent decode calls. What
you'll likely end up needing to do is to figure out at what point
in the live555 library the encoded data is available to be read,
and then do your own handling that consists of looking for the sps
and pps nals and then making decisions on when to submit the data
you have to the decoder based on when you have a full frame to
decode. since there are a few different ways that a full frame
can be shipped to you, you have to handle these on a case by case
basis. The most common one I've found is that frames are either
encoded as one whole nal, and then for a period of frames
following, subsequent frames are shipped as deltas, until such
point as the encoder decides to emit a full frame again, OR
explicit frame start and end markers are emitted, or other ways
i'm sure I'm not familiar with. Most commonly though is the full
frame plus deltas approach for live streamed media.<br>
<br>
You'll end up doing something like this<br>
discard data until you read sps and pps nals from live555 (or
these are passed to your client at stream start and are available
immediately, usually the live555 library can tell you if this is
the case)<br>
label start:<br>
once you see your first full frame nal, do:<br>
sps pps frame_nal, send this in annex b format to libavcodec<br>
then when you see delta nals,<br>
sps pps frame_nal delta_nal, send this in annex b format to
libavcodec<br>
Append delta nals as you get them, so<br>
sps pps frame_nal delta_nal delta_nal ... send this in annex b
format to libavcodec<br>
if you see a full frame nal, goto start.<br>
<br>
after each call to libavcodec, you'll get a decoded frame, but you
will likely have to convert it to the color format your cv library
expects (or not, depends on what you're using)<br>
If you do have to convert, lookup the swscale functions.<br>
<br>
<pre class="moz-signature" cols="72">Joshua Kordani
LSA Autonomy</pre>
On 9/24/14 7:36 AM, Christiano Belli wrote:<br>
</div>
<blockquote
cite="mid:CAC6ZeB5d6Es6eYpijKv9ENHZ_z-kavMzzz13HxFVCHQDmFmAmw@mail.gmail.com"
type="cite">
<div dir="ltr">Hi Marcin,
<div><br>
</div>
<div> Thanks for the response. Where can I get a example of
use live555 with ffmpeg?</div>
</div>
<div class="gmail_extra"><br clear="all">
<div>
<div dir="ltr"><font
style="color:rgb(42,42,42);font-family:'Segoe
UI',Tahoma,Verdana,Arial,sans-serif"><br>
Att.</font>
<div
style="font-size:10pt;line-height:17px;color:rgb(42,42,42);font-family:'Segoe
UI',Tahoma,Verdana,Arial,sans-serif"><br>
</div>
<div
style="line-height:17px;color:rgb(42,42,42);font-family:'Segoe
UI',Tahoma,Verdana,Arial,sans-serif"><font
style="line-height:normal" size="4">Christiano Belli</font></div>
<div
style="font-size:10pt;line-height:17px;color:rgb(42,42,42);font-family:'Segoe
UI',Tahoma,Verdana,Arial,sans-serif">Cel.:<span
style="white-space:pre"> </span>+55 (41) 8444-7468</div>
<div
style="font-size:10pt;line-height:17px;color:rgb(42,42,42);font-family:'Segoe
UI',Tahoma,Verdana,Arial,sans-serif"><a
moz-do-not-send="true"
href="mailto:christianobelli@hotmail.com"
target="_blank">christiano@techideasbrasil.com</a></div>
</div>
</div>
<br>
<div class="gmail_quote">On Wed, Sep 24, 2014 at 3:18 AM, Marcin
<span dir="ltr"><<a moz-do-not-send="true"
href="mailto:marcin@speed666.info" target="_blank">marcin@speed666.info</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<div>Hi,<br>
Really - i think that you have to decode the stream to
get frame-by-frame data for further analysis. Soon Ross
will reply also that Live555 is not responsible for
decoding/encoding stream but only for reciving it.<br>
I think you have to use ffmpeg or libavcodec for example
to decode bitstream recived by live555 libs and then
pass it to analyzing software as RAW data.<br>
Marcin<br>
<br>
W dniu 2014-09-24 03:07, Christiano Belli pisze:<br>
</div>
<blockquote type="cite">
<div>
<div class="h5">
<div dir="ltr">
<div>
<div>Hello, I'm new with live555 and I'm so
exciting in learning this. I have some
questions:</div>
<div><br>
</div>
<div>There is a way where I can get the
RTSP/H.264 stream from a ip camera and get
each frame from video to do video analytics
with openCV per example.</div>
<div><br>
</div>
<div>Does the process to get each frame from a
RTSP/H.264 stream need a lot of machine
resources?</div>
<div><br>
</div>
<div>Can I in the same time which I'm analyzing
the video, save and live streaming the same
stream?</div>
<div><br>
</div>
<div>All suggestions will help me a lot.</div>
</div>
<div>
<div dir="ltr"><font><br>
Att.</font>
<div><br>
</div>
<div><font style="line-height:normal" size="4">Christiano
Belli</font></div>
<div>Cel.:<span style="white-space:pre-wrap">
</span><a moz-do-not-send="true"
href="tel:%2B55%20%2841%29%208444-7468"
value="+554184447468" target="_blank">+55
(41) 8444-7468</a></div>
<div><a moz-do-not-send="true"
href="mailto:christianobelli@hotmail.com"
target="_blank">christiano@techideasbrasil.com</a></div>
</div>
</div>
</div>
<br>
<fieldset></fieldset>
<br>
</div>
</div>
<pre>_______________________________________________
live-devel mailing list
<a moz-do-not-send="true" href="mailto:live-devel@lists.live555.com" target="_blank">live-devel@lists.live555.com</a>
<a moz-do-not-send="true" href="http://lists.live555.com/mailman/listinfo/live-devel" target="_blank">http://lists.live555.com/mailman/listinfo/live-devel</a>
</pre>
</blockquote>
<br>
</div>
<br>
_______________________________________________<br>
live-devel mailing list<br>
<a moz-do-not-send="true"
href="mailto:live-devel@lists.live555.com">live-devel@lists.live555.com</a><br>
<a moz-do-not-send="true"
href="http://lists.live555.com/mailman/listinfo/live-devel"
target="_blank">http://lists.live555.com/mailman/listinfo/live-devel</a><br>
<br>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
live-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:live-devel@lists.live555.com">live-devel@lists.live555.com</a>
<a class="moz-txt-link-freetext" href="http://lists.live555.com/mailman/listinfo/live-devel">http://lists.live555.com/mailman/listinfo/live-devel</a>
</pre>
</blockquote>
<br>
</body>
</html>