Tiny Core Linux

Tiny Core Extensions => TCE Talk => Topic started by: thane on May 24, 2009, 01:57:58 AM

Title: mplayer problems
Post by: thane on May 24, 2009, 01:57:58 AM
I had this posted at the end of xmms/oss newbie problem thread, but was OT. I posted:

I recently downloaded mplayer.tcz and have run into problems with video/sound sync and "too many packets in the buffer". These problems aren't unique to TCL; they seem to be widely reported for mplayer under various versions of Linux. Just wondering if anyone here has run across this and found solutions.

Jason W replied:

... seems to me like you have the same issues I have with some of my machines.  That is a processor that cannot keep up with the video, especially in unaccelerated Xvesa mode.  I don't see this with the same Mplayer and the same video/DVD on my faster machines.  YMMV.
Title: Re: mplayer problems
Post by: junan on May 24, 2009, 10:22:21 PM
maybe u need to enable frame dropping. sometime it's help.
Title: Re: mplayer problems
Post by: mcewanw on May 24, 2009, 11:05:13 PM
I think it is always important to give the main specs of the machine you are using (CPU and speed, installed RAM and so on), especially when the topic concerned process intensive video.

In terms of possible performance, using a lean Linux-based OS with mplayer, GeeXboX version 1.1 plays fullscreen DVD perfectly smoothly on my old Dell Latitude CPt, Celeron 400 MHz machine which only has 128 MBytes of RAM installed. I believe GeeXboX uses commandline mplayer in conjunction with framebuffer (rather than Xorg or Xvesa) however.

With Xorg you need to enable/choose mode xv for video acceleration on old machines (Xvesa doesn't provide video accel as far as I am aware).

Generally, I feel that is hard to match GeeXboX performance on a more general-purpose Linux (even a slim small one) however, since more processes are generally being run on such systems.  I have a frugal install of GeeXboX on my system (dual-booting with TC in a PPR/TCZ configuration as my main OS) for that very reason.

Should be no problem getting smooth fullscreen DVD video on a faster machine though (I find, for example, that a Pentium III 500MHz, 256 MB RAM, and above works fine with mplayer-nodeps).
Title: Re: mplayer problems
Post by: curaga on May 25, 2009, 07:53:42 AM
I'm pretty familiar with Geexbox, having used the 1.x series myself for a while back. They have a uclibc-built small environment that loads to ram similar to TC. On the media player side the 1.x series uses normal Mplayer, but instead of framebuffer, they use direct Vesa bios access along with vidix graphics card acceleration.

Vidix is equivalent to XV in that it accelerates the showing part, ie scaling and filters, but it's a different architecture, for example there are no Intel drivers for vidix. Vidix should be usable on mplayer-nodeps and Xvesa, by running Mplayer as root and using -vo xvidix. I haven't tried it though.
Title: Re: mplayer problems
Post by: thane on May 25, 2009, 03:04:02 PM
Thanks for the replies. I'm away from my TCL box now.

I'm running TCL on a Compaq Deskpro EN which has a Pentium III and 512M of RAM. It's using TCL's default video mode (Xvesa?). Mplayer is the gtk2 version -- I already had that set of libraries installed for another app so thought the additional overhead would be minimal.

Based on what's posted here it sounds like my box has plenty of horsepower for this. I'll try the mplayer nodeps version and see if that makes a difference.
Title: Re: mplayer problems
Post by: thane on May 26, 2009, 06:06:07 PM
OK, stupid question:

How do I run the nodeps version of Mplayer?
Title: Re: mplayer problems
Post by: junan on May 26, 2009, 11:31:24 PM
type mplayer at terminal. nodeps mean no gui support.
Title: Re: mplayer problems
Post by: thane on May 27, 2009, 02:23:55 AM
Thanks junan (and everyone else who posted). It works! Running it with frames dropped; didn't look much at the other settings yet. The video skips occasionally but is synced with the sound.
Title: Re: mplayer problems
Post by: mcewanw on June 23, 2009, 05:19:40 AM
I'm pretty familiar with Geexbox, having used the 1.x series myself for a while back. They have a uclibc-built small environment that loads to ram similar to TC. On the media player side the 1.x series uses normal Mplayer, but instead of framebuffer, they use direct Vesa bios access along with vidix graphics card acceleration.

Vidix is equivalent to XV in that it accelerates the showing part, ie scaling and filters, but it's a different architecture, for example there are no Intel drivers for vidix. Vidix should be usable on mplayer-nodeps and Xvesa, by running Mplayer as root and using -vo xvidix. I haven't tried it though.

Yep, vidix works well with mplayer on machine running bog standard Xvesa... (I've tried the following with both the nodeps version and the gtk2 version from the repos). Using alsa sound:

mplayer -fs -vo xvidix dvd://

On a Pentium III (Coppermine 450 MHz processor), with 256 MB RAM, and default tinycore Xvesa only, the above plays DVDs smoothly, at fullscreen, whilst keeping the CPU utilisation around 50%, which is just about as good as I've seen with Xorg with xv acceleration. The machine I've tried this on is an old, maybe nine or ten years old, Dell Latitude CPx laptop (with a neomagics video card AFAIK).
Title: Re: mplayer problems
Post by: curaga on June 26, 2009, 07:42:08 AM
Heh, now I have tried xvidix, and it wouldn't recognize my card :P Even though it is claimed to be supported in the source (Radeon X1300, RV516). Nice to hear it works for others :)
Title: Re: mplayer problems
Post by: daemonjax on June 26, 2009, 04:35:24 PM
I haven't tried playing DvDs, but I got mplayer to work flawlessly using the nodeps mplayer tce package along with the alsa tce package for sound.  This on a PII 266mhz laptop with 192megs of mem.

I prefer alsa to OSS, although there seems to be something wrong with the script to save my mixer settings between reboots.
Title: Re: mplayer problems
Post by: thane on June 26, 2009, 06:47:21 PM
In TCL 2.x I'm using mplayer nodeps + ALSA for audio/video and streaming radio. I have to set the mplayer playback speed to .86 to get the sound right though. ALSA in TCL 1.x played back at normal speed in both mplayer and XMMS. I've seen reports on other Linux forums about playback speed problems with the soundcard in my PC (Compaq Deskpro EN) so I don't think it's a TCL-specific thing.
Title: Re: mplayer problems
Post by: daemonjax on June 27, 2009, 08:42:28 AM
In TCL 2.x I'm using mplayer nodeps + ALSA for audio/video and streaming radio. I have to set the mplayer playback speed to .86 to get the sound right though. ALSA in TCL 1.x played back at normal speed in both mplayer and XMMS. I've seen reports on other Linux forums about playback speed problems with the soundcard in my PC (Compaq Deskpro EN) so I don't think it's a TCL-specific thing.

Well, I guess the important thing is that you've found a work-around... which is the next best thing to it working out of the box -- something I always hope for, but don't expect. ;)
Title: Re: mplayer problems
Post by: thane on June 27, 2009, 08:07:54 PM
Still don't know why ALSA (but not OSS ever) worked OK on my box in TCL 1.x but not 2.x. Other forums have had various explanations like a change in the Linux kernel or sound driver, but that doesn't seem applicable in TCL.
Title: Re: mplayer problems
Post by: thane on July 05, 2009, 03:11:17 PM
Yesterday I had to go back to TCL 1 so I could play some on-line music clips. Although I can work around the sound problem in mplayer, if I play anything in Flash or XMMS the problem is still there.
Title: Re: mplayer problems
Post by: Jason W on July 10, 2009, 07:17:15 PM
TC 2.x with ALSA plays sound too fast on my snd_intel8x0 chip.  I found a workaround that may help for the fast playback.  Basically this in the bootlocal.sh file:

modprobe snd_intel8x0 ac97_clock=4100
/usr/local/etc/init.d/alsasound start

That sets the sound to a normal speed for me.
Title: Re: mplayer problems
Post by: thane on July 11, 2009, 02:09:46 AM
Thanks, I'll give it a try!
Title: Re: mplayer problems
Post by: thane on July 11, 2009, 03:02:22 PM
The clock instruction altered the sound, but I need to play with it some more.

I did leave in the alsasound start instruction. It's nice not to have to type 'sudo alsaconf' every time I boot! I'll review the posts on alsa sound persistence and see if I can save the volume settings. Thanks for the help!
Title: Re: mplayer problems
Post by: thane on August 03, 2009, 02:46:40 AM
Not sure it's the complete solution, but putting this:

rmmod snd-intel8x0

in bootlocal.sh prior to the modprobe instruction lets the modprobe alter the sound. Right now I'm setting ac97_clock=44100 but that may change.

edit: changed the setting to ac97_clock=41194
Title: Re: mplayer problems
Post by: Jason W on August 04, 2009, 07:35:27 AM
Youre right, I forgot to mention to rmmod the module before modprobing it again.
Title: Re: mplayer problems
Post by: jpeters on October 05, 2009, 02:08:58 AM
Can't get MPlayer-svn-gtk2.tc  sound with ALSA using version tinycore_2.4rc4.  xmms is working fine.
In the audio prefs, it looks like only an oss driver is available and it doesn't like /dev/dsp. I think I had this working with a prior version. 
Title: Re: mplayer problems
Post by: thane on October 05, 2009, 03:56:25 AM
I'm using the gtk2 MPlayer with ALSA in TCL 2.3.1. Other than the problem above (related to the PC chipset and affecting sound in all apps) it's worked OK.
Title: Re: mplayer problems
Post by: jls on October 05, 2009, 04:14:54 AM
u can install the alsa-oss extension and start mplayer like this:
Code: [Select]
aoss mplayer
Title: Re: mplayer problems
Post by: jpeters on October 05, 2009, 04:27:25 AM
u can install the alsa-oss extension and start mplayer like this:
Code: [Select]
aoss mplayer

Hey...that worked!   Thanks
Title: Re: mplayer problems
Post by: curaga on October 05, 2009, 04:36:17 AM
Otherwise, you might not have had the alsa oss modules loaded. They aren't loaded automatically, but the init script loads them. With them loaded, no aoss needed.
Title: Re: mplayer problems
Post by: jls on October 05, 2009, 04:43:44 AM
Otherwise, you might not have had the alsa oss modules loaded. They aren't loaded automatically, but the init script loads them. With them loaded, no aoss needed.
can u explain this better? Can u tell us the commands?
Title: Re: mplayer problems
Post by: curaga on October 05, 2009, 05:11:35 AM
Without the script:
Quote
sudo modprobe snd-seq-oss
sudo modprobe snd-pcm-oss
Title: Re: mplayer problems
Post by: jls on October 05, 2009, 06:00:07 AM
so alsa-oss extension can by removed from the repository.
Plz add this 2 modprobe commands in the info file of mplayer.
Title: Re: mplayer problems
Post by: curaga on October 05, 2009, 06:33:29 AM
Some apps do require alsa-oss, let's not be hasty.

The modprobing is done by the alsa script, so I think they aren't needed in individual packages' info files.
Title: Re: mplayer problems
Post by: Jason W on October 05, 2009, 06:53:20 AM
I agree.  As a minimum running /usr/local/etc/init.d/alsasound is expected to make use of alsa, and when that does not work using alsaconf can be used.  Some systems may hear sound without running either by the simple action of udev loading the modules, but that does not mean alsa has been set up completely.
Title: Re: mplayer problems
Post by: jls on October 05, 2009, 09:47:34 AM
If 4 example I say remove alsa-oss, this shall be done since it's my extension. But don't warry if u say it's needed I belive u
Title: Re: mplayer problems
Post by: Jason W on October 05, 2009, 10:41:02 AM
The alsa oss modules are not in the alsa oss extension but in the modules extensin.  Alsa-oss provides libraries.  I have normally don't use alsa-oss extension but have oss support.  I believe that Juanito told me that alsa was compiled with oss support natively enabled.  I don't believe alsa-oss.tczl is necessary as I don't normally use it, but it may be of help to other folks.

Title: Re: mplayer problems
Post by: jpeters on October 05, 2009, 11:21:14 AM
Otherwise, you might not have had the alsa oss modules loaded. They aren't loaded automatically, but the init script loads them. With them loaded, no aoss needed.

That worked. I'm surprised that everything else, including xmms, works without the -oss drivers.  I see that it's in the info file, and I intitially loaded it, but got sidetracked into scripting alsamixer to get sound.  (had to click various mutes off and on with pauses after boot.).   
Title: Re: mplayer problems
Post by: Jason W on October 05, 2009, 09:03:12 PM
I had the issue of alsa starting with volumes muted on my normal box, running alsamixer showed all channels set to mute.  The issue on my box was a stale /etc/asound.state file in my backup.  I don't know if it got corrupted or it was from another machine, but removing it and starting fresh fixed it.

I have not tried to find why my laptop starts with certain channels muted, but this at least helped on my desktop.
Title: Re: mplayer problems
Post by: jpeters on October 05, 2009, 10:01:31 PM
I had the issue of alsa starting with volumes muted on my normal box, running alsamixer showed all channels set to mute.  The issue on my box was a stale /etc/asound.state file in my backup.  I don't know if it got corrupted or it was from another machine, but removing it and starting fresh fixed it.

I have not tried to find why my laptop starts with certain channels muted, but this at least helped on my desktop.

I load alsamixer settings from a script, which has mutes off and volume levels set. I have another script hotkeyed that turns Master and PCM mutes off and back on.  It's temperamental...but that method works consistently.   
Title: Re: mplayer problems
Post by: jls on October 17, 2009, 01:26:29 PM
Without the script:
Quote
sudo modprobe snd-seq-oss
sudo modprobe snd-pcm-oss
with script instead of aoss, mplayer locks the sound, so no more sounds for example form pidgin while mplayer is playing.
Title: Re: mplayer problems
Post by: curaga on October 17, 2009, 01:57:19 PM
A limitation of alsa's oss emulation. And a reason to use aoss, if this combo is desired ;)