[FFmpeg-trac] #3346(undetermined:new): WAVE files unplayable if inturrupted during recording process
FFmpeg
trac at avcodec.org
Sun Jan 26 17:32:20 CET 2014
#3346: WAVE files unplayable if inturrupted during recording process
-------------------------------------+-------------------------------------
Reporter: gmvoeth | Owner:
Type: enhancement | Status: new
Priority: wish | Component:
Version: unspecified | undetermined
Keywords: wav | Resolution:
Blocking: | Blocked By:
Analyzed by developer: 0 | Reproduced by developer: 0
-------------------------------------+-------------------------------------
Comment (by gmvoeth):
While Running the WAVE command if a power interruption occurs
OR I close the batch command windows before completion of the
recording, the wave file will be unplayable and must be deleted
loosing all data. I am aware that good data up to the loss of power
is still present within the file, but, the file will not open or play
most probably because a proper header was not written to the
prematurely closed file. This can most likely be fixed by opening
the wave file entirely and writing the header prior to writing the
data to the file. You already know everything you need to know
to write a good header. The file type and -t command and sample rate and
bit rate sets the ultimate file size of any pcm uncompressed format and
can be written right away.
However, not all compiler programs are able to open empty files on a disk.
The fix for this problem requires the opening of an empty file with
whatever data is already on the disk to its final size at closing time,
the data being written to be the only data inserted later. COMPLETE HEADER
FIRST, DATA LAST, UNCOMPRESSED PCM WAVE FILE. Then, if a power failure
occurs the file should be readable even if the data is not right, it will
be good up to power failure with garbage at the file end. But still
playable. I hope you understand what I am trying to say.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/3346#comment:2>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list