SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#26 2012-06-08 23:48:43

gutterslob
#! Resident Bum
Registered: 2009-11-03
Posts: 3,207

Re: Mplayer for beginners

el_koraco wrote:

So does anybody know of a good stream for Euro 2012 and mplayer?

Baconator should have a few channels. They're probably all in Chinese/Mandarin commentary, though.


Point & Squirt

Offline

Be excellent to each other!

#27 2012-06-09 00:14:09

arclance
#! Die Hard
Registered: 2012-03-29
Posts: 987

Re: Mplayer for beginners

gutterslob wrote:
arclance wrote:

If your computer can handle it I would recommend these -vo settings.

 -vo gl:yuv=3:swapinterval=1:lscale=1:cscale=1

For me the quality is better than -vo xv.
I set some optional settings to increase video quality so it probably uses more power.
The output is vsynced if your OpenGL drivers support vsync.

I second this. Only problem with openGL rendering is that it can't decode Hi10p video yet.... in my experience, at least. sad

That line works just fine for Hi10p for me using mplayer2, which has better 10bit support than mplayer.
vdpau is different than OpenGL, it will not work because it is a hardware decoder which is hardwired into nvidia gpus.

gutterslob wrote:
arclance wrote:

There is also a fork of SMPlayer called SMPlayer2 that has some improvements for use with mplayer2.

SMplayer has been a very decent player the few times I've used it. Only problem is that it (used to) lack options for certain subtitle types and (more importantly) required QT. Fine if you run KDE or RazorQT (or Crunchbang, since it includes VLC which brings in QT anyway), but I can't really justify installing a new theme engine on my setups just for one application. It would be my go-to GUI frontend if I was recommending Mplayer to a newbie, for sure. Sh*ts all over the Gnome-Mplayer frontend.

mplayer2 has options for those subtitle types (and working ordered chapter support).
The most changed part of SMPlayer2 is the subtitles configuration area, so you can configure all the new subtitle settings in mplayer2.
SMPlayer2 seems to use my GTK theme correctly so I only notice that it's QT when I compile it.
And you will need to compile it there is no debian package for it.

Last edited by arclance (2012-06-09 00:25:32)

Offline

#28 2012-06-09 00:25:22

gutterslob
#! Resident Bum
Registered: 2009-11-03
Posts: 3,207

Re: Mplayer for beginners

arclance wrote:

That line works just fine for Hi10p for me using mplayer2

Guess it's about time I take a serious look at mplayer2, then.
Thanks for the heads up. Btw, I wasn't talking about vdpau hardware decoding. Don't use Nvidia anymore.

Last edited by gutterslob (2012-06-09 00:33:53)


Point & Squirt

Offline

#29 2012-06-09 00:42:55

arclance
#! Die Hard
Registered: 2012-03-29
Posts: 987

Re: Mplayer for beginners

gutterslob wrote:
arclance wrote:

That line works just fine for Hi10p for me using mplayer2

Guess it's about time I take a serious look at mplayer2, then.
Thanks for the heads up.

Be sure to install the version from unstable so you get bugfixes, especially for the libav dependencies.

gutterslob wrote:

I wasn't talking about vdpau or GPU OpenGL rendering. I don't think even Intel GPUs do 10bit yet.

Since 10bit is not something any big companies are using yet it is unlikely there will be hardware decoder support for anytime soon.

There are monitors with a bitdepth greater than 8 for people who need extremely accurate color reproduction.
I guess Intel knows that anyone who has one of those monitors would be using an Nvidia or AMD graphics card so their drivers don't support anything higher than 8bit color.

Offline

#30 2012-06-09 07:27:39

el_koraco
#!/loony/bun
From: inside Ed
Registered: 2011-07-25
Posts: 4,749

Re: Mplayer for beginners

gutterslob wrote:

I second this. Only problem with openGL rendering is that it can't decode Hi10p video yet.... in my experience, at least. sad

It decodes 10p video with almost no CPU load on Sandy Bridge (and fglrx). I can't even use xv with SNA, as the Textured Sync takes precedence over XV Overlay makes the xv output jittery.

Btw, what is it with VAAPI? I came across multiple resources mentioning mplayer-vaapi, but there are no downloads anymore. Is it necessary to build mplayer yourself for that?

Last edited by el_koraco (2012-06-09 07:28:28)

Offline

#31 2012-06-09 07:32:40

Milozzy
#! Die Hard
Registered: 2011-02-22
Posts: 633
Website

Re: Mplayer for beginners

Ivano you really rock!!!
Thanks!!

Offline

#32 2012-06-09 07:47:13

El_Belgicano
#! CrunchBanger
Registered: 2011-05-23
Posts: 147

Re: Mplayer for beginners

arclance wrote:

<snap>
My favorite is that it has a dbus interface for now playing information so you can have a mplayer progress bar in conky.
2f0659192877873.gif

You got my interest here, can we see your conkyrc?

Offline

#33 2012-06-09 08:52:08

Unia
#! Octo-portal-pussy
From: The Netherlands
Registered: 2010-07-17
Posts: 4,634
Website

Re: Mplayer for beginners

el_koraco wrote:

Btw, what is it with VAAPI? I came across multiple resources mentioning mplayer-vaapi, but there are no downloads anymore. Is it necessary to build mplayer yourself for that?

VAAPI allows mplayer to use your graphicscard to decode the video. When I tried to hop back to Debian, it wasn't in the repo's yet but it might have been in unstable. On Arch, there's a separate version. You can also compile mplayer from source with the --enable-vaapi flag. The PKGBUILD with all the needed dependencies for this can be found here:

https://projects.archlinux.org/svntogit … ayer-vaapi

This needs a backend, though. For ATi cards (Catalyst) you'd need xvba-video. I don't know about Intel or nVidia. These backends were in unstable for sure.

At last, when you got everything installed, use these settings to decode video with it:

vo=vaapi:gl va=vaapi

If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

I am a #! forum moderator. Feel free to send me a PM with any question you have!

Offline

#34 2012-06-09 10:17:00

sunfizz98
Carbonated Orange Juice
From: su terminal
Registered: 2011-05-12
Posts: 1,876
Website

Re: Mplayer for beginners

If filepath is too long for you to tab/autocomplete, one could always use ranger to open it with mplayer(2) automatically.

Offline

#35 2012-06-09 14:14:07

kev57
New Member
From: Brisbane, Australia
Registered: 2009-02-16
Posts: 3

Re: Mplayer for beginners

Hi Folks,
Thought this might be of interest concerning long file paths and commands with mplayer.
A little script I made for my 9yr old, uses 2 instances of dmenu to pick genre directory then file and supply them to mplayer.
Not sure this is the right thread but here we go.
now a bit of background, I have a nas with movies,music, etc that I mount read only at /media/smb with a WICD post-connect script.
This gives me /media/smb/FamilyMovies , etc. the FamilyMovies directory has sub-directories where I have movies sorted by genre eg: ./Animation, ./Comedy ,etc.

#! /bin/bash
IFS='
'
# movie directory

gend="/media/smb/FamilyMovies/"

# get the genre
# you can escape the script from this function

get_genre()
{
gen=$((ls -D $gend)|dmenu  -fn your font -nb -nf -sb -sf -p 'Select Genre, Escape to Exit:')
if [ -z "$gen" ];
then exit
else
movd=$gend$gen
fi
}

# get the movie title

get_movie()
{
mov=$((ls $movd)|dmenu -fn your font etc  -p 'Select Movie, Escape to Go Back:')
}

# play the movie

play_movie()
{
movie=$movd"/"$mov
mplayer -mplayer options $movie
}

# script logic- pick the genre, pick the movie, play
# if you change your mind when picking the movie, escape brings you back to the genre list

get_genre
wait
get_movie
while [ -z "$mov" ]; do
   get_genre
   get_movie
done
   play_movie

I bound this to a key combo in kde , so now if she wants to watch her fav movie a couple of key presses and she is away.:D
Hope someone find it of interest, Don't beat me too badly if it is crap,works for us.
cheers
Kev

Offline

#36 2012-06-09 14:17:26

arclance
#! Die Hard
Registered: 2012-03-29
Posts: 987

Re: Mplayer for beginners

@Unia
Nvidia cards use vdpau for hardware accelerated video decoding.  It is enabled in the stable mplayer package.
I works very well unless you want to play 10bit videos.

@El_Belgicano
Here is the script that gets the information from dbus and formats it for display in conky.

#!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
"""
Name: smplayer2_conky.py
Author: arclance
Date_Created:2012-05-03
Date_Updated:2012-06-09
"""

import dbus

class smplayer2_Info:
    
    def __init__(self):
        self._offset = "${voffset -3}"
        self._color0 = "${color}"
        self._color1 = "${color0}"
    #enddef
        
    def getOutput(self):
        bus = dbus.SessionBus()
        try:
            # setup dbus hooks
            remote_player = bus.get_object('org.mpris.MediaPlayer2.SMPlayer2', '/org/mpris/MediaPlayer2')
            iface_player = dbus.Interface(remote_player, 'org.freedesktop.DBus.Properties')
            # get metadata
            self._metadata = iface_player.Get("org.mpris.MediaPlayer2.Player","Metadata")
            ####
            self._length = int(self._metadata["mpris:length"]) # length in seconds
            self._position = iface_player.Get("org.mpris.MediaPlayer2.Player","Position")
            self._positionPercent =(float(self._position)/float(self._length))*100
            self._positionHMS = str(self._position/3600).rjust(2,"0") + ":" + str((self._position%3600)/60).rjust(2,"0") + ":" + str((self._position%3600)%60).rjust(2,"0")
            self._lengthHMS = str(self._length/3600).rjust(2,"0") + ":" + str((self._length%3600)/60).rjust(2,"0") + ":" + str((self._length%3600)%60).rjust(2,"0")
            ####
            self._volume = iface_player.Get("org.mpris.MediaPlayer2.Player","Volume")
            self._status = iface_player.Get("org.mpris.MediaPlayer2.Player","PlaybackStatus")
            self._title = self._metadata["xesam:title"]
            ####
        except Exception, e:
            print str(e)
        #endtry
    #enddef
    
    def formatOutput(self):
        self._conkyOutput = self._color0 + self._positionHMS + self._color1 + " ${execbar echo " + str(self._positionPercent) + "} " + self._color0 + self._lengthHMS
        self._conkyOutput += "\n" + self._offset + self._color0 + self._status + self._color1 + " Volume:" + self._color0 + str(int(self._volume*100)) + "% " + self._color1 + self._title
        return self._conkyOutput
    #enddef
#endlass

test = smplayer2_Info()
test.getOutput()
print test.formatOutput().encode("utf-8")

and the .conkyrc that goes with it.

########
### Position ###
alignment top_right
gap_x 1
gap_y -1
minimum_size 619 1080
maximum_width 619
### End Position ###

### Borders ###
border_inner_margin 0
border_outer_margin 0
border_width 0
#stippled_borders 0
draw_borders no
draw_graph_borders yes
draw_outline no
draw_shades yes
### End Borders ###

### Window ###
own_window yes
own_window_transparent yes
own_window_argb_visual false
own_window_argb_value 0
own_window_class systemConky
own_window_type normal
own_window_title system_Conky
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
### End Window ###

### Color ###
default_color CC9900
default_outline_color 000000
default_shade_color 8B0000
color0 EE7600
color1 8B0000
### End Color ###

### Font ###
use_xft yes
xftfont DejaVu Sans Mono:size=10
xftalpha 1
### End Font ###

### Conky Settings ###
double_buffer
background no
update_interval 1.0
cpu_avg_samples 2
net_avg_samples 2
no_buffers yes
out_to_console no
out_to_stderr no
extra_newline no
uppercase no
use_spacer none
show_graph_scale yes
show_graph_range no
text_buffer_size 5000
default_bar_size 475 9
imlib_cache_size 0
top_name_width 10
if_up_strictness address
max_specials 10000
### End Conky Settings ###

TEXT
${if_running smplayer2}${voffset -3}${execp python path_to/smplayer2_conky.py}${else}${endif}

Last edited by arclance (2012-06-17 16:38:47)

Offline

#37 2012-06-09 17:10:46

el_koraco
#!/loony/bun
From: inside Ed
Registered: 2011-07-25
Posts: 4,749

Re: Mplayer for beginners

Unia wrote:

This needs a backend, though. For ATi cards (Catalyst) you'd need xvba-video. I don't know about Intel or nVidia.

It's i965-va-(intel-vaapi)-driver for Intel and you could make Nvidia use xvba, but vdpau is better. I've seen references to mplayer-vaapi, but all the links point to a dead server. Well, as long as we can build it...

Offline

#38 2012-06-09 21:53:37

ivanovnegro
Ivan #000000
From: unstable madness
Registered: 2011-06-02
Posts: 5,432

Re: Mplayer for beginners

@kev: You are welcome, I said, keep it coming, and we can learn more by others how they use/tweak mplayer. It is already very interesting. smile

Offline

#39 2012-06-09 22:04:30

arclance
#! Die Hard
Registered: 2012-03-29
Posts: 987

Re: Mplayer for beginners

If you have a high resolution monitor and a powerful enough processor (~2.0GHz dual core or higher)
you can use software scaling to use a better resizing method to upscale videos when not watching them at their native resolution.

Here is an example for resizing for a 1080p monitor as it would be added when calling mplayer in a terminal.

Progressive Videos

-sws 10 -vf-add scale=1920:-2:0:0:arnd=1

Interlaced Videos (with deinterlaceing)

-sws 10 -vf-add yadif=1,scale=1920:-2:1:0:arnd=1

Offline

#40 2012-06-10 02:39:23

ivanovnegro
Ivan #000000
From: unstable madness
Registered: 2011-06-02
Posts: 5,432

Re: Mplayer for beginners

Added some of the suggestions to the how-to. No LIRC message, embedded subs.

Offline

#41 2012-06-10 03:42:15

sqlpython
#! Die Hard
From: New England
Registered: 2011-11-28
Posts: 931

Re: Mplayer for beginners

Really Good basic How to..
I say put it in the Wiki !! One of the Basic items wanting there.


OHCG #!, Jessie,, Siduction-13.1Slackware 14Bridge,, Sabayon 13.4,

Offline

#42 2012-06-10 06:49:50

ivanovnegro
Ivan #000000
From: unstable madness
Registered: 2011-06-02
Posts: 5,432

Re: Mplayer for beginners

sqlpython wrote:

I say put it in the Wiki !! One of the Basic items wanting there.

Hopefully Machinebacon will notice it for our multimedia section. big_smile

Offline

#43 2012-07-15 11:59:37

ivanovnegro
Ivan #000000
From: unstable madness
Registered: 2011-06-02
Posts: 5,432

Re: Mplayer for beginners

Added some gimmicks to the Extras section of the how-to.

Offline

#44 2012-07-15 18:50:28

thevdude
#! Junkie
From: Pittsburgh, PA
Registered: 2011-09-01
Posts: 469

Re: Mplayer for beginners

The only thing holding me back from mplayer2 is memorizing hot keys and figuring out playlist stuff. Would love to drop vlc with it's icky QT.

Offline

#45 2012-07-15 19:16:36

arclance
#! Die Hard
Registered: 2012-03-29
Posts: 987

Re: Mplayer for beginners

^ smplayer2 is a good gui for mplayer2, it has been tweaked for better mplayer2 compatibility.
It is QT but if you use the Mpc GUI setting it does not look like it.
It will even respect your GTK theme if you set the style to GTK+ in the Interface section.

Last edited by arclance (2012-07-15 19:18:41)

Offline

#46 2012-07-15 19:45:14

ivanovnegro
Ivan #000000
From: unstable madness
Registered: 2011-06-02
Posts: 5,432

Re: Mplayer for beginners

I already used hot keys on VLC. Some of them are similar too. I mean, I use the keyboard even for browsing the web.

Offline

#47 2012-07-15 20:02:03

arclance
#! Die Hard
Registered: 2012-03-29
Posts: 987

Re: Mplayer for beginners

^ Some people don't like hotkeys or have hand injures/deformities that make them hard to use.
I have a unusual bend in my pinky that makes modifiers other than shift hard to hit when typing.

I use the Fluxbox apps file to run smplayer2 without window decorations and with all but 1 pixel of the gui elements hidden out the top of the screen.
screenshot_2012_07_15_15_50_25_3840x1080_by_arclance-d57gxu5.png

You can turn the position slider on and off by right clicking on the 1 pixel remaining of the gui
The other gui controls can be accessed by right clicking on the video itself.

I could use the Fluxbox keys file and "smplayer2 -send-action" to give smplayer2 global hotkeys if I wanted to.

Offline

#48 2012-07-15 20:11:40

thevdude
#! Junkie
From: Pittsburgh, PA
Registered: 2011-09-01
Posts: 469

Re: Mplayer for beginners

I liked VLC because ctrl+h makes the GUI go away, but don't like having QT installed for just one app. So I dumped it. mplayer ~/videos/Show.s01/* works and < and > switch through videos. That's all I needed.

Offline

#49 2012-07-15 20:24:08

arclance
#! Die Hard
Registered: 2012-03-29
Posts: 987

Re: Mplayer for beginners

^ I stopped using VLC years ago, at least 5 before I started using linux, I just did not like the lack of user configuration (and bugs) at the time.

I don't know if VLC supports it but you can change the smplayer2 hotkeys to whatever you want.
I did not know about it but smplayer2 also has a hotkey to get rid of the gui, it is ctrl+c and it turns on "compact mode".

If you watch dvds a GUI is nice when you have a dvd where someone got "creative" with the episode order since you can get a list of all the titles on the disk with there length.

That way you can tell the commercials and special features apart from the actual episode or movie.

Offline

Be excellent to each other!

#50 2012-07-15 20:55:50

el_koraco
#!/loony/bun
From: inside Ed
Registered: 2011-07-25
Posts: 4,749

Re: Mplayer for beginners

arclance wrote:

I use the Fluxbox apps file to run smplayer2 without window decorations and with all but 1 pixel of the gui elements hidden out the top of the screen.

Why not just regular mplayer, and run the few thing you need a GUI for with the mplayer GUI?
You can make custom Thunar options for file types and stuff. That's what I do, I haven't run a movie from the command line in a year.

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.
Server: acrobat

Debian Logo