On Wed, Feb 25, 2004 at 04:59:28PM +0100, Ronald Bultje wrote:
> Hi Richard,
> 
> On Wed, 25 Feb 2004, Richard Ellis wrote:
> > You are trying to recreate TiVo pause live TV functionality,
> > right? If so, this isn't going to quite work like you want. 
> > Until lavrec closes out a segment and moves on to a new segment
> > (and you will need to use the %d segment filename syntax) you
> > will be unable to view that segment.  In other words,
> > lavplay/lav2yuv will refuse to read the beginning of a file that
> > lavrec is still recording into because the .avi or .qt
> > (quicktime) header has not yet been set up.  Only once lavrec
> > closes out that segment and starts a new segment does the file
> > header get setup and then lavplay/lav2yuv see the file as a
> > playable .avi or .qt file.
> 
> Quicktime shouldn't have that issue, should it?

When I last used quicktime, it did, but that was about a year ago now
and prior to the change over to the new quicktime libs in the tools. 
I just stuck with avi after that in part because I also find it
preferable to have 10 1.7G files to shuffle about vs. one single 17G
file.  Unless the manner in which the new quicktime libs handle the
files has changed, it will have the same problems.  As best I could
tell, lavrec (or more correctly the quicktime/avi support libs)
output a skeleton block at the front of the file that will become the
file header when the file is closed, but is not itself a proper
header.  Because it's not a proper header, attempting to read the
file while it's still being recorded into by lavrec results in the
other tools complaining that they can't read the file.

It's easy to test, simply start up a recording, and while the
recording is happening, try to run lav2yuv/lavplay/glav on the file. 

This is also the same reason why an aborted recording is unreadable,
because when recording aborts, the file is not properly closed out
(no header updates happen) and so initially the file is unreadable. 
With avi, I discovered that all I needed to do was copy the header
from another valid avi over to the broken file, and it would
magically become readable (not perfectly, lav2yuv churns burning CPU
for a bit before it starts reading the file, but it eventually does
work).  With quicktime, I never found a way to recover from an
aborted recording session leaving the file unreadable.  So I stuck
with many little files and avi for this reason as well.  At least
with many little files, if the last file can't be recovered, only a
small portion of the recording unreadable, not the whole entire
recording.  And with avi, I've had success just copying another files
header over to the broken one.



-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Mjpeg-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mjpeg-users

Reply via email to