<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<META content="MSHTML 6.00.2800.1522" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>As said by Ross, LIVE doesn't encode or decode.
</FONT></DIV>
<DIV><FONT face=Arial size=2>Now first of all take a look at the following code
-</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>FramedSource*
MPEG1or2VideoFileServerMediaSubsession<BR>::createNewStreamSource(unsigned
/*clientSessionId*/, unsigned& estBitrate) {<BR> estBitrate = 500; //
kbps, estimate</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2> ByteStreamFileSource*
fileSource<BR> = ByteStreamFileSource::createNew(envir(),
fFileName);<BR> if (fileSource == NULL) return NULL;<BR> fFileSize =
fileSource->fileSize();</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2> return
MPEG1or2VideoStreamFramer<BR> ::createNew(envir(), fileSource,
fIFramesOnly, fVSHPeriod);<BR>}<BR></FONT></DIV>
<DIV><FONT face=Arial size=2>If you notice that it is using ByteStreamFileSource
which reads bytes from a file and then MPEG1or2VideoStreamFramer uses those data
from ByteStreamFileSource to create a MPEG1or2 video frame. </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>So without changing any other code, you can make a
tweak-</FONT></DIV>
<DIV><FONT face=Arial size=2>i) Create a class similar to ByteStreamFileSource
</FONT></DIV>
<DIV><FONT face=Arial size=2>ii) Your created class (derived from
FramedFileSource) will directly return the encoded frame (using ffmpeg that you
have already done)</FONT></DIV>
<DIV><FONT face=Arial size=2>iii) For that you have to implement that
doGetNextFrame() </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial><FONT size=2>In this scheme, only drawback is that
MPEG1or2VideoStreamFramer parses an already framed media data.
But advantage of this scheme is that you need not change in other live
classes where code may be quite involved.</FONT></FONT></DIV>
<DIV><FONT face=Arial> </DIV></FONT>
<DIV>With regards,<BR>Shaswata<BR></DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=buscarini@gmail.com href="mailto:buscarini@gmail.com">José Manuel
Sánchez</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=live-devel@ns.live555.com
href="mailto:live-devel@ns.live555.com">live-devel@ns.live555.com</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Friday, October 27, 2006 1:04
AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B>
[Live-devel]%5BLive-devel%5D%20Problem%20trying%20to%20use%20libavcodec%20and%20live555</DIV>
<DIV><BR></DIV>Thanks for the quick response. I'll try to clarify what I'm
trying to do.<BR><BR>This is what I intend to do:<BR><BR>file -> ffmpeg
-> modify frame -> ffmpeg -> liveMedia -> network ->
vlc<BR><BR>I want to load a movie, modify the raw frames, encode it again and
send it to another computer which has a VLC client. <BR>I have been successful
with the last part (with the example testMPEG1or2VideoStreamer), and with the
first one (I can read the file with libavcoded and then see the decoded
frames). <BR>The next thing I have tried is this: <BR><BR>file -> ffmpeg
-> liveMedia -> network -> vlc<BR><BR>This is where it fails. I
decode the movie with av_read_frame, and then I connect the output with a
MPEG1or2StreamFramer, which is connected with a MPEG1or2RTPSink. <BR>This is
more or less the code of the test.<BR><BR>Should I decode the frame and put it
to MPEG1or2StreamFramer or is the AVPacket what it's expecting?<BR>The main
problem is that I don't know what each module is expecting. Does the liveMedia
send decoded frames? does it encode them? <BR><BR><BR>Thanks,<BR><BR>Antonio
Garcia<BR>
<P>
<HR>
<P></P>_______________________________________________<BR>live-devel mailing
list<BR>live-devel@lists.live555.com<BR>http://lists.live555.com/mailman/listinfo/live-devel<BR></BLOCKQUOTE></BODY></HTML>