LinHES Forums
http://forums.linhes.org/

VDPAU how-to for R6? - WORKING
http://forums.linhes.org/viewtopic.php?f=14&t=20332
Page 1 of 1

Author:  poflynn [ Fri Oct 02, 2009 11:14 pm ]
Post subject:  VDPAU how-to for R6? - WORKING

The wiki seems very out of date. Also I have found some nuggets in the forum but they are either just nuggets or they are out of date.

I installed mythtv-vdpau via pacman and that seemed to go well but am unsure what to do next. I know mplayer is not using VDPAU to play the videos but that's not surprising. I am unsure how to make use of the new /usr/LH/bin/vdpau-detector script I have.

Also, I have a sound card using SPDIF & it worked OOTB with OSS but not ALSA so I am currently using OSS and again unsure how to specify AC3/DTS passthru using OSS.

I guess I can probably figure the sound part out myself but I really don't know how to make use of the above script?

I am happy to update the wiki if/when I can figure this out.

TIA,

Paul

Author:  mark60050 [ Sat Oct 03, 2009 7:58 am ]
Post subject: 

Paul,

I have a few notes here to get you started. I based my install off the following thread in this forum:

http://knoppmyth.net/phpBB2/viewtopic.php?t=19611&highlight=pacman%20-Rd%20mythtv%20mplayer%20nvidia

As I recall, the instructions in the thread did not work exactly. This is what I have down in my notes:

Code:
# Only installed vdpau on the frontend
# pacman -Rd mythtv mplayer nvidia
# pacman -S mythtv-vdpau
# pacman -S mplayer
# reboot


It looks like I removed mplayer and reinstalled. I think it was because mplayer-vdpau-nogui was not available any more. I installed vdpau about a month ago on my frontend-only box. My frontend/backend combo has enough horse power to play HD directly. I understand that there was a problem with transcoding when vdpau was installed on the backend as well.

Hopefully this helps you get started. I also got digital audio over HDMI output working with ALSA. I had to create my own asound.conf file to get it to work.

If you need more help, reply to this thread and I'll dig through my notes.

-Mark

ASUS P5N7A-VM
CORE 2 QUAD Q8400 2.66G (1333Mhz)
KINGSTON 4GB DDR2 800=(2GB x 2)
HITACHI 1tb 0A38016 SATA2 3.0gb/sec 7200rpm
Hauppauge WinTV-PVR 250 - Model 980
HD-5500 for ATSC HD

Author:  poflynn [ Mon Oct 05, 2009 9:53 pm ]
Post subject:  Got it!

Thanks for the reply Mark..

I had to debug the mplayer-resumer-vdpau.pl script. What do I know about debugging perl? Absolutely nothing, but after throwing in some print stmts I figured out $mplayeropts was completely blank. A test of the vdpau-detector script seemed to go fine so I changed it's path/filename from the relative "./vdpau-detector" to the absolute "/usr/LH/bin/vdpau-detector" as below & now it all works!


Code:
# Calls mplayer and returns the last known video position
sub mplayer () {
    my($parameters,$infile)=@_;
    my $seconds=0;
    my $timecode=&get_time_offset($infile);
    my $mplayeropts=`/usr/LH/bin/vdpau-detector $infile`; chomp $mplayeropts;
    my @lines = split "\n", $mplayeropts;
    my $last_line = pop(@lines);
    my $command = "mplayer $last_line $parameters -ss $timecode \"$infile\" 2>&1 2>/dev/null |";

    open(SHELL, $command);



I went from mplayer using 98%-99% of the CPU and throwing a bunch of nasty warnings about my system being too slow to now (oddly consistent) using a grand total of 9.8%!! (Well, maybe not so odd, I guess the only work it is doing is feeding & reading data from the VDPAU API). Mad, I love it. And this ons a mouldy P4 2.66GHz using a PCI 8400GS card that cost $60, sweet!



I updated the wiki. It's actually simple in R6 once you figure out the few small steps required, nice. I also included my modification as a 'tip' in the wiki.

So am I the only person hitting this issue? Surely not, but I don't like to log flysprays unless I am 100% certain of the issue... As I am using a diskless frontend I thought maybe this somehow is causing the issue, can't imagine how tho...

Author:  goofee [ Tue Oct 06, 2009 9:07 am ]
Post subject: 

There is also a package to use VDPAU with xine.
Code:
sudo pacman -Sy xine-lib-vdpau-svn

Author:  kehaar23 [ Sun Oct 18, 2009 10:01 am ]
Post subject: 

I had to change the last line of vdpau-detector to the following for it to work for me.

$MPLAYER $MPLAYEROPTS "$FILE"


I also adjusted the settings to suit my needs but it should work with just adding the above and then you can make whatever changes that you need to best suit your system.

Author:  Too Many Secrets [ Tue Jun 01, 2010 10:32 pm ]
Post subject:  Re: Got it!

poflynn wrote:
Thanks for the reply Mark..

I had to debug the mplayer-resumer-vdpau.pl script. What do I know about debugging perl? Absolutely nothing, but after throwing in some print stmts I figured out $mplayeropts was completely blank. A test of the vdpau-detector script seemed to go fine so I changed it's path/filename from the relative "./vdpau-detector" to the absolute "/usr/LH/bin/vdpau-detector" as below & now it all works!


Code:
# Calls mplayer and returns the last known video position
sub mplayer () {
    my($parameters,$infile)=@_;
    my $seconds=0;
    my $timecode=&get_time_offset($infile);
    my $mplayeropts=`/usr/LH/bin/vdpau-detector $infile`; chomp $mplayeropts;
    my @lines = split "\n", $mplayeropts;
    my $last_line = pop(@lines);
    my $command = "mplayer $last_line $parameters -ss $timecode "$infile" 2>&1 2>/dev/null |";

    open(SHELL, $command);



I went from mplayer using 98%-99% of the CPU and throwing a bunch of nasty warnings about my system being too slow to now (oddly consistent) using a grand total of 9.8%!! (Well, maybe not so odd, I guess the only work it is doing is feeding & reading data from the VDPAU API). Mad, I love it. And this ons a mouldy P4 2.66GHz using a PCI 8400GS card that cost $60, sweet!



I updated the wiki. It's actually simple in R6 once you figure out the few small steps required, nice. I also included my modification as a 'tip' in the wiki.

So am I the only person hitting this issue? Surely not, but I don't like to log flysprays unless I am 100% certain of the issue... As I am using a diskless frontend I thought maybe this somehow is causing the issue, can't imagine how tho...


Thanks for this. In R6.02 I still had to make a direct path to the file. /usr/LH/bin/vdpau-detector

Author:  ChapmanI [ Fri Jun 11, 2010 8:51 pm ]
Post subject: 

Doesn't the current mplayer-wrapper.pl script test to see if the machine is vdpau capable, and automatically use it?

That would imply that mplayer-resumer-vdpau.pl is deprecated (old, out of date).

I sure looks that way to my reading of it. Or is that one of the updates that came along with 6.03?

Author:  Too Many Secrets [ Fri Jun 11, 2010 9:28 pm ]
Post subject: 

ChapmanI wrote:
Doesn't the current mplayer-wrapper.pl script test to see if the machine is vdpau capable, and automatically use it?

That would imply that mplayer-resumer-vdpau.pl is deprecated (old, out of date).

I sure looks that way to my reading of it. Or is that one of the updates that came along with 6.03?


My install used mplayer-wrapper.pl by default for many of my videos. I found it to cause a 12-15 second delay in serving the video, where I only see a 1-3 second delay using mplayer-resumer-vdpau.pl. I'm much happier with the shorter delay, ymmv.

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/