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

Mailing List Archive: MythTV: Users

FW: Looking for sample video grabber scripts

 

 

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


ajp at cantabrian

Aug 29, 2012, 12:48 PM

Post #1 of 11 (644 views)
Permalink
FW: Looking for sample video grabber scripts

Yes please, any help is appreciated

-----Original Message-----
From: mythtv-users-bounces [at] mythtv
[mailto:mythtv-users-bounces [at] mythtv] On Behalf Of Michael T. Dean
Sent: Thursday, 30 August 2012 2:43 a.m.
To: Discussion about MythTV
Subject: Re: [mythtv-users] Looking for sample video grabber scripts

On 08/29/2012 06:55 AM, ajp wrote:
> I am trying to find sample video grabber scripts ideally in perl and
> ideally bare-bones scripts. They need to work with 0.25 though.
>

You mean video metadata grabber?

Mike

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


raymond at wagnerrp

Aug 29, 2012, 1:10 PM

Post #2 of 11 (627 views)
Permalink
Re: FW: Looking for sample video grabber scripts [In reply to]

On 8/29/2012 15:48, ajp [at] cantabrian wrote:
> On 8/29/2012 10:42, Michael T. Dean wrote:
>> On 08/29/2012 06:55 AM, ajp wrote:
>>> I am trying to find sample video grabber scripts ideally in perl and
>>> ideally bare-bones scripts. They need to work with 0.25 though.
>>
>> You mean video metadata grabber?
>
> Yes please, any help is appreciated

There's not really anything a "sample" script is really going to tell
you. Each grabber needs to be tailored to the specific website it is
retrieving data from. They all need to return results in the format
documented on this page.

http://www.mythtv.org/wiki/MythTV_Universal_Metadata_Format

The only examples to view are going to be the three currently in the
source tree, and installed to MythTV's share directory. Those are on for
the TheTVDB.com API, and two different versions of the TheMovieDb.org
API. Could you be more descriptive about what you are trying to
accomplish? If we had a better idea what you were doing, we would likely
be able to better guide you to the information you need.
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


ajp at cantabrian

Aug 29, 2012, 2:34 PM

Post #3 of 11 (622 views)
Permalink
Re: FW: Looking for sample video grabber scripts [In reply to]

Hi,

I export movies and the like from MythTV and then use StreamClip to slice
and dice it so I end up with just the Movie or TV episode without adds. From
that I run a script that converts them into a .mp4 file with all the
metadata correct. This MP4 will then import into iTunes and populate series,
episode, title and artwork correctly. That way I can take a movie from
MythTV and watch it on my iPhone on the bus without annoying adds.

What I want to do is put these in my "Videos" storage group and all the
metadata that is correctly embedded in the file to be imported into MythTV
Videos. Unfortunately this doesn't happen as the importer doesn't understand
the metadata in an MP4.

Another option is to import the files back into MythTV but that makes it
harder to manage and then there is the problem that MythTV only has two
levels in its browsing mode which makes it a very flat structure.

So what I am looking at is how to have an automated mechanism so that when I
put in my correctly setup MP4 files they end up populating MythTV Videos
correctly. I am hoping I can achieve this with a Metadata grabber.

Does that help.

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


mtdean at thirdcontact

Aug 29, 2012, 3:53 PM

Post #4 of 11 (622 views)
Permalink
Re: FW: Looking for sample video grabber scripts [In reply to]

On 08/29/2012 05:34 PM, ajp wrote:
> and then there is the problem that MythTV only has two
> levels in its browsing mode which makes it a very flat structure.

You have Video Library misconfigured.

http://www.gossamer-threads.com/lists/mythtv/users/519758#519758
http://www.gossamer-threads.com/lists/mythtv/users/506580#506580

Mike
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


raymond at wagnerrp

Aug 29, 2012, 4:54 PM

Post #5 of 11 (618 views)
Permalink
Re: FW: Looking for sample video grabber scripts [In reply to]

On 8/29/2012 17:34, ajp [at] cantabrian wrote:
> What I want to do is put these in my "Videos" storage group and all the
> metadata that is correctly embedded in the file to be imported into MythTV
> Videos. Unfortunately this doesn't happen as the importer doesn't understand
> the metadata in an MP4.

If you name them properly, in a manner the file scanner in the Video
Library can understand, the existing TheMovieDB and TheTVDB grabbers
should work fine. Alternatively, transcode the videos in place, and
then use mythvidexport.py on the wiki to migrate them over to the Video
Library with the necessary metadata.
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


mtdean at thirdcontact

Aug 29, 2012, 5:10 PM

Post #6 of 11 (619 views)
Permalink
Re: FW: Looking for sample video grabber scripts [In reply to]

On 08/29/2012 06:53 PM, Michael T. Dean wrote:
> On 08/29/2012 05:34 PM, ajp wrote:
>> and then there is the problem that MythTV only has two
>> levels in its browsing mode which makes it a very flat structure.
>
> You have Video Library misconfigured.
>
> http://www.gossamer-threads.com/lists/mythtv/users/519758#519758
> http://www.gossamer-threads.com/lists/mythtv/users/506580#506580

So, it was mentioned to me that perhaps you mean MythTV's Watch
Recordings only has 2 levels, which is true. However, moving those
recordings over to Video Library would allow you to use any structure
you like, when configured as above.

Mike
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


raymond at wagnerrp

Aug 29, 2012, 5:32 PM

Post #7 of 11 (619 views)
Permalink
Re: FW: Looking for sample video grabber scripts [In reply to]

On 8/29/2012 17:34, ajp [at] cantabrian wrote:
> So what I am looking at is how to have an automated mechanism so that when I
> put in my correctly setup MP4 files they end up populating MythTV Videos
> correctly. I am hoping I can achieve this with a Metadata grabber.

I think you are misunderstanding this whole process. The metadata
grabber knows nothing about any files, and has no access to the
database. It is given a query, as parsed out of the filename by the
Video Library, and is to return any information it can about the queried
title. It is not intended to have access to the file in order to pull
metadata out of the container.
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


ajp at cantabrian

Aug 29, 2012, 9:19 PM

Post #8 of 11 (618 views)
Permalink
Re: FW: Looking for sample video grabber scripts [In reply to]

Hi,

I know the intention of grabbers is to query some remote web based system to
get metadata, but I feel I am running out of options.

What I want to achieve is not currently in MythTV and not likely to be in it
any time soon. This means I either create a patch and build it myself or I
try some more "creative" approach. I don't have the time to create a custom
build so I am left with the "creative" approach.

When I see discussions like this in forums it usually takes the form of a
user wanting to do something specific and the respondent wanting to fully
understand the problem because the respondent thinks it highly likely the
product already does what the user wants - it's just that the user doesn't
understand the product enough :-)

Thus the more detailed explanation................

1. I export an recorded movie from Myth
2. I open it up in StreamClip and edit out commercials etc.
3. I save as a .ts file. The TS file name now includes series name,
episode title, season, episode etc.
4. I also save a .jpg screenshot that I gather during the editing
process
5. I run a custom script against a bunch of these edited movies.
6. The result of the custom script is:
a. A *.mp4 file with all metadata correct incl. artwork
b. A *.xml file suitable to be imported into Myth
c. A *.png file suitable to be imported into Myth

So at the end of this process I have a file I can use in iTunes/iPhone/iPad.
This file is complete and all metadata including artwork encapsulated in the
one file. I also have an output that can be imported into Myth.

So.....

What I want to do is have this "custom script process" produce artefacts
that can be placed in a Myth Videos directory structure and have "Videos"
populated with all the metadata and artwork.

Currently to do this I would have to create a potentially very long and
messy filename that would work for Myth but look very unwieldy if I use it
for anything else - iTunes won't be bothered what filename is used as it
extracts all details from the embedded metadata. Also this process would
not use the artwork/screenshot I created.

I need a solution that doesn't require building Myth. All I can find is to
manipulate a video metadata grabber script so it looks at the file system
and returns the metadata from an examination of the file system rather than
a remote web server. I admit it's a bit contrived but will give me a
solution that fits my requirements and works within the Myth ecosystem.


Does that help

Cheers

On 8/29/2012 17:34, ajp [at] cantabrian wrote:
> So what I am looking at is how to have an automated mechanism so that
> when I put in my correctly setup MP4 files they end up populating
> MythTV Videos correctly. I am hoping I can achieve this with a Metadata
grabber.

I think you are misunderstanding this whole process. The metadata grabber
knows nothing about any files, and has no access to the database. It is
given a query, as parsed out of the filename by the Video Library, and is to
return any information it can about the queried title. It is not intended to
have access to the file in order to pull metadata out of the container.
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.2197 / Virus Database: 2437/5233 - Release Date: 08/29/12

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


raymond at wagnerrp

Aug 29, 2012, 10:30 PM

Post #9 of 11 (607 views)
Permalink
Re: FW: Looking for sample video grabber scripts [In reply to]

On 8/30/2012 00:19, ajp [at] cantabrian wrote:
> 1. I export an recorded movie from Myth
> 2. I open it up in StreamClip and edit out commercials etc.
> 3. I save as a .ts file. The TS file name now includes series name,
> episode title, season, episode etc.
> 4. I also save a .jpg screenshot that I gather during the editing
> process
> 5. I run a custom script against a bunch of these edited movies.
> 6. The result of the custom script is:
> a. A *.mp4 file with all metadata correct incl. artwork
> b. A *.xml file suitable to be imported into Myth
> c. A *.png file suitable to be imported into Myth
>
> So at the end of this process I have a file I can use in iTunes/iPhone/iPad.
> This file is complete and all metadata including artwork encapsulated in the
> one file. I also have an output that can be imported into Myth.

In 6b, you create some XML file filled with metadata. Format that XML
file in the manner described in that wiki link several responses back,
name it the same thing as the video, but with an '.mxml' extension, and
the scanner should automatically import it when it scans for content.
This mechanism will not currently do anything with the artwork.
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


nick.rout at gmail

Aug 30, 2012, 12:59 AM

Post #10 of 11 (608 views)
Permalink
Re: FW: Looking for sample video grabber scripts [In reply to]

On Thu, Aug 30, 2012 at 4:19 PM, <ajp [at] cantabrian> wrote:
> Hi,
>
> I know the intention of grabbers is to query some remote web based system to
> get metadata, but I feel I am running out of options.
>
> What I want to achieve is not currently in MythTV and not likely to be in it
> any time soon. This means I either create a patch and build it myself or I
> try some more "creative" approach. I don't have the time to create a custom
> build so I am left with the "creative" approach.
>
> When I see discussions like this in forums it usually takes the form of a
> user wanting to do something specific and the respondent wanting to fully
> understand the problem because the respondent thinks it highly likely the
> product already does what the user wants - it's just that the user doesn't
> understand the product enough :-)
>
> Thus the more detailed explanation................
>
> 1. I export an recorded movie from Myth
> 2. I open it up in StreamClip and edit out commercials etc.
> 3. I save as a .ts file. The TS file name now includes series name,
> episode title, season, episode etc.
> 4. I also save a .jpg screenshot that I gather during the editing
> process
> 5. I run a custom script against a bunch of these edited movies.
> 6. The result of the custom script is:
> a. A *.mp4 file with all metadata correct incl. artwork
> b. A *.xml file suitable to be imported into Myth
> c. A *.png file suitable to be imported into Myth
>
> So at the end of this process I have a file I can use in iTunes/iPhone/iPad.
> This file is complete and all metadata including artwork encapsulated in the
> one file. I also have an output that can be imported into Myth.
>
> So.....
>
> What I want to do is have this "custom script process" produce artefacts
> that can be placed in a Myth Videos directory structure and have "Videos"
> populated with all the metadata and artwork.
>
> Currently to do this I would have to create a potentially very long and
> messy filename that would work for Myth but look very unwieldy if I use it
> for anything else - iTunes won't be bothered what filename is used as it
> extracts all details from the embedded metadata. Also this process would
> not use the artwork/screenshot I created.
>
> I need a solution that doesn't require building Myth. All I can find is to
> manipulate a video metadata grabber script so it looks at the file system
> and returns the metadata from an examination of the file system rather than
> a remote web server. I admit it's a bit contrived but will give me a
> solution that fits my requirements and works within the Myth ecosystem.

Hi also from NZ, ChCh here. Are you on the mythtvnz list? Please feel
free to join http://lists.ourshack.com/mailman/listinfo/mythtvnz

I assume the metadata is already in the myth system if it is a
recording. We have reasonable, but not great xmltv data here.

So perhaps what you need to do is alter your workflow:

1. run a transcode job to convert to mp4 and add the metadata that is
already in the database. There are wrapper scripts on the wiki.

2. use the script that is floating around to export your recording to
video. The metadata is maintained afaik.

3. creating a videopodcast at the same time should be reasonably
trivial, or point iTunes at your video storage groups.

Or am I missing something?
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


ajp at cantabrian

Aug 31, 2012, 1:40 AM

Post #11 of 11 (601 views)
Permalink
Re: FW: Looking for sample video grabber scripts [In reply to]

Hi,

This info was absolutely fantastic !

I did read most of that page, but thought it was about the specs of the
metadata files. A note with the "Video Library" pages would have helped but
knowing about the .mxml files is fantastic !

I have spent more time on this and are moving forward but are trying to tidy
and simplify things.

My current question is this. I put a .mxml file alongside my video file down
in a directory tree in my Videos storage group. I can see by the logs in the
DB that it finds the .mxml file but then for some reason it tries to look in
the root of the "default" storage group for a file with the same name. So I
see the following entries in the DB logs:

First
Matching MXML file found. Parsing
myth://Videos [at] 192:6543/TVSeries/Movies/1004_20110924182700.mxml
for metadata...

Then a bit later
FileRingBuf(/storage/mythtv/sata1/default/1004_20110924182700.mxml):
OpenFile(): Could not open.

And again a bit later still
Corrupt or invalid MXML file.
Matching MXML file found. Parsing
myth://Videos [at] 192:6543/TVSeries/Movies/1004_20110924182700.mxml
for metadata...

Followed again a bit later by
FileRingBuf(/storage/mythtv/sata1/default/1004_20110924182700.mxml):
OpenFile(): Could not open.

And later again
FileRingBuf(/storage/mythtv/sata1/default/1004_20110924182700.mxml):
OpenFile(): Could not open.

And again
FileRingBuf(/storage/mythtv/sata1/default/1004_20110924182700.mxml):
OpenFile(): Could not open.

Finally
Corrupt or invalid MXML file.
Returning Metadata Results: 0 0


So........

If I copy the .mxml file to
"/storage/mythtv/sata1/default/1004_20110924182700.mxml" it works, so I am
assuming the format of the .mxml file is correct.

Am I missing something in the .mxml file ?

Thanks again

BTW:

/storage/mythtv/sata1/default = "Default" storage group
/storage/mythtv/sata2/videos = "Videos" storage group



-----Original Message-----
From: mythtv-users-bounces [at] mythtv
[mailto:mythtv-users-bounces [at] mythtv] On Behalf Of Raymond Wagner
Sent: Thursday, 30 August 2012 5:30 p.m.
To: Discussion about MythTV
Subject: Re: [mythtv-users] FW: Looking for sample video grabber scripts

On 8/30/2012 00:19, ajp [at] cantabrian wrote:
> 1. I export an recorded movie from Myth
> 2. I open it up in StreamClip and edit out commercials etc.
> 3. I save as a .ts file. The TS file name now includes series name,
> episode title, season, episode etc.
> 4. I also save a .jpg screenshot that I gather during the editing
> process
> 5. I run a custom script against a bunch of these edited movies.
> 6. The result of the custom script is:
> a. A *.mp4 file with all metadata correct incl. artwork
> b. A *.xml file suitable to be imported into Myth
> c. A *.png file suitable to be imported into Myth
>
> So at the end of this process I have a file I can use in
iTunes/iPhone/iPad.
> This file is complete and all metadata including artwork encapsulated
> in the one file. I also have an output that can be imported into Myth.

In 6b, you create some XML file filled with metadata. Format that XML file
in the manner described in that wiki link several responses back, name it
the same thing as the video, but with an '.mxml' extension, and the scanner
should automatically import it when it scans for content.
This mechanism will not currently do anything with the artwork.
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.2197 / Virus Database: 2437/5234 - Release Date: 08/29/12

_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/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.