Dear Wiki user, You have subscribed to a wiki page or wiki category on "Freevo Wiki" for change notification.
The following page has been changed by 134.102.9.120: http://freevo.sourceforge.net/cgi-bin/moin.cgi/TipsAndTricks The comment on the change is: cleanup ------------------------------------------------------------------------------ @@ -6,82 +6,6 @@ See also in the new wiki: http://freevo.sourceforge.net/cgi-bin/doc/TipsAndTricks -== Get Mouse support == -(by O. Rubio , [EMAIL PROTECTED]) -This trick adds a simple "mouse support" to the Freevo Interface. I'm using actually a 1.5rc2 version. I know this is not an elegant version, i'm working in this. I prefer next version of freevo add this funcionality. - -I'm finishing the Window and PopupBoxes classes, to get working the mouse events. - -1.- Modidy the "listing_area.py" file -{{{ -#nl. 340 aprox. -.... - if val.rectangle: - - r = self.get_item_rectangle(val.rectangle, width, val.font.h)[2] - - - - self.drawroundbox(x0 + hskip + r.x + x_icon - BOX_UNDER_ICON * x_icon, - y0 + vskip + r.y, - r.width - icon_x + BOX_UNDER_ICON * icon_x, - r.height, r) - - - #introducci�n del objeto rectangle..... - #(we need to initialize this variable before) - if r != None: - choice.rectangle = (x0 + hskip + r.x + x_icon - BOX_UNDER_ICON * x_icon,y0 + vskip + r.y, - r.width - icon_x + BOX_UNDER_ICON * icon_x,r.height) -.... -}}} - -2.- First to generate the mouse event, edit the "osd.py" file. this is necessary for store the mouse position and detection. -{{{ - while 1: - event = pygame.event.poll() - if event.type == 6: - self.mouse = (1,event.pos) - return 1 - else: - self.mouse = (0,()) - -}}} - -3.- To get the event and make the action for the item, edit the "menu.py" file -{{{ -#nl. 337 aprox. -for i in self.all_items: - #the item has been "marked" for the mouse events - if hasattr(i,'rectangle'): - i.rect=Rect(i.rectangle) - - #has been detected? - if osd.mouse[0] == 1: - if i.rect.collidepoint(osd.mouse[1][0],osd.mouse[1][1]): - print '----------> DETECCION de MOUSE en ',i.name,' <-------------' - - action = None - arg = None - try: - action = i.action - except AttributeError: - action = i.actions() - if action: - action = action[0] - if isinstance(action, MenuItem): - action = action.function - arg = action.arg - else: - action = action[0] - if not action: - print 'No action.. ' - AlertBox(text=_('No action defined for this choice!')).show() - else: - action( arg=arg, menuw=self ) - return - -}}} == Get Daily Cartoons on your Freevo == (By Tom Van den Bon) @@ -111,83 +35,6 @@ Dailystrips will put all the cartoons in their own respective directory and you can navigate it via the freevo interface. -== Convert plugin howto files to html == - -use the autogen script to make it html. If you run the freevo webserver,it will showup in the help section afterwards. - -{{{to autogen do: -cd /usr/local/freevo. -/autogen.sh howto - -On Tue, 2003-12-23 at 15:52, Robert XXXXXX wrote: -> Hi, -> -> I'd like to print out Freevo's plugin writting howto. It's available in -> .sgml format - is it available in some other format (html, pdf) ? -> -> Regards, -> -> Robert.}}} - -== Camosun College Freevo Project (good read!) == - -I stumbled across this today, and thought it might be a good resource for some people. - -(I hope this team submits their code back to the project--it looks GREAT!) -(I hope this team submits their code back to the project--it looks GREAT!) - -== make png thumbnails of all your video files == - -Just run the following script with your video files as argument, and see thumbnail captures on your Freevo box ! - -Example : videothumb *.avi - - - -mammique. - -A slightly enhanced version of the above linked script: - -{{{ - #!/usr/local/freevo-1.5.0/runtime/apps/freevo_python - - import sys, os, mmpython, glob - from stat import * - - args = sys.argv[1:len(sys.argv)] - print "What percentage into the clip should the screenshot be taken?" - percent = sys.stdin.readline() - convert = float(percent) / 100.0 - - for file in args: - try: - position = str(mmpython.parse(file).video[0].length * convert) - except: - # else arbitrary consider that file is 1Mbps and grab position at 10% - position = str((os.stat(file)[ST_SIZE]/1024/1024) * convert) - - mplayer_in, mplayer_out, mplayer_err = \ - os.popen3(('mplayer', '-nosound', - '-vo', 'jpeg', - '-frames', '8', - '-ss', position, - '-vop', 'scale=240:-2', file)) - mplayer_out.read() - captures = glob.glob('000000??.jpg') - try: - capture = captures[-1:][0] - os.rename(capture, os.path.splitext(file)[0] + ".jpg") - captures = captures[:-1] - print file - except: print "error creating capture for %s" % file - for capture in captures: - try: os.remove(capture) - except: print "error removing temporary captures for %s" % file -}}} - -There are three enhancements. First, the first line is changed to point at the runtime version of python, so mmpython can be found if you are using the runtime. Second, it prompts you for what percentage into the clip you want your screen capture to be taken. The original script just goes halfway in, which does not always give you the thumbnail you want. Third, it generates JPG's instead of PNG's, which I needed because my copy of mplayer was not compiled with PNG support. Compare both versions of the script and you should be able to come up with something that meets your thumbnail-generating needs. - - == Mounting remote fs's == A relative simple way to automount remote file systems is to use autofs. After install @@ -226,23 +73,3 @@ }}} Notice the hostname xp or storage before the path, it tries to ping the hostname and when succesfull the entry shows up in the menu, if not succesfull it doesn't show up and the filesystem isn't mounted. - - - - - - - - - - - - - - - - - - - - ------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ Freevo-wikilog mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/freevo-wikilog
