[MPlayer-users] Playing 8-bit raw Audio with mplayer
Martin McCormick
martin at dc.cis.okstate.edu
Sun Aug 23 00:22:58 CEST 2009
This works for sure but:
mplayer -quiet -rawaudio samplesize=1:channels=1:rate=8000 -demuxer rawaudio \
/tmp/rawaudio.tmp
I did discover an interesting little bug that is either
a misunderstanding on my part or an off-by-one situation.
If you listen to the dump with headphones or a good pair
of speakers, you can hear a rhythmic throbbing effect with a
rate of about 1 throb per second. It reminds me of the effect
you get when the tape guides on a tape machine are allowing the
tape to skew a little so the movement over the head is not
perfectly horizontal. You almost don't notice it but it is there
at times and somewhat annoying.
It made me wonder if the codec was feeding audio that
was being sampled a little faster than it should be.
I changed the sample rate to 8001 and the throb effect
doubled in speed, telling me that this was the problem but I had
gone in the wrong direction.
At 7999, the throb is totally gone and the effect is the
same as what you get if you cat a raw audio file directly to
/dev/dsp.
For all I know, it might not even show up on another
computer with a different sound card and possibly a different
time base.
I tried it on a computer I use at work that has a SBLive
sound card and I think I did still hear the slight throb effect.
When running with the 7999 rate, the throb returns when one
alters the speed with the [] keys and returns to the base rate
so it must be picking up a hard-coded value rather than the
parameter that was originally fed to mplayer.
Seeking with the arrows, however, does not disturb the
sampling at all. The only thing one has to watch for is to not
try to seek backward or forward past the ends of the file or
mplayer exits.
I use that 8-bit stream to record voice-grade audio from
some VHF scanners and short wave radios. The 4-KHZ upper limit
is not suitable for music, but it is just fine for
communications audio. You can barely tell the difference between
the recording and the live audio.
Martin McCormick WB5AGZ Stillwater, OK
Systems Engineer
OSU Information Technology Department Telecommunications Services Group
More information about the MPlayer-users
mailing list