[FFmpeg-devel] Allow output files as read-write

Michael Niedermayer michaelni at gmx.at
Wed Jan 18 21:41:23 CET 2012


On Wed, Jan 18, 2012 at 08:51:03PM +0100, Reimar Döffinger wrote:
> On Wed, Jan 18, 2012 at 12:28:56PM +0000, Collins, Andrew wrote:
> > We would like to ask if it is possible to change the parameter on line
> > 4166 and 3331 from AVIO_FLAG_WRITE to AVIO_FLAG_READ_WRITE to prevent
> > the file lock. Obviously a more clever suggestion would be to have this
> > as one of the command options. 
> [...]
> > While it is not desirable to do this in all cases with your new
> > excellent implementation of fragmented MP4 files it means we can now
> > read a growing file at the same time it is being generated - good for
> > live inputs. With the file-lock on that is not possible. We've tested
> > this internally and the simple change makes all the difference.
> 
> I think we are missing some critical information here.
> What do you mean by file-lock? Are you using Windows (the only
> OS I know of that locks file without anyone asking for it and no
> good reason at all really)?
> Regardless of that, opening a file for write-only or read-write
> shouldn't make a difference for file-locking, that seems like
> really nonsensical behaviour.
> And "lying" to the file layer about what access is needed is a rather
> bad idea, since we may have or add protocols that cannot support
> read-write, and FFmpeg would then not be able to use them as output.
> If my assumptions about you running Windows are correct,

> you should
> probably just add a few calls to libavformat/file.c that tells it
> to not pointlessly lock the file.

note though, we are certainly interrested in also having these calls
in main ffmpeg git

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In a rich man's house there is no place to spit but his face.
-- Diogenes of Sinope
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120118/e7de9d55/attachment.asc>


More information about the ffmpeg-devel mailing list