[mythtv-users] myth_archive_job.pl and it's Use. (And Side effects of use)

jack snodgrass mrlinuxgroups at gmail.com
Wed Sep 27 22:26:22 UTC 2006

n 9/27/06, Douglas Wagner <douglasw0 at gmail.com> wrote:
> I believe after alot more digging I have most of my questions answered.
> Looks like I need to pass "%FILE%" and "%DIR%" to the script as command line
> options in the job itself, and it looks like there's a mythrename.pl that
> will re-name all of the files to something more inteligable.
> I still don't have an answer to the question of side effects of using
> myth_archive_job.pl (or mythrename.pl) in regards to cutlists and
> commersials...anyone have any experience with this?
> --Douglas Wagner
> On 9/27/06, Douglas Wagner <douglasw0 at gmail.com> wrote:
> > All:
> >
> >      Ok, i've done some research and looked through the Wiki and mailing
> list and understand WHAT myth_archive_job.pl does (exactly what I need it
> seems, at least to begin with) but what I can't seem to find is a usage for
> HOW to use it.
> >
> > I know I can run it from the command line to move videos to another
> directory but as it is supposed to be a "job" i'm trying to figure out how
> to set this up as a user job to get it to move files around automatically.
> >
> > Ok, so here's the issue:  I have 3 recording drives mounted on a NAS box.
> The main drive is ~50g and then below that I have a 250g and 320g.  The
> structure is /video, /video/video1 and /video/video2 (all NFS Mounted).
> >
> > So I understand that when a show records it will record into /video (my
> default video location).  I  understand that I can then go in and run
> myth_archive_job.pl from the command line to move the recording to video1 or
> video2 (depending on the paths I set on the command line.)
> >
> > I want to take this a step farther.  I want to develop in essence 2 user
> jobs: move_to_video1 and move_to_video2.  Then when any show is set to
> record I should be able to select the video1 or video2 jobs and after the
> recordign is complete have the user job run to move the show automatically.
> I'm 99.5% sure this is possible.  The question is how?
> >
> > I'm assuming I have to create a shell script something like the following:
> >
> > move_to_video1.sh
> > ------------------------------
> > #!/bin/sh
> >
> > perl /usr/share/doc/mythtv- 0.20/contrib/myth_archive_job.pl --directory
> %DIR% --file %FILE% --archivedir /video/video1
> > ------------------------------
> >
> > Do I then go into mythtv-setup and create a custom job with description
> "Move to Video1" with /usr/local/bin/move_to_video1.sh as
> the execution to get it to work?  Does the %DIR% and %FILE% pass along or do
> those have to be passed on the command line (thus $1 and $2) to the shell
> script?  If they need to be passed would the job command line just be:
> /usr/local/bin/move_to_video1.sh %DIR% %FILE%?
> >
> > Do I really need 2 scripts or could I pass argument 1 as the directory to
> move to and then setup the --archivedir to take the first parameter to the
> script (/video/$1)?  Is there a better way to do this?
> >
> > Next: Assuming I get the job setup, when I go back in and try to "edit"
> the file (cut mark comercials and such) can I still load the prior
> comercials as cutmarks or is this functionality gone due to the file move?
> Is anything else affected by the file being accessed only through a sim
> link? (I know about deletes and thee delete follows sym link option in
> setup).
> >
> > Lastly, a bit OT from my inital question: Is there a script out there that
> renames files in both the database and on disk to have better names than
> 1301_092720061235470001.mpg? (Periodically I have enough audio/video out of
> sync on some ABC shows that I have to exit myth and watch them through Xine
> (which always works) and it would be nice not to have to play guess the
> filename.)  I assume that I could then run whatever this would happen to be
> prior to running myth_archive_job.pl and the sim links would be created
> correctly...assuming I could pass in some kind of valid identifier to the
> myth_archive_job.pl script since %FILE% would still be set to the numeric
> filename?  Any thoughts on potentially combining both of these two tasks
> into one script?
> >
> > Thanks for any info anyone might want to shoot back on this.
> >
> > --Douglas Wagner
> >
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users

As far as commercials and cut lists go... myth_archive_job.pl
should not affect those. It moves the files in the file sytem and
setups up a symbolic link. Myth does not care about the useage
of a symbolic link.


More information about the mythtv-users mailing list