[Live-devel] Chunking up video in openRTSP

Joshua Migdal jmigdal at gmail.com
Thu Apr 22 10:21:54 PDT 2010


Hi all,

I'm trying to modify the openRTSP test app in order to have it output
quicktime files in one minute long chunks instead of in one big mov file.
I've looked a lot at QuickTimeFileSink.cpp and PlayCommon.cpp but have run
into some snags.
Some things I have tried:

Since the start-of-file and end-of-file markers written into the quicktime
file are linked with sink construction and destruction, the first thing I
did was to set up a delayed task that, when invoked, closes the quicktime
sink medium and attempt to recreate it. However, this didn't work as
intended, as there is likely a whole lot of stuff still "attached" to the
filter chain that was set up originally. I don't think live555 liked it when
I ripped out the sink and tried to recreate it on the fly. The code looked
something like this:


closeMediaSinks();

 qtOut = QuickTimeFileSink::createNew(*env, *session,
quickTimeFileName.c_str(),
                                          fileSinkBufferSize,
                                          movieWidth, movieHeight,
                                          movieFPS,
                                        packetLossCompensate,
                                          syncStreams,
                                          generateHintTracks,
                                          generateMP4Format);
 if (qtOut == NULL)
 {
   *env << "Failed to create QuickTime file sink for stdout: " <<
env->getResultMsg();
   shutdown();
 }

 qtOut->startPlaying(sessionAfterPlaying, NULL);


Another approach I took was to simply run openRTSP back-to-back in one
minute intervals. However, this left about a 10 second gap in which I didn't
have video coverage.

The next thing I'd like to try is to close the quicktime movie with and
reopen another one directly within the quicktime sink class itself, thereby
avoiding the filter chain issues I had when destroying the sink entirely.

Just wanted to get your take on what the best approach to doing this is.

Thanks,
Josh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20100422/9fd6bc43/attachment-0001.html>


More information about the live-devel mailing list