Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#435 closed defect (fixed)

Garbled sound in realaudio playback

Reported by: dev.null@… Owned by: r_togni@…
Priority: important Component: ad
Version: HEAD Severity: major
Keywords: Cc:
Blocked By: Blocking:
Reproduced by developer: no Analyzed by developer: no

Description

Garbled sound after a week of hacking around to get mplayer to play a realaudio
file. I get garbled sound in mplayer but plays fine in realplayer10 on linux.

First the basics about my setup:

Ubuntu
2.6.12-10-386 #1 Thu Dec 22 11:37:10 UTC 2005 i686 GNU/Linux
updated and upgraded

ls -l /lib/libc[.-]*

-rw-r--r-- 1 root root 1131932 2005-10-09 17:03 /lib/libc-2.3.5.so
lrwxrwxrwx 1 root root 13 2005-11-01 23:33 /lib/libc.so.6 -> libc-2.3.5.so

gcc -v && ld -v

Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v
--enable-languages=c,c++,java,f95,objc,ada,treelang --prefix=/usr
--with-gxx-include-dir=/usr/include/c++/4.0.2 --enable-shared --with-system-zlib
--libexecdir=/usr/lib --enable-nls --without-included-gettext
--enable-threads=posix --program-suffix=-4.0 --enable-cxa_atexit
--enable-libstdcxx-allocator=mt --enable-clocale=gnu --enable-libstdcxx-debug
--enable-java-gc=boehm --enable-java-awt=gtk --enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.4.2-gcj-4.0-1.4.2.0/jre --enable-mpfr
--disable-werror --enable-checking=release i486-linux-gnu
Thread model: posix
gcc version 4.0.2 20050808 (prerelease) (Ubuntu 4.0.1-4ubuntu9)
GNU ld version 2.16.1 Debian GNU/Linux

as --version

GNU assembler 2.16.1 Debian GNU/Linux

cat /proc/cpuinfo

processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 8
model name : Pentium III (Coppermine)
stepping : 6
cpu MHz : 930.397
cache size : 256 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
pat pse36 mmx fxsr sse
bogomips : 1847.29

lspci -vv|grep audio

0000:00:1f.5 Multimedia audio controller: Intel Corp. 82801BA/BAM AC'97 Audio
(rev 02)

Multimedia audio controller: Intel Corp. 82801BA/BAM AC'97 Audio (rev 02)

I compiled successfully from CVS and see only one thing curious from the config
process during the build:

grep: libavcodec/allcodecs.c: No such file or directory

Though,

apt-cache search codec|grep libav

libavcodec-dev - development files for libavcodec
libavformat-dev - development files for libavformat
avifile-win32-plugin - Win32 audio/video plugin for libavifile
libavcodeccvs - library to encode decode multimedia streams - runtime files

Can't seem to upload the file to mplayerhq.hu as anonymous ftp client for some
reason (error 553).

Here is the mplayer output:

mplayer -v options rjltest.ra

MPlayer dev-CVS-060114-00:33-4.0.2 (C) 2000-2006 MPlayer Team
CPU: Intel Celeron 2/Pentium III Coppermine,Geyserville (Family: 6, Stepping:
6)CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 0
Compiled for x86 CPU with extensions: MMX MMX2 SSE

Warning unknown option skin at line 2
get_path('codecs.conf') -> '/home/randy/.mplayer/codecs.conf'
Reading /home/randy/.mplayer/codecs.conf: 90 audio & 204 video codecs
CommandLine: '-v' 'options' 'rjltest.ra'
init_freetype
get_path('font/font.desc') -> '/home/randy/.mplayer/font/font.desc'
Font /home/randy/.mplayer/font/font.desc loaded successfully! (206 chars)
Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay
Using nanosleep() timing
get_path('input.conf') -> '/home/randy/.mplayer/input.conf'
Can't open input config file /home/randy/.mplayer/input.conf: No such file or
directory
Can't open input config file /usr/local/etc/mplayer/input.conf: No such file or
directory
Falling back on default (hardcoded) input config
get_path('options.conf') -> '/home/randy/.mplayer/options.conf'
Playing options.
get_path('sub/') -> '/home/randy/.mplayer/sub/'
File not found: 'options'
Failed to open options

get_path('rjltest.ra.conf') -> '/home/randy/.mplayer/rjltest.ra.conf'
Playing rjltest.ra.
get_path('sub/') -> '/home/randy/.mplayer/sub/'
[file] File size is 2438884 bytes
STREAM: [file] rjltest.ra
STREAM: Description: File
STREAM: Author: Albeu
STREAM: Comment: based on the code from ??? (probably Arpi)
Checking for YUV4MPEG2
ASF_check: not ASF guid!
Checking for NuppelVideo
Checking for REAL
Checking for SMJPEG
REALAUDIO file format detected.
==> Found audio stream: 0
[RealAudio] File version: 4
[RealAudio] Frame size: 232
[RealAudio] Sub packet size: 0
[RealAudio] 1 channel, 16 bit, 8000Hz
Audio: Unknown (1919969651)
======= WAVE Format =======
Format Tag: 26995 (0x6973)
Channels: 1
Samplerate: 8000
avg byte/sec: 16000
Block align: 232
bits/sample: 16
cbSize: 0
===========================
==========================================================================
Opening audio decoder: [realaud] RealAudio decoder
opening shared obj '/usr/local/lib/codecs/sipr.so.6.0'
Got sipr flavor 3 from bitrate 16000
dec_audio: Allocating 232 bytes for input buffer.
dec_audio: Allocating 128000 + 65536 = 193536 bytes for output buffer.
AUDIO: 8000 Hz, 1 ch, s16le, 128.0 kbit/100.00% (ratio: 16000->16000)
Selected audio codec: [rasipr] afm: realaud (RealAudio Sipro)
==========================================================================
Building audio filter chain for 8000Hz/1ch/s16le -> 0Hz/0ch/??...
[libaf] Adding filter dummy
[dummy] Was reinitialized: 8000Hz/1ch/s16le
[dummy] Was reinitialized: 8000Hz/1ch/s16le
ao2: 8000 Hz 1 chans s16le
audio_setup: using '/dev/dsp' dsp device
audio_setup: using '/dev/mixer' mixer device
audio_setup: using 'pcm' mixer device
audio_setup: sample format: s16le (requested: s16le)
audio_setup: using 1 channels (requested: 1)
audio_setup: using 8000 Hz samplerate (requested: 8000)
audio_setup: frags: 4/4 (8192 bytes/frag) free: 32768
AO: [oss] 8000Hz 1ch s16le (2 bytes per sample)
AO: Description: OSS/ioctl audio output
AO: Author: A'rpi
Building audio filter chain for 8000Hz/1ch/s16le -> 8000Hz/1ch/s16le...
[dummy] Was reinitialized: 8000Hz/1ch/s16le
[dummy] Was reinitialized: 8000Hz/1ch/s16le
Video: no video
Freeing 0 unused video chunks.
Starting playback...

Attachments (4)

smrjltest.ra (1.0 KB ) - added by dev.null@… 18 years ago.
first 1K of offending realaudio file
rjltest.ra (500.0 KB ) - added by dev.null@… 18 years ago.
500K sample from start of problem file
eof.ra (381.7 KB ) - added by dev.null@… 18 years ago.
sample at the end of the real audio file.
eof.wav (32.0 KB ) - added by dev.null@… 18 years ago.
sample at the end of the resulting wav file (this goes on for 45 minutes or more after the end of the actual content.

Download all attachments as: .zip

Change History (25)

by dev.null@…, 18 years ago

Attachment: smrjltest.ra added

first 1K of offending realaudio file

comment:1 by dev.null@…, 18 years ago

generated from the actual 2+M file with dd if=x of=y bs=1024 count=1

comment:2 by dev.null@…, 18 years ago

mplayer works like a charm for most av files

comment:3 by r_togni@…, 18 years ago

Status: newassigned

I think i know what's the problem: sipr in old .ra files, that's the first
sample i see of such a file. If thta's confirmed, i need to add reordering also
for that codec.

Btw you uploaded only 1k of the file, not 1M, can you upload some more (at least
50-100k?)

comment:4 by r_togni@…, 18 years ago

Owner: changed from alex@… to r_togni@…
Status: assignednew

comment:5 by dev.null@…, 18 years ago

(In reply to comment #3)

I think i know what's the problem: sipr in old .ra files, that's the first
sample i see of such a file. If thta's confirmed, i need to add reordering also
for that codec.

Btw you uploaded only 1k of the file, not 1M, can you upload some more (at least
50-100k?)

Apparently this has been a problem before, but didn't get resolved seemingly:

http://itdp.fh-biergarten.de/~itdp/html/mplayer-users/2005-08/msg00055.html

I'll reboot my build machine and post a longer segment.

by dev.null@…, 18 years ago

Attachment: rjltest.ra added

500K sample from start of problem file

comment:6 by dev.null@…, 18 years ago

comment:7 by dev.null@…, 18 years ago

(In reply to comment #3)

I think i know what's the problem: sipr in old .ra files, that's the first
sample i see of such a file.

Well, I've got 2 CDs full of them that I want as mp3s and mplayer is my best hope.

comment:8 by r_togni@…, 18 years ago

Resolution: fixed
Status: newclosed

Fixed in CVS

comment:9 by dev.null@…, 18 years ago

(In reply to comment #7)

Fixed in CVS

Works here!

You sir, are a genius.

comment:10 by dev.null@…, 18 years ago

Resolution: fixed
Status: closedreopened

Soooo close. Now the following command

mplayer -quiet -vo null -vc dummy -af volume=0,resample=44100:0:1 -ao

pcm:waveheader "$i"

where $1 is a 50 min ra file, generates a 100 minute wave. It all sounds good,
but the output file is padded with clicks.

Almost there :-)

comment:11 by diego@…, 18 years ago

Component: aoad

comment:12 by dev.null@…, 18 years ago

In case I was unclear -- the conversion sounds perfect, but during playback
there is exta data (sounds like a quiet loop of some sort) after the end of the
content.

also note that XMMS gives unreliable info for clip lengths.

comment:13 by dev.null@…, 18 years ago

Same problem with 2 channel filter:

mplayer -quiet -vo null -vc dummy -af volume=0,resample=44100:0:1,channels=2 -ao
pcm:waveheader "$i"

comment:14 by dev.null@…, 18 years ago

When I get home, I'll post a sample from the end of the file.

by dev.null@…, 18 years ago

Attachment: eof.ra added

sample at the end of the real audio file.

comment:15 by dev.null@…, 18 years ago

by dev.null@…, 18 years ago

Attachment: eof.wav added

sample at the end of the resulting wav file (this goes on for 45 minutes or more after the end of the actual content.

comment:16 by dev.null@…, 18 years ago

comment:17 by r_togni@…, 18 years ago

Most media files contain vital information (header, codec type, ...) at the
beginning, so cutting it out make the remaining data useless.
Can you please upload a complete ra sample? (i don't need the uncompressed wav)
Do you get the problem only when converting to wav or also with playback?

comment:18 by dev.null@…, 18 years ago

The end of the file is provided because if should, I am guessing, have the eof
marker that seems to be missed. This is the last 381.72K of the same file as
the preceding attachement of Jan 14. The whole file is about 2.4 Meg -- too big
to upload to Bugzilla.

If it would help I can try to get the whole file to you by uploading it in 1M
segments and you can cat it back together, unless you want me to e-mail you the
whole file instead of posting to Bugzilla.

comment:19 by dev.null@…, 18 years ago

(In reply to comment #16)
<snip> ... e-mail you the

whole file instead of posting to Bugzilla.

Sent to Roberto by e-mail the whole testcase ra file.

comment:20 by dev.null@…, 18 years ago

Resolution: fixed
Status: reopenedclosed

I think that Robertos fix is good. I have isolated the problem to af code (I
thin) and will file a new bug report.

comment:21 by reimar, 18 years ago

attachments.description: first 1M of offending realaudio filefirst 1K of offending realaudio file, 1
Note: See TracTickets for help on using tickets.