Opened 14 years ago

Last modified 9 years ago

#385 closed defect (invalid)

Mplayer playback gets stuck

Reported by: arthurchiu@… Owned by: alex@…
Priority: normal Component: ad
Version: 1.0pre7 Severity: normal
Keywords: Cc: compn
Blocked By: Blocking:
Reproduced by developer: Analyzed by developer:

Description

I have cross-compiled MPlayer for a mips32 linux 2.4 machine using an x86 linux
2.6 machine. The configure command I ran is:

./configure --cc=mipsel-linux-gcc --host-cc=mipsel-linux-gcc
--as=mipsel-linux-as --target=mips
--with-extraincdir=/home/mediadev/Arthur/blackWidow/libmad-configure/usr/local/include:/home/mediadev/Arthur/blackWidow/opt/toolchains/uclibc-crosstools-2.4.3/include:/home/mediadev/Arthur/blackWidow/opt/toolchains/uclibc-
crosstools-2.4.3/mipsel-linux-uclibc/include:/home/mediadev/Arthur/blackWidow/opt/toolchains/uclibc-crosstools-2.4.3/mipsel-linux-uclibc/include/g++-v3
--with-extralibdir=/home/mediadev/Arthur/blackWidow/libmad-configure/usr/local/lib:/home/mediadev/Arthur/blackWidow/opt/toolchains/uclibc-crosstools-2.4.3/lib:/home/mediadev/Arthur/blackWidow/opt/toolchains/uclibc-crosstools-2.4.3
/mipsel-linux-uclibc/lib
--prefix=/home/mediadev/Arthur/blackWidow/Mplayer-mips/config/usr/local
--disable-tv --disable-vm --disable-tv-v4l --disable-tv-v4l2
--disable-tv-bsdbt848 --enable-live --disable-dvdread --disable-mpdvdkit
--disable-cdparanoia --disable-sortsub --disable-vidix --disable-tga
--disable-pnm --disable-md5sum
--with-livelibdir=/home/mediadev/Arthur/blackWidow/live-mips/live
--with-madlibdir=/home/mediadev/Arthur/blackWidow/libmad-configure/usr/local/lib

When I make it, I compiled the codec-cfg with x86 version of gcc first, get the
output codecs.conf.h by ./codec.cfg ./etc/codecs.conf > codecs.conf.h, then type
make again. I also added -shared-libgcc in config.mak to resolve a hidden symbol
error on the very last step of the compilation.

Now, with the compiled mplayer executable, I moved it to the mips machine and
tried to run it and test it with a music file. The executable ran, but I have
problems playing the file. I play the file using the following command and the
log with -v option gives:

# ./mplayer -softsleep -v ../i\ believe.mp3
MPlayer 1.0pre7try2-3.3.3 (C) 2000-2005 MPlayer Team
CPU: SGI MIPS

CommandLine?: '-softsleep' '-v' '../i believe.mp3'
get_path('font/font.desc') -> '/root/.mplayer/font/font.desc'
font: can't open file: /root/.mplayer/font/font.desc
font: can't open file:
/home/mediadev/Arthur/blackWidow/Mplayer-mips/config/usr/local/share/mplayer/font/font.desc
Using Unoptimized OnScreenDisplay?
Failed to open /dev/rtc: No such file or directory (it should be readable by the
user.)
Using software timing
get_path('input.conf') -> '/root/.mplayer/input.conf'
Can't open input config file /root/.mplayer/input.conf: No such file or directory
Can't open input config file
/home/mediadev/Arthur/blackWidow/Mplayer-mips/config/usr/local/etc/mplayer/input.conf:
No such file or directory
Falling back on default (hardcoded) input config
get_path('i believe.mp3.conf') -> '/root/.mplayer/i believe.mp3.conf'
Playing ../i believe.mp3.
[file] File size is 4672009 bytes
STREAM: [file] ../i believe.mp3
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 Nullsoft Streaming Video
Checking for NuppelVideo?
Checking for REAL
Checking for SMJPEG
Searching demuxer type for filename ../i believe.mp3 ext: .mp3
Trying demuxer 17 based on filename extension
==> Found audio stream: 0
demux_audio: seeking from 0x474A09 to start pos 0x4A3
demux_audio: audio data 0x4A3 - 0x474989
Audio file detected.
Clip info:

Title: I Believe
Artist: \uffffS\uffffh\uffff
Album: I believe
Year: 2002
Comment:
Track: 1
Genre: Pop

==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
dec_audio: Allocating 4608 + 65536 = 70144 bytes for output buffer.
mp3lib: using generic C decore!
MP3lib: init layer2&3 finished, tables done
MPEG 1.0, Layer III, 44100 Hz 128 kbit Joint-Stereo, BPF: 418
Channels: 2, copyright: No, original: No, CRC: No, emphasis: 0
AUDIO: 44100 Hz, 2 ch, s16le, 128.0 kbit/9.07% (ratio: 16000->176400)
Selected audio codec: [mp3] afm:mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
Checking audio filter chain for 44100Hz/2ch/s16le -> 44100Hz/2ch/s16le...
[libaf] Adding filter dummy
[dummy] Was reinitialized: 44100Hz/2ch/s16le
AF_pre: 44100Hz/2ch/s16le
ao2: 44100 Hz 2 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 2 channels (requested: 2)
audio_setup: using 44100 Hz samplerate (requested: 44100)
audio_setup: frags: 2/16384 (4 bytes/frag) free: 32768
AO: [oss] 44100Hz 2ch s16le (2 bps)
AO: Description: OSS/ioctl audio output
AO: Author: A'rpi
Building audio filter chain for 44100Hz/2ch/s16le -> 44100Hz/2ch/s16le...
[dummy] Was reinitialized: 44100Hz/2ch/s16le
[dummy] Was reinitialized: 44100Hz/2ch/s16le
Video: no video
Freeing 0 unused video chunks.
Starting playback...

At this point, the music got "stucked" between -0.2 and 0.2, ie, keep looping
back and forth between this point.
A: 0.2 (00.2) ??,?%
I used the -softsleep option because I can't find /dev/rtc or /proc/sys/dev/rtc
in my mips system. I looked in the code and found out that the ??,?% should be a
number indicating the CPU usage. Sometimes, it is not ??,?% but instead it goes
to 2000% to 3000%. Would my slow CPU (it's a mini embedded system) have caused
this?

The audio_setup: frags looks quite suspicious too. Though I'm not too sure what
the frags mean, but when I look online, everyone have a large bytes / frag
number where as I am only getting 4 bytes / frag.

I then tried compiling Mplayer with the same configuration options (without all
the cross compilation selections). I can play the same song without a problem on
my x86 machine. The following is the log for that:

./mplayer -v -softsleep /home/mediadev/Songs/i\ believe.mp3
MPlayer 1.0pre7try2-3.4.4 (C) 2000-2005 MPlayer Team
CPU: Intel (Family: 6, Stepping: 6)
Detected cache-line size is 64 bytes
CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2

CommandLine?: '-v' '-softsleep' '/home/mediadev/Songs/i believe.mp3'
init_freetype
get_path('font/font.desc') -> '/home/mediadev/.mplayer/font/font.desc'
font: can't open file: /home/mediadev/.mplayer/font/font.desc
font: can't open file: /usr/local/share/mplayer/font/font.desc
Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay?
Linux RTC init error in ioctl (rtc_irqp_set 1024): Permission denied
Try adding "echo 1024 > /proc/sys/dev/rtc/max-user-freq" to your system startup
scripts.
Using software timing
get_path('input.conf') -> '/home/mediadev/.mplayer/input.conf'
Can't open input config file /home/mediadev/.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('i believe.mp3.conf') -> '/home/mediadev/.mplayer/i believe.mp3.conf'
Playing /home/mediadev/Songs/i believe.mp3.
[file] File size is 4672009 bytes
STREAM: [file] /home/mediadev/Songs/i believe.mp3
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 Nullsoft Streaming Video
Checking for NuppelVideo?
Checking for REAL
Checking for SMJPEG
Searching demuxer type for filename /home/mediadev/Songs/i believe.mp3 ext: .mp3
Trying demuxer 17 based on filename extension
==> Found audio stream: 0
demux_audio: seeking from 0x474A09 to start pos 0x4A3
demux_audio: audio data 0x4A3 - 0x474989
Audio file detected.
Clip info:

Title: I Believe
Artist: \uffffS\uffffh\uffff
Album: I believe
Year: 2002
Comment:
Track: 1
Genre: Pop

==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
dec_audio: Allocating 4608 + 65536 = 70144 bytes for output buffer.
mp3lib: made decode tables with MMX optimization
mp3lib: using MMX optimized decore!
MP3lib: init layer2&3 finished, tables done
MPEG 1.0, Layer III, 44100 Hz 128 kbit Joint-Stereo, BPF: 418
Channels: 2, copyright: No, original: No, CRC: No, emphasis: 0
AUDIO: 44100 Hz, 2 ch, s16le, 128.0 kbit/9.07% (ratio: 16000->176400)
Selected audio codec: [mp3] afm:mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
Checking audio filter chain for 44100Hz/2ch/s16le -> 44100Hz/2ch/s16le...
[libaf] Adding filter dummy
[dummy] Was reinitialized: 44100Hz/2ch/s16le
AF_pre: 44100Hz/2ch/s16le
ao2: 44100 Hz 2 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 2 channels (requested: 2)
audio_setup: using 44100 Hz samplerate (requested: 44100)
audio_setup: frags: 16/16 (4096 bytes/frag) free: 65536
AO: [oss] 44100Hz 2ch s16le (2 bps)
AO: Description: OSS/ioctl audio output
AO: Author: A'rpi
Building audio filter chain for 44100Hz/2ch/s16le -> 44100Hz/2ch/s16le...
[dummy] Was reinitialized: 44100Hz/2ch/s16le
[dummy] Was reinitialized: 44100Hz/2ch/s16le
Video: no video
Freeing 0 unused video chunks.
Starting playback...

The song plays very smoothly after. The CPU usage remains around 1.5% and the
bytes / frag is much higher. What might have happened? How come the music won't
play properly on the other system? Any help would be very much appreciated.
Thanks a lot.

Cheers,

Arthur

Change History (3)

comment:1 Changed 10 years ago by gbell_spamless@…

  • Summary changed from Mplayer playback is "stucked" to Mplayer playback chokes on bad packets in .ts files

comment:2 Changed 10 years ago by gbell_spamless@…

  • Summary changed from Mplayer playback chokes on bad packets in .ts files to Mplayer playback gets stuck

comment:3 Changed 9 years ago by compn

  • Resolution set to invalid
  • Status changed from new to closed, patriotact@gmail.com

well obviously the problem is that the first mplayer output says 'mp3lib: using generic C decore!' while the second mplayer output says 'mp3lib: made decode tables with MMX optimization mp3lib: using MMX optimized decore!'.

mmx is faster than the c version.

probably you need to use an interger-only mp3 decoder on your mips box, like libmad.

-ac mad (if you compile with libmad)

Note: See TracTickets for help on using tickets.