ECToo / lavfilters

Automatically exported from code.google.com/p/lavfilters
GNU General Public License v2.0
0 stars 0 forks source link

Splitter reads capture AVI file after actually captured frames and hangs forever when last frame in file is accessed #470

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I am working a lot with video capture of live streams to AVI files. A common 
practice for video capture (with DirectShow) is to allocate a large capture 
file as destination AVI file before starting the actual capture process. This 
is done to avoid re-allocations and resulting frame drops during capture due to 
slow non-linear seek operations of the destination hard drive.

To support the capture file process, DirectShow offers 
ICaptureGraphBuilder2::AllocCapFile() to create such a file and
ICaptureGraphBuilder2::CopyCaptureFile() to copy the actually captured frames 
from the capture file to a new AVI file when capture is finished.

When working with capture AVI files, LAV Splitter behaves differently from 
Windows' AVI Splitter in two ways:
(1) LAV Splitter reads beyond the actually captured frames in the capture file 
itself when is being opened when capture is finished (usually done for a first 
review of the result). This happens if an existing capture file is being 
re-used and another shorter video sequence (less frames) than already stored in 
the capture file is being captured.
(2) If the first issue occurs, LAV Splitter hangs forever when the last frame 
of the longer/longest captured video sequence is being accessed.

Both issues make LAV Splitter useless as a replacement for Windows' AVI 
Splitter when working with capture files: The first one because it is 
incompatible and unreasonable behavior, the second one because it hangs/crashes 
the application using LAV Splitter.

Tested with v0.62.
I can provide sample files if required.

Original issue reported on code.google.com by t...@inot.de on 30 Jul 2014 at 3:46

GoogleCodeExporter commented 9 years ago
The avi demuxer is written and maintainted by ffmpeg, any problems should be 
reported to its developers - but to me it sounds like an unsupported use-case, 
how would it even know that your file ended, or that you don't want any more 
frames. A valid file may be damaged and the user wanting all the frames out of 
the file.

In any case, if the Windows AVI Splitter works for you, I would suggest to 
stick with that, I have no plans to try to work on the mess that is AVI.

Original comment by h.lepp...@gmail.com on 30 Jul 2014 at 4:33