Re: [Freevo-users] multiple audio outputs using mplayer? (HDMI + SPDIF)

2010-06-17 Thread Stephen Rowles
On 16/06/2010 22:55, John Molohan wrote:
 Hi Stephen,

 Glad to hear you got it all running in the end. Can you return the 
 favour and help the community by posting this up to the wiki?

 Thanks,

 John


Very good point! I always forget the wiki :(

There is now an extra section in the TipsAndTricks section to deal 
with audio output to 2 devices:

http://doc.freevo.org/TipsAndTricks#head-4ca196866b6ae120b2c0ce473c0e5c181ae88ca2



--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
___
Freevo-users mailing list
Freevo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freevo-users


Re: [Freevo-users] Freevo shuts down immediately after coming up

2010-06-17 Thread James Trietsch
Eureka! The hat goes on the head! (Sorry, couldn't resist a quote from Futurama)

I fixed the sporadic immediate shutdown issue. I had the good fortune of 
watching it crash right in front of me after finishing a recording. I checked a 
few things and found the filesystem was nearing capacity (again, the clean-out 
daemon runs under the GUI), so I deleted a few things and tried the GUI and it 
came up! A-ha!

Long story short, every time the remaining free space fell under the deletion 
minimums, the GUI stopped working. I enlisted a host of print statements to 
narrow down where it was crashing and on what particular program entry. It was 
giving up trying to find the last-accessed time for a particular MPEG file.

I went to check the file and found out I had an orphaned FXD! The FXD existed 
and was being put into the menu but the MPEG had somehow been removed. It was 
trying to find the last-accessed time for a nonexistent file. Why it was 
silently crashing, I'm not sure (unless it has to do with that process running 
as a daemon). I deleted the orphan FXD and everything is back to normal. It 
even cleaned up the directory back above space minimums.

By the way, the check on last modified time is something I added myself (and 
haven't submitted yet) because I had run into trouble where if the Freevo was 
recording and ran out of space while you were watching a previously recorded 
show that happened to be the best candidate for deletion... it would delete it 
while you were watching. Or it would delete it right after you finished 
watching it, so you never got a chance to mark it to keep if you wanted to keep 
it. I put in some code that anything accessed in the last 5 minutes would not 
be put on the candidate list and it seems to work. But now I may need to add 
some error-trapping to it. Or something to look for orphaned FXDs and/or MPEGs 
couldn't hurt either.


Thanks for all your support my friends, even though this turned out to be 
esoteric and weird. I figured it had to be, just by the way it was behaving.

James


- Original Message 
 From: John Molohan john.molo...@gcd.ie
 To: freevo-users@lists.sourceforge.net
 Cc: James Trietsch kero...@yahoo.com
 Sent: Mon, June 14, 2010 1:56:32 PM
 Subject: Re: [Freevo-users] Freevo shuts down immediately after coming up
 
Hi James,

Can you try the latest 
 version of svn and see if this still exists?

John


  

--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
___
Freevo-users mailing list
Freevo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freevo-users


Re: [Freevo-users] SATA harddrive swap ?

2010-06-17 Thread Redzinalds Knipsis
As idea - I use udev scripts to mount/unmount usb devices, may be this
approach works with SATA as well.

Reggie
--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo___
Freevo-users mailing list
Freevo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freevo-users


Re: [Freevo-users] Freevo shuts down immediately after coming up

2010-06-17 Thread Adam Charrett
On Wed, June 16, 2010 7:39 pm, James Trietsch wrote:
 Eureka! The hat goes on the head! (Sorry, couldn't resist a quote from
 Futurama)

 I fixed the sporadic immediate shutdown issue. I had the good fortune of
 watching it crash right in front of me after finishing a recording. I
 checked a few things and found the filesystem was nearing capacity (again,
 the clean-out daemon runs under the GUI), so I deleted a few things and
 tried the GUI and it came up! A-ha!

 Long story short, every time the remaining free space fell under the
 deletion minimums, the GUI stopped working. I enlisted a host of print
 statements to narrow down where it was crashing and on what particular
 program entry. It was giving up trying to find the last-accessed time for
 a particular MPEG file.

 I went to check the file and found out I had an orphaned FXD! The FXD
 existed and was being put into the menu but the MPEG had somehow been
 removed. It was trying to find the last-accessed time for a nonexistent
 file. Why it was silently crashing, I'm not sure (unless it has to do with
 that process running as a daemon). I deleted the orphan FXD and everything
 is back to normal. It even cleaned up the directory back above space
 minimums.

 By the way, the check on last modified time is something I added myself
 (and haven't submitted yet) because I had run into trouble where if the
 Freevo was recording and ran out of space while you were watching a
 previously recorded show that happened to be the best candidate for
 deletion... it would delete it while you were watching. Or it would delete
 it right after you finished watching it, so you never got a chance to mark
 it to keep if you wanted to keep it. I put in some code that anything
 accessed in the last 5 minutes would not be put on the candidate list and
 it seems to work. But now I may need to add some error-trapping to it. Or
 something to look for orphaned FXDs and/or MPEGs couldn't hurt either.


Interesting, an edge case I hadn't considered. I'm in the process of
rewriting the Recording Manager as a UPnP Server and a client Plugin.
This is to fix the problem of the GUI having to be active to clean up the
disk if it gets full.

At the moment I have a separate backend server running 24x7 and a frontend
that is only on when needed, so I need a separate app running on the
server to clean up the disk. Making it UPnP means it can export the
recordings to XBMC/Myth/Or anything else that understands UPnP Content
Directory Servers and means I don't have to mount the disk over NFS.

I may steal your idea and add it to the server process to catch this edge
case :-)

Cheers

Adam


--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
___
Freevo-users mailing list
Freevo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freevo-users


Re: [Freevo-users] SATA harddrive swap ?

2010-06-17 Thread Toan
Could you share your scripts with me? :)

Thanks
Toan

2010/6/17 Redzinalds Knipsis reggie12...@googlemail.com:
 As idea - I use udev scripts to mount/unmount usb devices, may be this
 approach works with SATA as well.

 Reggie

 --
 ThinkGeek and WIRED's GeekDad team up for the Ultimate
 GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
 lucky parental unit.  See the prize list and enter to win:
 http://p.sf.net/sfu/thinkgeek-promo
 ___
 Freevo-users mailing list
 Freevo-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/freevo-users



--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
___
Freevo-users mailing list
Freevo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freevo-users


Re: [Freevo-users] SATA harddrive swap ?

2010-06-17 Thread Redzinalds Knipsis
Sure :)
I have gentoo. Scripts are for USB, though when I tested them with udevadm
trigger, it mounted hdd partitions as well, because of non effective match
part.

1. In /lib/udev 2 scripts:
script usb_mount
#!/bin/sh
[ $ACTION = add -a $DEVTYPE = partition ] || exit 0
#did not work for me
#[ x$ACTION = xadd -a x$DEVTYPE = xpartition -a x$ID_BUS = xusb
] || exit 0
#[ x$ACTION = xadd -a x$DEVTYPE = xpartition -a x$SUBSYSTEMS =
xusb ] || exit 0
MNTDIR=/mnt/usb/$(echo $DEVNAME | sed 's,\/dev\/,,')
#for tests
echo $MNTDIR  /root/udev.usb
echo $ID_BUS  /root/udev.usb
echo $DEVNAME  /root/udev.usb
echo $ID_FS_LABEL_ENC  /root/udev.usb
echo ---  /root/udev.usb
chown root:disk $DEVNAME
chmod 0660 $DEVNAME
mkdir $MNTDIR
/bin/mount -t $ID_FS_TYPE  $DEVNAME $MNTDIR -o
noatime,noexec,nosuid,nodev,nodiratime,nosuid,ro,umask=0,dmask=0,fmask=111,uid=65534,gid=65534

script usb_unmount
#!/bin/sh
#[ $ACTION = remove ]  (grep -q ^$DEVNAME /proc/mounts || grep -q
^$DEVNAME /etc/mtab) || exit 0
[ $ACTION = remove ] || exit 0
#device name with 2 // - e.g. //dev/ubb1
MNTDEV=$(echo $DEVNAME | sed 's,\/\/,\/,')
MNTDIR=/mnt/usb/$(echo $DEVNAME | sed 's,\/dev\/,,')
#echo Unmount  /root/udev.usb
#echo $MNTDEV   /root/udev.usb
#echo $MNTDIR   /root/udev.usb
#echo ---   /root/udev.usb
/bin/umount -l $MNTDEV
rmdir $MNTDIR

2. modify /lib/udev/rules.d/60-persistent-storage.rules - I commented out
original line and added extra line
#ENV{DEVTYPE}==partition, ENV{ID_PATH}==?*,
SYMLINK+=disk/by-path/$env{ID_PATH}-part%n
ENV{DEVTYPE}==partition, ENV{ID_PATH}==?*,
SYMLINK+=disk/by-path/$env{ID_PATH}-part%n, RUN+=/lib/udev/usb_mount,
ENV{REMOVE_CMD}=/lib/udev/usb_unmount

3. I added /mnt/usb in Freevo music/movie etc parts.

Lines with comments can be removed. Echos just for tests.
I believe there should be more effective match in ACTION part, but I'm not
really udev guru :) If you find something which works, post it back, it
would be interesting.

Reggie
--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo___
Freevo-users mailing list
Freevo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freevo-users


[Freevo-users] patch to add ASPECT event

2010-06-17 Thread Toan
FYI, this is a patch to freevo-1.x source to add an ASPECT event to cycle
through 4/3, 16/9, 2:35, 0 (original) aspect ratios. It works for
mplayer video player
only.

To assign it to a remote button, define something like this in your lircrc file:

begin
prog   = freevo
button = Aspect
repeat = 0
config = ASPECT
end

Best regards
Toan




Index: freevo/src/video/plugins/mplayer.py
===
--- freevo/src/video/plugins/mplayer.py (revision 11675)
+++ freevo/src/video/plugins/mplayer.py (working copy)
@@ -76,6 +76,8 @@
 self.plugins= []
 self.paused = False
 self.stored_time_info = None
+   self.aspect = 0
+   self.aspectlist = [0, 1., 1.7778, 2.35]


 def rate(self, item):
@@ -124,6 +126,7 @@
 self.item_info= None
 self.item_length  = -1
 self.item.elapsed = 0
+self.aspect = 0

 if mode == 'file':
 url = item.url[6:]
@@ -525,6 +543,11 @@
 self.show_message(event.arg)
 return True

+if event == VIDEO_ASPECT:
+self.aspect = (self.aspect + 1) % 4
+self.app.write('switch_ratio %s\n' % self.aspectlist[self.aspect])
+return True
+
 # nothing found? Try the eventhandler of the object who called us
 return self.item.eventhandler(event)

Index: freevo/src/event.py
===
--- freevo/src/event.py (revision 11675)
+++ freevo/src/event.py (working copy)
@@ -191,6 +191,7 @@
 VIDEO_TOGGLE_INTERLACE = Event('VIDEO_TOGGLE_INTERLACE')
 VIDEO_NEXT_ANGLE   = Event('VIDEO_NEXT_ANGLE')
 VIDEO_AVSYNC   = Event('VIDEO_AVSYNC')
+VIDEO_ASPECT   = Event('VIDEO_ASPECT')
 STORE_BOOKMARK = Event('STORE_BOOKMARK')
 MENU   = Event('MENU')

@@ -390,6 +391,7 @@
 'SUBTITLE'  : VIDEO_NEXT_SUBTITLE,
 'AVSYNC+'   : Event(VIDEO_AVSYNC, arg=0.100),
 'AVSYNC-'   : Event(VIDEO_AVSYNC, arg=-0.100),
+'ASPECT': VIDEO_ASPECT,
 }

 DVD_EVENTS = {

--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
___
Freevo-users mailing list
Freevo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freevo-users


[Freevo-users] Selectable audio output when playing an item?

2010-06-17 Thread Stephen Rowles
Hi all,

Looks like my duplicate sound solution doesn't work too happily with 
video output :(. Audio is fine by my Video output slows down and gets 
out of sync occasionally before catching up again.

If I output directly to 1 hardware output it is fine.

So as a solution for this issue, until I have a chance to upgrade to a 
recent more supported distro so that I can raise bugs, I would like to 
be able to select how I play items.

Ideally I want TV recorded files just to play via the TV if normally 
selected, but have the option to launch with a different -ao option, say 
from the menu on an item.

This would allow normal playback, but if I want to watch something like 
Glee, which would be better via the AV amp, I can select that rather 
always having both outputs and having choppy video.

I looked around the wiki but didn't find anything, can someone point me 
in the right direction?

Cheers,

Steve.

--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
___
Freevo-users mailing list
Freevo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freevo-users


Re: [Freevo-users] patch to add ASPECT event

2010-06-17 Thread John Molohan
On 17/06/2010 3:05, Toan wrote:
 FYI, this is a patch to freevo-1.x source to add an ASPECT event to cycle
 through 4/3, 16/9, 2:35, 0 (original) aspect ratios. It works for
 mplayer video player
 only.

 To assign it to a remote button, define something like this in your lircrc 
 file:

 begin
  prog   = freevo
  button = Aspect
  repeat = 0
  config = ASPECT
 end

 Best regards
 Toan

Hi Toan,

Thanks for the patch. Can you submit it to the tracker? 
http://sourceforge.net/tracker/?group_id=46652atid=446898

John

--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
___
Freevo-users mailing list
Freevo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freevo-users