Mailing List Archive

Disable MythVideo filename parsing
As I understand it, mythtv uses some type of file
parsing/interpretation of the filenames placed in Videos

https://www.mythtv.org/wiki/MythVideo_File_Parsing

I would like for MythTV to not do that. I name the files the way I want
them displayed and sometimes - not always - the displayed names are not
the way I named them. Sometimes it will include the filepath,
sometimes not, drop the text which comes before a dash or underscore,
etc.

Is there a way to disable this parsing of the filenames?

I am running:
MythTV Version : v30.0-39-g8e50fcf60b-dirty
MythTV Branch : fixes/30



_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Disable MythVideo filename parsing [ In reply to ]
On Mon, 30 Aug 2021 08:29:20 -0500, you wrote:

>As I understand it, mythtv uses some type of file
>parsing/interpretation of the filenames placed in Videos
>
>https://www.mythtv.org/wiki/MythVideo_File_Parsing
>
>I would like for MythTV to not do that. I name the files the way I want
>them displayed and sometimes - not always - the displayed names are not
>the way I named them. Sometimes it will include the filepath,
>sometimes not, drop the text which comes before a dash or underscore,
>etc.
>
>Is there a way to disable this parsing of the filenames?
>
>I am running:
>MythTV Version : v30.0-39-g8e50fcf60b-dirty
>MythTV Branch : fixes/30

It will only do that if you are using the metadata lookup. If you do
not need the metadata, then just disable all that and the filenames
will be as they are on disk.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Disable MythVideo filename parsing [ In reply to ]
On Tue, 31 Aug 2021 02:49:46 +1200
Stephen Worthington <stephen_agent@jsw.gen.nz> wrote:

> It will only do that if you are using the metadata lookup. If you do
> not need the metadata, then just disable all that and the filenames
> will be as they are on disk.
> _______________________________________________

I definitely do not want the metadata lookup and as far as I can tell
it is disabled.

I checked the settings under Videos and found:
Video Metadata settings
[unchecked] Perform metadata update after...
[unchecked] Enable Random Trailer Pl...
[unchecked] Display unknown file types
[unchecked] Enable metadata in file b...

I looked in the database table "settings" and all entries referencing
"meta" is set to 0

VideoTreeLoadMetaData
mythvideo.AutoMetaDataScan
JobAllowMetadata
mythvideo.AutoMetaDataScan
VideoTreeLoadMetaData
mythvideo.AutoMetaDataScan
VideoTreeLoadMetaData
mythvideo.AutoMetaDataScan
VideoTreeLoadMetaData


The odd thing is, not all subdirectories in Videos have the
same behavior.
I can have a directory entry like
season-1/01-episode.mp4
season-1/02-episode.mp4
season-1/03-episode.mp4

then

season-2/01-episode.mp4
season-2/02-episode.mp4
season-2/03-episode.mp4

and season-1 will display exactly as written and season-2 will show as
like a concatenation of the directory name and the filename.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Disable MythVideo filename parsing [ In reply to ]
On Tue, 31 Aug 2021 05:03:52 +1200
Stephen Worthington <stephen_agent@jsw.gen.nz> wrote:

>
> You may have some old metadata in the database, so even if you have
> turned off all the metadata collection and updating, older files that
> already have metadata will be affected. You may need to delete all
> the data in the metadata tables.
>

Then that is my problem if having any entries maybe other than title
and filename because I use the fields for my own purposes (such as
"subtitle").



_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Disable MythVideo filename parsing [ In reply to ]
On Mon, 30 Aug 2021 12:32:26 -0500
revans <revans42@gmail.com> wrote:

> On Tue, 31 Aug 2021 05:03:52 +1200
> Stephen Worthington <stephen_agent@jsw.gen.nz> wrote:
>
> >
> > You may have some old metadata in the database, so even if you have
> > turned off all the metadata collection and updating, older files
> > that already have metadata will be affected. You may need to
> > delete all the data in the metadata tables.
> >
>
> Then that is my problem if having any entries maybe other than title
> and filename because I use the fields for my own purposes (such as
> "subtitle").

I am looking in "videometadata" and I see many entries in subtitle,
season and episode which I did not enter and could not have been
fetched remotely (mythtv is blocked from internet access). These
entries must have been made by mythtv by parsing the filename for
information and at the time the entries were made, most certainly all
"metadata lookups" were disabled.

It seems like something is populating these fields when I scan/update
the Videos directory even though all metadata lookup stuff should be
turned off.


_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Disable MythVideo filename parsing [ In reply to ]
On Mon, 30 Aug 2021 15:54:43 -0500, you wrote:

>On Mon, 30 Aug 2021 12:32:26 -0500
>revans <revans42@gmail.com> wrote:
>
>> On Tue, 31 Aug 2021 05:03:52 +1200
>> Stephen Worthington <stephen_agent@jsw.gen.nz> wrote:
>>
>> >
>> > You may have some old metadata in the database, so even if you have
>> > turned off all the metadata collection and updating, older files
>> > that already have metadata will be affected. You may need to
>> > delete all the data in the metadata tables.
>> >
>>
>> Then that is my problem if having any entries maybe other than title
>> and filename because I use the fields for my own purposes (such as
>> "subtitle").
>
>I am looking in "videometadata" and I see many entries in subtitle,
>season and episode which I did not enter and could not have been
>fetched remotely (mythtv is blocked from internet access). These
>entries must have been made by mythtv by parsing the filename for
>information and at the time the entries were made, most certainly all
>"metadata lookups" were disabled.
>
>It seems like something is populating these fields when I scan/update
>the Videos directory even though all metadata lookup stuff should be
>turned off.

One other thing I do differently from most people is that I do not
have any storage groups defined for videos. I only use the old
VideoStartupDir setting to define a list of directories where
mythfrontend looks for video files. I do that because I have a number
of video files that mythfrontend does not play properly (some older
.wmv files, for example), so I use the Alternate Player setting to run
mplayer for those files. The Alternate Player setting does not
support storage groups.

It might be an idea to look at the videometadata entries for similar
files that do and do not have filename display problems to see what
the differences are.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Disable MythVideo filename parsing [ In reply to ]
On 30/08/2021 22:54, revans wrote:
> I am looking in "videometadata" and I see many entries in subtitle,
> season and episode which I did not enter and could not have been
> fetched remotely (mythtv is blocked from internet access). These
> entries must have been made by mythtv by parsing the filename for
> information and at the time the entries were made, most certainly all
> "metadata lookups" were disabled.
>
> It seems like something is populating these fields when I scan/update
> the Videos directory even though all metadata lookup stuff should be
> turned off.

The metadata lookup can also be run on a frontend; not only on the
backend. Are you sure that all frontends as well as the backend have at
all times been prevented from accessing the internet?
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Disable MythVideo filename parsing [ In reply to ]
On Tue, 31 Aug 2021 16:13:01 +0200
Jan Ceuleers <jan.ceuleers@gmail.com> wrote:

>
> The metadata lookup can also be run on a frontend; not only on the
> backend. Are you sure that all frontends as well as the backend have
> at all times been prevented from accessing the internet?
>

I do have a frontend only in addition to a frontend/backend but I have
verified all metadata lookup is turned off on both machines.

Also as I mentioned in a later post, I found what looks like code in
videometadata.cpp which is intended to extract information from the
filename and insert it into the database.


_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Disable MythVideo filename parsing [ In reply to ]
>
>
> I do have a frontend only in addition to a frontend/backend but I have
> verified all metadata lookup is turned off on both machines.
>
> Also as I mentioned in a later post, I found what looks like code in
> videometadata.cpp which is intended to extract information from the
> filename and insert it into the database.
>
>
I spent quite a long time renaming some of my old orphaned recordings to
try to get that code to create metadata. I never really got it to do what
I wanted.
Re: Disable MythVideo filename parsing [ In reply to ]
On Tue, 31 Aug 2021 17:31:00 +0100
David Watkins <watkinshome@gmail.com> wrote:

> >
> >
> > I do have a frontend only in addition to a frontend/backend but I
> > have verified all metadata lookup is turned off on both machines.
> >
> > Also as I mentioned in a later post, I found what looks like code in
> > videometadata.cpp which is intended to extract information from the
> > filename and insert it into the database.
> >
> >
> I spent quite a long time renaming some of my old orphaned recordings
> to try to get that code to create metadata. I never really got it to
> do what I wanted.

I can say with certainty it is parsing the filename and using the
information to guess title, subtitle, season, and episode. This is with
all settings for metadata turned off.

It is also not consistent with the data, one directory I have has files
named like 01-name.mp4, 02-name.mp4 etc. This works fine until we get to
one named 10-name.mp4. Starting at that file it starts trying to guess
subtitle, episode etc.

Removing that particular file, doing a rescan then putting it back in
causes the exact same behavior.


_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Disable MythVideo filename parsing [ In reply to ]
On 31/08/2021 20:55, revans wrote:

> On Tue, 31 Aug 2021 17:31:00 +0100
> David Watkins <watkinshome@gmail.com> wrote:
>
>>>
>>> I do have a frontend only in addition to a frontend/backend but I
>>> have verified all metadata lookup is turned off on both machines.
>>>
>>> Also as I mentioned in a later post, I found what looks like code in
>>> videometadata.cpp which is intended to extract information from the
>>> filename and insert it into the database.
>>>
>>>
>> I spent quite a long time renaming some of my old orphaned recordings
>> to try to get that code to create metadata. I never really got it to
>> do what I wanted.
> I can say with certainty it is parsing the filename and using the
> information to guess title, subtitle, season, and episode. This is with
> all settings for metadata turned off.
>
> It is also not consistent with the data, one directory I have has files
> named like 01-name.mp4, 02-name.mp4 etc. This works fine until we get to
> one named 10-name.mp4. Starting at that file it starts trying to guess
> subtitle, episode etc.
>
> Removing that particular file, doing a rescan then putting it back in
> causes the exact same behavior.
>
>

An alternative to relying on the filename parsing is to use an mxml file
to supply the metadata you want which is what I often do.

You just need to name the mxml with the same name as the video file but
with .mxml for the extension.

When you rescan for video's or ask for one video to update it's metadata
and if there is an .mxml or .nfo file available then the metadata from
there will be used.


An example .mxml file is below (See the wiki page for more details here
:- https://www.mythtv.org/wiki/MythTV_Universal_Metadata_Format )


<!DOCTYPE MythMetadataXML>
<metadata>
    <item>
        <title>Full Steam Ahead</title>
        <season>1</season>
        <episode>2</episode>
        <description>2/6. Series exploring the expansion of railways in
the Victorian era. This episode looks at how railways began to move
people, rather than just goods, around the country. [HD] [AD,S] Recorded
from BBC Two HD on Monday 19 December 2016 at 04:00 pm.</description>
        <channum>102</channum>
        <chansign>BBC Two HD</chansign>
        <startts>Mon, 19 December 2016 16:00:00</startts>
        <releasedate>2016-01-01</releasedate>
        <runtime>60</runtime>
        <runtimesecs>3600</runtimesecs>
        <categories>
            <category type="genre" name="Railways"/>
        </categories>
    </item>
</metadata


In your case it sounds like you would want to change the title to
something like '10-name.mp4' and probably remove or leave blank most of
the other elements - I've got to say you are officially weird if that is
what you really want :).


Paul H.


_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org