Re: [mythtv-users] MythDVD offline Archive or Catalog?
This thread has recently got a little spotlight here http://www.gossamer-threads.com/lists/mythtv/users/161889 I played around with the scripts and think I have something to add. I think these scripts are must haves for anyone not ripping their DVDs. Excellent scripts. Changes: prompt_for_media: Automatically removed '_'s, which I have in my filenames. Added -xrm "xterm*allowSendEvents: true" to the xterm command so it can support mouse events. Changed font/geometry to better fit my hi-def screen. (If anyone has success getting an even bigger font displayed, please write) prompt: Eject the DVD tray Added some spaces to pretty up the display mousemove: No change, just attaching for convenience xine: Simple scipt to call mousemove after calling xine myth-load.sh: Force irxevent to start up before mythfrontend (amongst a couple of other things too) All but the last script I put in /use/local/bin/. I updated the DVD Play command to force /use/local/bin/xine (make sure all the scripts chmod a+x). To get the remote keypress to work, I needed to switch as many lirc events to use irxevent as possible. # Escape/Exit/Back begin prog = irxevent button = BACK/EXIT config = Key Escape CurrentWindow repeat = 3 end begin prog = irxevent button = CH+ config = Key Up CurrentWindow repeat = 3 end begin prog = irxevent button = CH- config = Key Down CurrentWindow repeat = 3 end begin prog = irxevent button = VOL+ config = Key Right CurrentWindow repeat = 5 end begin prog = irxevent button = VOL- config = Key Left CurrentWindow repeat = 3 end begin prog = irxevent button = UP config = Key Up CurrentWindow repeat = 3 end begin prog = irxevent button = DOWN config = Key Down CurrentWindow repeat = 3 end begin prog = irxevent button = RIGHT config = Key Right CurrentWindow repeat = 5 end begin prog = irxevent button = LEFT config = Key Left CurrentWindow repeat = 3 end begin prog = irxevent button = OK config = Key Return CurrentWindow repeat = 3 end begin prog = irxevent button = 0 config = Key 0 CurrentWindow repeat = 3 end begin prog = irxevent button = 1 config = Key 1 CurrentWindow repeat = 3 end begin prog = irxevent button = 2 config = Key 2 CurrentWindow repeat = 3 end begin prog = irxevent button = 3 config = Key 3 CurrentWindow repeat = 3 end begin prog = irxevent button = 4 config = Key 4 CurrentWindow repeat = 3 end begin prog = irxevent button = 5 config = Key 5 CurrentWindow repeat = 3 end begin prog = irxevent button = 6 config = Key 6 CurrentWindow repeat = 3 end begin prog = irxevent button = 7 config = Key 7 CurrentWindow repeat = 3 end begin prog = irxevent button = 8 config = Key 8 CurrentWindow repeat = 3 end begin prog = irxevent button = 9 config = Key 9 CurrentWindow repeat = 3 end I was getting double events for some of the buttons so I commented out my original mythtv/xine/mplayer configs for the above buttons. I would love to see this functionality included in core myth. Maybe a DVD RIP option to 'Symlink Only', and have a special directory for 'DVD Library' to put it. On 9/24/05, Craig Tinson <[EMAIL PROTECTED]> wrote: Michael T. Dean wrote:> Michael T. Dean wrote:>>> Roman Romaniuk wrote:> I have a fairly large DVD collection, but nowhere near sufficient>>> disk space to be able to host all of it on my backend server. Is >>> there any way to maintain the DVD listing within mythdvd, but have a>>> note pop up requesting that the user insert the appropriate DVD (and>>> possibly noting the DVD's location) into the drive when it is >>> selected for play?>> As of now, there's nothing within Myth to handle it. However, it's>> not too difficult to "fake it"...>>> Forgot--some people use spaces in their filenames. Updated > prompt_for_media properly parses DVD name even when it includes> spaces. I guess that just means you shouldn't write code--even what> seems like simple code--at 3:00 in the morning...>> Mike >>>>#!/bin/bash>>MEDIA_TYPE=$1>FILE_NAME=$2>># Find the name of the disc>case "${MEDIA_TYPE}" in > DVD)>DISC_NAME=`basename "$FILE_NAME" .dvd`>;;> CD)>DISC_NAME=`basename "$FILE_NAME" .cd`>;;> VCD)>DISC_NAME=`basename "$FILE_NAME" .vcd` >;;>esac>># Prompt the user to insert the disc>xterm -bg NavyBlue -fg White +sb -fs 18 -geometry 40x6 \> -e prompt "Please insert ${MEDIA_TYPE}:" "${DISC_NAME}" >># Play the disc>case "${MEDIA_TYPE}" in> DVD)>xine --no-splash --auto-play=fhq --auto-scan dvd>;;> CD)>xine --no-splash --auto-play
Re: [mythtv-users] MythDVD offline Archive or Catalog?
Michael T. Dean wrote: Michael T. Dean wrote: Roman Romaniuk wrote: I have a fairly large DVD collection, but nowhere near sufficient disk space to be able to host all of it on my backend server. Is there any way to maintain the DVD listing within mythdvd, but have a note pop up requesting that the user insert the appropriate DVD (and possibly noting the DVD's location) into the drive when it is selected for play? As of now, there's nothing within Myth to handle it. However, it's not too difficult to "fake it"... Forgot--some people use spaces in their filenames. Updated prompt_for_media properly parses DVD name even when it includes spaces. I guess that just means you shouldn't write code--even what seems like simple code--at 3:00 in the morning... Mike #!/bin/bash MEDIA_TYPE=$1 FILE_NAME=$2 # Find the name of the disc case "${MEDIA_TYPE}" in DVD) DISC_NAME=`basename "$FILE_NAME" .dvd` ;; CD) DISC_NAME=`basename "$FILE_NAME" .cd` ;; VCD) DISC_NAME=`basename "$FILE_NAME" .vcd` ;; esac # Prompt the user to insert the disc xterm -bg NavyBlue -fg White +sb -fs 18 -geometry 40x6 \ -e prompt "Please insert ${MEDIA_TYPE}:" "${DISC_NAME}" # Play the disc case "${MEDIA_TYPE}" in DVD) xine --no-splash --auto-play=fhq --auto-scan dvd ;; CD) xine --no-splash --auto-play=fhq /mnt/cd ;; VCD) xine --no-splash --auto-play=fhq --auto-scan vcd ;; esac movemouse ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users When I first started playing with MythTV (about 2 years ago! wow - doesn't seem that long!) this kind of facility was my very first "feature request" to the mailing list - a couple of people liked the idea but I don't have the skills to program this into MythTV. Well, this is the first mention of it I've noticed since then so thought I'd give it a go. *damn* it works well! and the wife thinks it's amazing. I've modified the script a little to allow me to index all the stuff I have. I have DVD's where I've put 5-6 .avi's,mpg's,mov's etc on one disk - it's not elegant by any means but it works. It took *ages* to add them all and get all the related imdb stuff but it's *well* worth it. The wife can now look through every film we have on vcd,dvd and compilation disks and select which one she feels like watching. Am even going to modify the script further to allow me to add all the svhs tapes we have. Currently have over 600 films in there and not a single mb of spaced used - *nice* When I have the vhs in there too that'll take it to over 2000 which will be damn impressive. I've organised all the films into Genres so it's easy to find what you want. So - my advice is this - if you want to improve the WAF *significantly* then give this a try. Next thing is to get it to a point where can do the "press any key to continue" to be do-able by remote. And last but not least - thanks *huge* Monsieur Michael Dean for coming up with this idea. Cheers Craig ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: [mythtv-users] MythDVD offline Archive or Catalog?
There was talk about this very nice feature last year in this thread. http://www.gossamer-threads.com/lists/mythtv/users/73859 . but I haven't seen any patch or follow ups. I like the scripts you have put together. I myself put together a script to deal with playing MythVideo files as well. I have a few problems with the way MythVideo works. 1.) I use a sub directory for each movie. 2.) Some movies span more then one file. I used the file extension ".store" and created a script called "playstore.pl" to give me additional control over playing files in mythvideo. I set up MythVideo to only assoicate .store files with playable movies, and used the playstore.pl script as the default "player". I have a .store file for each movie. My .store files hold additional information about the files, and the script can act on that information. For example, here is a sample .store file for example movie "A Cool Movie" name=A_Cool_Movie path=/var/media/movies/A_Cool_Movie aspect=1.7 The playstore.pl script (attached) will play the video files in the 'path' folder in lexigraphical order. So I make sure I name the parts like "A_Cool_Movie.1.avi" and "A_Cool_Movie.2.avi" one little hack I added was to throw in the aspect ratio, if needed. When I was writing all this I was thinking of that original post. Hoping that I could number each backup DVD with 5 movies on it, and the script would prompt for inserting the correct disc. I will now combine our two scripts and ideas. Since .store files have path names, you can imagine specifing a path on a media device. You can also imagine specificing a disc # in the .store file. The script could then prompt for the disc #, and correctly identify the disc when inserted by contents. I should probably just sit down with the C++ code and fix MythVideo to do all this natively. peace -- Anthony Vito [EMAIL PROTECTED] playstore.pl Description: Perl program ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: [mythtv-users] MythDVD offline Archive or Catalog?
Robert Johnston wrote: On 01/08/05, Michael T. Dean <[EMAIL PROTECTED]> wrote: # Prompt the user to insert the disc xterm -bg NavyBlue -fg White +sb -fs 18 -geometry 40x6 \ -e prompt "Please insert ${MEDIA_TYPE}:" "${DISC_NAME}" Out of interest, where's that "prompt" command coming from? I don't seem to have it in Debian... It's the other script, as described in http://www.gossamer-threads.com/lists/mythtv/users/142951#142951 . Keeping them together, this time, here is the updated (handles spaces) prompt_for_media script and the prompt script again. (Also took the movemouse script call out of prompt_for_media--forgot to take it out of the updated version I posted. It's a script I wrote to "move the mouse" after running external programs to work around a focus issue with myth child windows. See http://www.gossamer-threads.com/lists/mythtv/users/82722#82722 for details.) All instructions for setting up and using these scripts and explanations of how they work are in the original post: http://www.gossamer-threads.com/lists/mythtv/users/142951#142951 Glad to see someone is interested enough to test this out.. :) I hope you find it useful. Mike #!/bin/bash MEDIA_TYPE=$1 FILE_NAME=$2 # Find the name of the disc case "${MEDIA_TYPE}" in DVD) DISC_NAME=`basename "$FILE_NAME" .dvd` ;; CD) DISC_NAME=`basename "$FILE_NAME" .cd` ;; VCD) DISC_NAME=`basename "$FILE_NAME" .vcd` ;; esac # Prompt the user to insert the disc xterm -bg NavyBlue -fg White +sb -fs 18 -geometry 40x6 \ -e prompt "Please insert ${MEDIA_TYPE}:" "${DISC_NAME}" # Play the disc case "${MEDIA_TYPE}" in DVD) xine --no-splash --auto-play=fhq --auto-scan dvd ;; CD) xine --no-splash --auto-play=fhq /mnt/cd ;; VCD) xine --no-splash --auto-play=fhq --auto-scan vcd ;; esac #!/bin/bash MESSAGE=$1 MESSAGE2=$2 echo "${MESSAGE}" echo echo "${MESSAGE2}" ## Uncomment the for loop for a standard 80x24 terminal or use the ## xterm command line to customize the display for 5 or 6 lines #for line in `seq 1 20`; do echo #done read -n 1 -p "Press any key to continue." ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: [mythtv-users] MythDVD offline Archive or Catalog?
On 01/08/05, Michael T. Dean <[EMAIL PROTECTED]> wrote: > # Prompt the user to insert the disc > xterm -bg NavyBlue -fg White +sb -fs 18 -geometry 40x6 \ > -e prompt "Please insert ${MEDIA_TYPE}:" "${DISC_NAME}" Out of interest, where's that "prompt" command coming from? I don't seem to have it in Debian... -- Robert "Anaerin" Johnston ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: [mythtv-users] MythDVD offline Archive or Catalog?
Michael T. Dean wrote: Roman Romaniuk wrote: I have a fairly large DVD collection, but nowhere near sufficient disk space to be able to host all of it on my backend server. Is there any way to maintain the DVD listing within mythdvd, but have a note pop up requesting that the user insert the appropriate DVD (and possibly noting the DVD's location) into the drive when it is selected for play? As of now, there's nothing within Myth to handle it. However, it's not too difficult to "fake it"... Forgot--some people use spaces in their filenames. Updated prompt_for_media properly parses DVD name even when it includes spaces. I guess that just means you shouldn't write code--even what seems like simple code--at 3:00 in the morning... Mike #!/bin/bash MEDIA_TYPE=$1 FILE_NAME=$2 # Find the name of the disc case "${MEDIA_TYPE}" in DVD) DISC_NAME=`basename "$FILE_NAME" .dvd` ;; CD) DISC_NAME=`basename "$FILE_NAME" .cd` ;; VCD) DISC_NAME=`basename "$FILE_NAME" .vcd` ;; esac # Prompt the user to insert the disc xterm -bg NavyBlue -fg White +sb -fs 18 -geometry 40x6 \ -e prompt "Please insert ${MEDIA_TYPE}:" "${DISC_NAME}" # Play the disc case "${MEDIA_TYPE}" in DVD) xine --no-splash --auto-play=fhq --auto-scan dvd ;; CD) xine --no-splash --auto-play=fhq /mnt/cd ;; VCD) xine --no-splash --auto-play=fhq --auto-scan vcd ;; esac movemouse ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: [mythtv-users] MythDVD offline Archive or Catalog?
Roman Romaniuk wrote: I have a fairly large DVD collection, but nowhere near sufficient disk space to be able to host all of it on my backend server. Is there any way to maintain the DVD listing within mythdvd, but have a note pop up requesting that the user insert the appropriate DVD (and possibly noting the DVD's location) into the drive when it is selected for play? I like this idea, too. It could really make for an impressive looking MythVideo gallery view. Imagine having 1000+ movies listed in there. :) (Although, you'll probably want to make heavy use of categories so you can find things.) As of now, there's nothing within Myth to handle it. However, it's not too difficult to "fake it"... Create an executable script file (whose contents we'll add later--a working example is attached) called something like prompt_for_media (or whatever you like) within a directory that's readable by the mythtv user (i.e. /usr/local/bin). Then, within the MythVideo videos directory structure, create a link to the script but with the DVD's name and some appropriate extension (i.e. ".dvd"--more on that later). For example: ln -s /usr/local/bin/prompt_for_media \ /path/to/videos/Stargate_SG-1_Season_1_Volume_1.dvd (if you don't have SG-1 in your collection, you should ;). Then, in Setup|Media Settings|Videos|File Types, add a file type to MythVideo associating the extension ".dvd" to your shell (i.e. bash) with appropriate command-line arguments. If using the attached files, it would be bash %s DVD %s (Yes, "%s" should be in there twice--just trust me; once to execute the script and a second time to name the DVD.) Also, make sure you *uncheck* the "Use default player" checkbox. Now, all you need to do is write the "prompt_for_media" script. I've included one below that prompts for media using a "poor-man's prompt." I just pop up an xterm window asking for the DVD by name and waiting for a keypress (basically, I have xterm execute the "prompt" command--also attached). As far as the other xterm arguments go, I'm using a background and foreground color that look OK (at least to me--a guy with no artistic talent) with the MythCenter theme, telling it not to display scrollbars, setting a font size that's readable from a distance, and specifying an appropriate window size. If you also tell your window manager to remove decorations (i.e. title bar and borders) from xterm windows, it looks like a pretty respectable prompt message (although my WM's placement policy gives a weird effect--keeps stairstepping it down and right about 10 pixels...). BTW, I recommend sticking with xterm (instead of something like gnome-terminal) because it's pretty lightweight. In theory, you could get the xterm to respond to remote button presses using irxevent, but I haven't played with this. Ideally, you would create a custom LIRC client that listens for any remote keypress and use it instead of the xterm. This would also give you the benefit of having access to all the GUI prettiness you're willing to create--even to the point of using data from the MythTV database to find the DVD data--title, producer, year, description, movie poster, etc.--and displaying it. If I really get into this idea and create something like that, I'll post a followup (but don't hold your breath ;). The scripts are relatively generic. You could set up similar links for backup CD's using an extension of ".cd" and a file-association command of "bash %s CD %s" (where the attached script assumes a backup CD is an ISO9660 CD with a single file--the video file--on it). If you use real VCD's, instead, use an extension of ".vcd" and a file-association command of "bash %s VCD %s". Note that once you add the ".dvd" (or ".cd" or ".vcd") links to the MythVideo database, you can do IMDB lookups and everything. If you accidentally select a DVD/CD/VCD or decide you don't want to walk over and insert the disc, it won't hurt anything. When you "Press any key to continue," xine will start up, but it will error out when it fails to find a disc in the drive, so it will exit. Note that if you put the "wrong" disc in the drive, xine will just play it, anyway (assuming it's the same disc type as requested)--nothing is checking to verify it's the requested disc. If you put in the wrong type of disc, xine will error out and exit. Well, I've got to go put 5 volumes per season times 7 seasons of Stargate SG-1 in my database... I think it's even worth scanning the cover art from the DVD's since they won't be in IMDB for SG-1. HTH. Mike #!/bin/bash MEDIA_TYPE=$1 FILE_NAME=$2 # Find the name of the disc case "${MEDIA_TYPE}" in DVD) DISC_NAME=`basename $FILE_NAME .dvd` ;; CD) DISC_NAME=`basename $FILE_NAME .cd` ;; VCD) DISC_NAME=`basename $FILE_NAME .vcd` ;; esac # Prompt the user to insert the disc xterm -bg NavyBlue -fg White +sb -fs 18 -geometry 40x6 \
[mythtv-users] MythDVD offline Archive or Catalog?
I have a fairly large DVD collection, but nowhere near sufficient disk space to be able to host all of it on my backend server. Is there any way to maintain the DVD listing within mythdvd, but have a note pop up requesting that the user insert the appropriate DVD (and possibly noting the DVD's location) into the drive when it is selected for play? Thanks, Roman ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users