GNOME Bugzilla – Bug 615623
Append support in wavenc
Last modified: 2011-07-27 10:17:24 UTC
wavenc element should be able to support append mode operation. In certain use cases, it is desirable to append the newly encoded data to an existing file. The expected behavior of wavenc is append mode is as follows: 1) Restrict duplicate header inclusions (middle of the encoded data stream). 2) Update the chunk size and other relevant fields in the main header (considering the newly encoded and previously existing file data). Thanks, Kunal
None of the muxers support append right now. This is quite normal, as they don't know about where the data is written or sent. There is no design for supporting that usecase in gstreamer yet at all. Feel free to study the existing muxers and demuxer and propose how it could be done.
Anything going to happen here?
Sinha, what use-cases do you have in mind? Some application might be able to just pause the recording and continue the file. Appending to an existing file brings some constraints. E.g. would the muxer need to check the file and constrain the caps to the format in the file. Maybe the whole thing can be done with a bin, filesrc ! demuxer, checking the caps, setting them on a capsfilter before the muxer and using filesink with append=true.
I think the two cases mentioned above needs to be handled essentially. 1) Pausing of pipeline should allow normal resume operation. 2) Constraining of the caps to format of the file needs to be handled. 3) If the file is altogether a new file, append=true needs to be overlooked as we need to dump the headers too. Thanks, Kunal
(In reply to comment #4) > I think the two cases mentioned above needs to be handled essentially. > > 1) Pausing of pipeline should allow normal resume operation. That should work already (GST_STATE_PAUSED). > 2) Constraining of the caps to format of the file needs to be handled. > 3) If the file is altogether a new file, append=true needs to be overlooked as > we need to dump the headers too. > > > Thanks, > Kunal Kunal, I meant to ask for what kind of application would you need it?
I think this is outside of scope for wavenc. It's up to you to ensure a contiguous input stream of whatever format, using e.g. gnonlin or input-selectors or whatever. If the format changes mid-stream, just writing a new wav header and continuing to write into the same file seems quite wrong to me. Is this supposed to be officially supported? (does windows media player play such files?)
Kunal, can you please respond to comment#6 ?
I think format changes mid-stream cannot be handled in case of wav as in case of amr etc. The encoding is configured for a pre-defined set of bitrate and appending that file on those changes cannot be catered by our wavenc. I think this should be out of scope for wavenc.
> I think this should be out of scope for wavenc. Ok, will close as WONTFIX then, thanks.