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

Collins, Andrew Andrew.Collins at eu.sony.com
Wed Jan 18 13:28:56 CET 2012


Dear FFMPEG Devs,

 

First of all, it's my first posting, and long overdue given the interest
and usage we have with FFMPEG. You guys are all doing a fantastic job.

 

We've been using FFMPEG for various different works and have a number of
internal dev builds here for different project activities. There is one
very small mod that we'd like to suggest to the forum for inclusion in
the standard build.  Some of our work requires us to read the output
file at the same time as it is being generated. For many of these cases
we can simply use a pipe on the output, however, in others where this is
a file it is not possible. 

 

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.

 

Is this something that can be included in the next update?

 

Best regards,

 

Andy

 

04165         /* open the file */
04166         if ((err = avio_open2
<http://ffmpeg.org/doxygen/trunk/avio_8h.html#de8a63980569494c99593ebf0d
1e891b> (&oc->pb
<http://ffmpeg.org/doxygen/trunk/structAVFormatContext.html#1e7324262b6b
78522e52064daaa7bc87> , filename, AVIO_FLAG_WRITE
<http://ffmpeg.org/doxygen/trunk/avio_8h.html#5c9308f296545a8f3b7687d277
a6dabc> ,
04167                               &oc->interrupt_callback
<http://ffmpeg.org/doxygen/trunk/structAVFormatContext.html#5b37acfe4024
d92ee510064e80920b40> ,
04168                               &output_files[nb_output_files
<http://ffmpeg.org/doxygen/trunk/avconv_8c.html#821eae86a7d18bdd5792636a
8ee31d8d>  - 1].opts
<http://ffmpeg.org/doxygen/trunk/structOutputFile.html#0f42098c418cfe88c
d95485674963875> )) < 0) {

 

 

03331     if ((ret = avio_open2
<http://ffmpeg.org/doxygen/trunk/avio_8h.html#de8a63980569494c99593ebf0d
1e891b> (&out, filename, AVIO_FLAG_WRITE
<http://ffmpeg.org/doxygen/trunk/avio_8h.html#5c9308f296545a8f3b7687d277
a6dabc> , &int_cb, NULL
<http://ffmpeg.org/doxygen/trunk/libavcodec_2rawdec_8c.html#9578bf94fd91
3a1b19c44c1213156cf2> )) < 0) {
03332         av_log
<http://ffmpeg.org/doxygen/trunk/log_8c.html#33c4311b86f031152c5a23b91c4
fe862> (NULL
<http://ffmpeg.org/doxygen/trunk/libavcodec_2rawdec_8c.html#9578bf94fd91
3a1b19c44c1213156cf2> , AV_LOG_FATAL
<http://ffmpeg.org/doxygen/trunk/log_8h.html#96970a2980bf6ad28cd403e7dc5
2d6c5> , "Could not open file %s for writing.\n",
03333                filename);

 

 

 

 

 

 

Andrew Collins

Senior Manager, Content Workflow Solutions of Europe (CWSoE)

Tel: 01256 483351

 

Professional Solutions Europe, a division of Sony Europe Limited.

A company registered in England and Wales. Registered office: The
Heights, Brooklands, Weybridge, Surrey. KT13 0XW. Registered company
number 2422874

 



************************************************************************
The information contained in this message or any of its attachments may be confidential and is intended for the exclusive use of the addressee(s).  Any disclosure, reproduction, distribution or other dissemination or use of this communication is strictly prohibited without the express permission of the sender.  The views expressed in this email are those of the individual and not necessarily those of Sony or Sony affiliated companies.  Sony email is for business use only.

This email and any response may be monitored by Sony to be in compliance with Sony's global policies and standards



More information about the ffmpeg-devel mailing list