Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Users

MythDVD offline Archive or Catalog?

 

 

MythTV users RSS feed   Index | Next | Previous | View Threaded


roman.romaniuk at canada

Jul 31, 2005, 5:44 PM

Post #1 of 9 (7412 views)
Permalink
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 [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


mtdean at thirdcontact

Aug 1, 2005, 12:10 AM

Post #2 of 9 (7218 views)
Permalink
Re: MythDVD offline Archive or Catalog? [In reply to]

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
Attachments: prompt_for_media (0.64 KB)
  prompt (0.29 KB)


mtdean at thirdcontact

Aug 1, 2005, 9:53 AM

Post #3 of 9 (7224 views)
Permalink
Re: MythDVD offline Archive or Catalog? [In reply to]

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
Attachments: prompt_for_media (0.66 KB)


anaerin at gmail

Aug 1, 2005, 10:25 AM

Post #4 of 9 (7230 views)
Permalink
Re: MythDVD offline Archive or Catalog? [In reply to]

On 01/08/05, Michael T. Dean <mtdean [at] thirdcontact> 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 [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


mtdean at thirdcontact

Aug 1, 2005, 11:04 AM

Post #5 of 9 (7217 views)
Permalink
Re: MythDVD offline Archive or Catalog? [In reply to]

Robert Johnston wrote:

>On 01/08/05, Michael T. Dean <mtdean [at] thirdcontact> 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
Attachments: prompt_for_media (0.65 KB)
  prompt (0.29 KB)


anthony.vito at gmail

Aug 24, 2005, 1:17 PM

Post #6 of 9 (7181 views)
Permalink
Re: MythDVD offline Archive or Catalog? [In reply to]

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
anthony.vito [at] gmail
Attachments: playstore.pl (1.09 KB)


craig at 8010

Sep 24, 2005, 9:25 AM

Post #7 of 9 (7102 views)
Permalink
Re: MythDVD offline Archive or Catalog? [In reply to]

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 [at] mythtv
>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 [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


shrkbait at gmail

Nov 25, 2005, 6:49 AM

Post #8 of 9 (6954 views)
Permalink
Re: MythDVD offline Archive or Catalog? [In reply to]

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.

<lirc snip>
# 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

</lirc snip>
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 <craig [at] 8010> 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=fhq /mnt/cd
> > ;;
> > VCD)
> > xine --no-splash --auto-play=fhq --auto-scan vcd
> > ;;
> >esac
> >
> >movemouse
> >
> >
> >
> >------------------------------------------------------------------------
> >
> >_______________________________________________
> >mythtv-users mailing list
> >mythtv-users [at] mythtv
> >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 [at] mythtv
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>
Attachments: movemouse (1.61 KB)
  myth-load.sh (0.31 KB)
  prompt (0.32 KB)
  prompt_for_media (0.82 KB)
  xine (40 B)


lists at murrell

Aug 26, 2008, 6:06 PM

Post #9 of 9 (4031 views)
Permalink
Re: MythDVD offline Archive or Catalog? [In reply to]

Hi All,

With the help of some people on the list, I have been able to locate the
set of scripts that allow for offline archive/catalog (the original
thread is located at
<http://www.gossamer-threads.com/lists/mythtv/users/142921>)

One of the last posts, by a Craig Tinson, indicated that he had been
able to it get it working for CDs and/or DVDs where he has multiple
movie files on them, which is what I also have.

I haven't had much success in duplicating this and was hoping:

1.) If Craig Tinson is still on the list, if he might be able to post
his changes to the script; and/or
2.) If someone else might be able to point me in the right direction
of what the right edits are I should make

I am thinking it might be something that opens up another window and
allows me to choose the right file.

Of course this may all be moot since MythTV already automatically opens
a screen with the video files on it, but I'd like to also be able to
"archive" them in MythVideo as well.

TIA! :-)

-Alan
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users

MythTV users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.