Author Topic: How is Mplayer launched?  (Read 6262 times)

jeangot

  • Guru
  • ****
  • Posts: 233
    • View Profile
How is Mplayer launched?
« on: June 22, 2008, 10:24:51 pm »
Hello,

where can I find the command line that launches Mplayer (from videos fro m2ts files for example)? Is it in a sh script, or somewhere in a pluto binary?
I have a problem with Mplayer not being able to seek within large mkv files, which is apparently a known proeblem, and I would like to play with the command line (there is an argument to enable large files support apparently) before trying to recompile a different mplayer binary.

Will report of course if I find anything helpfull/conclusive.

Jean

royw

  • Guru
  • ****
  • Posts: 261
    • View Profile
Re: How is Mplayer launched?
« Reply #1 on: June 23, 2008, 01:17:35 am »
Here's an example for playing a wav.  I haven't been able to figure out how to play a dvd.  I suspect it may be a series of DCE commands...

http://wiki.linuxmce.org/index.php/MessageSend#Sending_Commands

To see what DCE command an orbiter uses, try tail -f /var/log/pluto/DCERouter.log then playing a media from the orbiter.

Another helpful technique in building the DCE command is to use pluto_admin, show device tree, CORE, The core/hybrid, OnScreen Orbiter, Send command to device.  This is a wizard for building the DCE command and will show the MessageSend command line.

HTH,
Roy

darrenmason

  • Addicted
  • *
  • Posts: 529
    • View Profile
Re: How is Mplayer launched?
« Reply #2 on: June 23, 2008, 02:29:47 am »
The MPlayer_Player device uses an instance of MPlayerEngine which seems to encapsulate the execution of MPlayer.

see http://svn.charonmedia.org/trac.cgi/browser/trunk/src/MPlayer_Player/MPlayerEngine.cpp

Regards
Darren

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: How is Mplayer launched?
« Reply #3 on: June 23, 2008, 05:41:15 am »
guys....

Mplayer_Player is ONLY used for HD DVD and Blu-Ray rip playback, look at the Xine_Plugin code for clarification.. *hmm*

for everything else, Xine_Player is used (not Xine, Xine_Player)

-Thom

jeangot

  • Guru
  • ****
  • Posts: 233
    • View Profile
Re: How is Mplayer launched?
« Reply #4 on: June 24, 2008, 06:30:15 am »
Guys, thanks!
Darren, this is exactly what I needed, now I can try if this option will have an effect: --enable-largefiles

Thom, I know we're not supposed to use Mplayer to play video files, and that support fro Mplayer is in early stages, but a mkv of 8 Gb in 1080p (the system and screen resolution is 720p, the file is 1080p) just won't play correctly with Xine (I'm on a Media Live with 169.12 Nvidia driver and 4800+ X2 CPU). I tried every suggestion I could find (enable useevents, enbale/disable sync to vblank etc). When I force it to play with Mplayer it works fine (except for the fact that I can't seek). If there is anything else worth trying please tell me.

I also have similar problems when playing back HD shows recorded by Myth, from the video section, which uses Xine, versus playing them from ithin MythTV.

EDIT: --enable-largefiles is actually not a command line option to run Mplayer, but a configure option when building it
« Last Edit: June 24, 2008, 07:02:13 am by jeangot »

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: How is Mplayer launched?
« Reply #5 on: June 24, 2008, 06:45:27 am »
and again, you can't..because the mplayer engine is hard-coded to be launched from  Xine_Plugin (as a redirect of sorts) when certain media types are found...this is currently hard coded logic thrown in at the last minute so that blu-ray/hd-dvd playback works correctly..

-Thom

jeangot

  • Guru
  • ****
  • Posts: 233
    • View Profile
Re: How is Mplayer launched?
« Reply #6 on: June 24, 2008, 07:01:18 am »
Thom,
thanks for the clarification. That makes me feel much better because it means that you guys are aware of a problem to playback HD and we can expect some progess there in future versions.

The way I "force" Mplayer currently for certain files is by simply renaming my files into .evo for example. Is that not a legitimate way to do it currently (besides me trying to recompile Xine_Plugin with some changes as to files extensions) ?

Maybe I should ask you about my actual problem of not being able to seek in files greater than ? Gb. Do you build Mplayer with the option --enable-largefiles currently?

Jean

darrenmason

  • Addicted
  • *
  • Posts: 529
    • View Profile
Re: How is Mplayer launched?
« Reply #7 on: June 25, 2008, 02:11:05 am »
and again, you can't..because the mplayer engine is hard-coded to be launched from  Xine_Plugin (as a redirect of sorts) when certain media types are found...this is currently hard coded logic thrown in at the last minute so that blu-ray/hd-dvd playback works correctly..

-Thom

Wow, what a mess... Out of interest is someone working on this, perhaps the person that put it in.
There comment implies they recognise it as a hack...
Code: [Select]
    // hack: redirect MOV, EVO, M2TS files to MPlayer_Player
    // TODO rework Media Dispatcher to make it more clear - later

I really get put off when I look at the Xine code - it just scares me a bit too much.

jeangot

  • Guru
  • ****
  • Posts: 233
    • View Profile
Re: How is Mplayer launched?
« Reply #8 on: June 26, 2008, 04:37:30 am »
Hello,

here are my findings in case anyone would like to pinch in:
- I was trying to playback large HD files that are unwatchable with Xine
- I forced them through Mplayer by renaming them .evo or .m2ts (either or seems to make no difference)
- The file was playing fine, but I noticed that I was unable to fast forward or pause (which is a problem since I rarely get to watch a movie without some sort of interruption)
- When I was pressing fast forward, Mplayer was exiting (others noticed this as well in other threads)
- I replaced the mplayer binary in /opt/pluto-mplayer/bin version dev-SVN-r20630-4.1.3 from 0710 stock by a more recent binary from the lmce svn
- Now I can fast forward up to x2, but no faster (status bar displays other speeds such as x8 x32 etc, but movie does not move faster than x2), and pausing still does not work (although the system does recognize the command since I can hear a blip in the sound every time I press pause)
- Pausing and fast forwarding both work when using either the old or new binary from the KDE desktop, even if I launch it with the same command line than lmce uses in Mplayer_Player

I conclude that the problem must be somewhere in the way the wrapper that launches Mplayer communicates with the player, and unfortunately that exceeds my current abilities. I can see some commands in DCERuter.log and in Mplayer_Player.log but nothing that gives me a clue.

If anyone has a suggestion, it's welcomed. In the meantime I could at least watch those files (which I don't do that often) from the KDE desktop, once I get the sound working there.

Thank you!

Jean