[Bug 116597] wavenc doesn't rewrite header at EOS
GStreamer (bugzilla.gnome.org)
bugzilla at gnome.org
Sat Aug 27 08:28:13 PDT 2011
https://bugzilla.gnome.org/show_bug.cgi?id=116597
GStreamer | gst-plugins | git
Dave <linuxluser> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |linuxluser at gmail.com
--- Comment #9 from Dave <linuxluser at gmail.com> 2011-08-27 15:28:07 UTC ---
Still seeing this as an issue.
# produce 10s WAV using arecord
$ arecord -d 10 -f cd -t wav arecord.wav
# extract the file size from the header
$ od -t d4 -j4 -N4 arecord.wav
0000004 1764036
0000010
# indeed, this is only 8 bytes less than the actual file size (what is to be
expected)
$ ls -l arecord.wav
-rw-r----- 1 linuxluser users 1764044 Aug 27 11:03 arecord.wav
#GREAT!
# now the same for gstreamer whos source is a static file...
$ gst-launch-0.10 filesrc location=arecord.wav !
audio/x-raw-int,rate=44100,channels=2,endianness=1234,width=16,depth=16,signed=true
! wavenc ! filesink location=gst.wav
# extract what gstreamer put in the header
$ od -t d4 -j4 -N4 gst.wav
0000004 1764080
0000010
# we see this is as expected, 8 bytes less than file size
$ ls -l gst.wav
-rw-r----- 1 linuxluser users 1764088 Aug 27 11:13 gst.wav
#GREAT AGAIN!
# now record from a live stream (I hit ctrl-C after 2.2 seconds)...
$ gst-launch-0.10 alsasrc !
audio/x-raw-int,rate=44100,channels=2,endianness=1234,width=16,depth=16,signed=true
! wavenc ! filesink location=gst_stream.wav
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstAudioSrcClock
^CCaught interrupt -- handling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 2245740102 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
# sadly, we get a bogus number (almost equals 2^31)
$ od -t d4 -j4 -N4 gst_stream.wav
0000004 2147418148
0000010
# which is not even close to the actual file size
$ ls -l gst_stream.wav
-rw-r----- 1 linuxluser users 395180 Aug 27 11:20 gst_stream.wav
--
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the gstreamer-bugs
mailing list