PDA

View Full Version : Created date - how to specify?



Coises
04-01-2013, 06:43 AM
I’m setting up Mezzmo to stream to a PS3. I’m concerned only with video here.

The PS3 shows the title, length, thumbnail and a date. So far, as best I can tell, that date is always the same as the date portion of the Created field in Mezzmo (which, in turn, seems to be the FullDate field from the mgofile table in the database interpreted as an Excel-1900 timestamp: i.e., days elapsed since December 30, 1899).

Also, as best I can tell, the rule is that if Mezzmo identifies a year in the file name, Created is set to January 1st of that year; otherwise, it is set to whichever of the file’s creation and modification timestamps is later.

Is all that correct? Are there other sources of data for the Created field that I haven’t discovered yet?

Since the field is displayed as a month, day and year on the PS3, I would like to see the premiere date for movies and the original air date for television shows. So far, I can only come up with two ways to accomplish that:

1. Set both the creation and modification dates of the file to the desired date using a utility like Attribute Magic, and avoid including the year in the file name; then move (not copy, which would change the creation date) the file into a monitored folder.

2. After adding the file to a monitored folder, use an SQLite utility to modify the FullDate field in the database to the appropriate Excel-1900 equivalent of the desired date.

Either of those will become tiresome very quickly. Is there a better way?

Paul
04-01-2013, 10:59 AM
Mezzmo will try to retrieve the date from several sources (in this order):


From metadata contained within your video files
From external metadata files (.NFO, .XML, .TGMD, etc.)
From online sites such as IMDB.com and TheTVDB.com
From the video file's date on disk

You can control which of these you want to use via the Metadata Retrieval Settings dialog. Go to the Options dialog (Retrieving Metadata page) to access this dialog. Or, access it via the Maintain Library dialog when you maintain your Mezzmo library. On the Metadata Retrieval Settings dialog, click Help to understand what each option does.

Rather than doing post processing on Mezzmo's sqlite database using a utility, I would suggest it would be better to have external metadata files (either .NFO, .XML, .TGMD, etc.) alongside your video files and Mezzmo will read then automatically for you. Another benefit of this is that Mezzmo will pick up other metadata such as your preferred artwork, genre, title, actors, directors, description, etc. from these files.

Coises
04-02-2013, 12:05 PM
Mezzmo will try to retrieve the date from several sources (in this order):


From metadata contained within your video files
From external metadata files (.NFO, .XML, .TGMD, etc.)
From online sites such as IMDB.com and TheTVDB.com
From the video file's date on disk


Can you show me an example of setting any metadata in an avi or mp4 file, or any tag in an XBMC-format nfo file, that will set the Created field to anything other than January 1st of some year (the one that is simultaneously set in the Year field)? I really have tried; I can’t find it.

I did eventually determine that it is specifically the NTFS Modified timestamp (not the Created timestamp) that initially sets both the Created and Modified fields (if nothing else overrides the Created field). If the NTFS Modified timestamp later changes, the Modified field reflects the new value, but the Created field remains as it was.

If an NTFS timestamp field specifies a date before January 1st, 1980, Mezzmo will often display “Invalid DateTime” and refuse to use the value... but not always. Occasionally it accepts one—I haven’t been able to discern any pattern to it. That makes using the NTFS timestamp impractical as a general way to fill in the Created field, since it can’t reliably be used to indicate the premiere or original air date of anything older than 1980; and I can’t find any metadata tag or XBMC.nfo tag that will set it (except to 1/1/yyyy) either.

Why am I so obsessed with the Created field? The main reason is that the PS3 (to which I’m streaming) only shows four things: the title, the thumbnail, the running time and a date in month/day/year format. The premiere date / original air date is the logical thing to put there. Since Mezzmo sends the Created date as whatever DLNA field it is that the PS3 deigns to display, I’d like to get the Created field to reflect that.

Testing with AVI and MP4 files, Mezzmo, ffmpeg and AtomicParsley, I worked out these tag mappings. I think I’m going to have to leave making a more comprehensive chart—including other file types, XMBC.nfo tags and online data base fields—to someone who has access to the Mezzmo source code. It would be a useful bit of documentation, but doing it from the “black box” perspective is just too time-consuming (and probably not entirely accurate).


Mezzmo (3.1) ffmpeg/ffprobe AtomicParsley .avi .mp4

Used verbatim:
Album Artist album_artist albumArtist - aART
Artist artist artist IART cART
Creator composer composer - cwrt
Episode track tracknum IPRT trkn
Genre genre genre IGNR cgen
Season disc¹ disk - disk
Series album album IPRD calb
Title title title INAM cnam

Unused:
grouping grouping cgrp
network TVNetwork tvnn
show TVShowName tvsh
episode_id TVEpisode tven
season_number TVSeasonNum tvsn
episode_sort TVEpisodeNum tves

Processed:
comment comment ICMT ccmt
date year ICRD cday
description description - desc

Comment (.avi): Uses "ICMT"
Comment (.mp4): Uses "desc" if present, else "ccmt"

Created (.avi): If there is no year in the filename,
uses the NTFS Modified (not Created!) timestamp.
If no "ICRD" tag and there is a year in the filename,
uses midnight January 1st of that year.
If "ICRD" tag is present and there is a year in the filename,
uses midnight January 1st of year from "ICRD" tag.

Created (.mp4): If no "cday" tag and no year in the filename,
uses the NTFS Modified (not Created!) timestamp.
If no "cday" tag and there is a year in the filename,
uses midnight January 1st of that year.
If "cday" tag is present,
uses midnight January 1st of year from "cday" tag.

Year: If "ICRD" (avi) or "cday" (mp4) tag is present,
uses the year from the date in that tag.
If no "ICRD" (avi) or "cday" (mp4) tag is present,
uses year from filename if one is present.
If neither tag nor year in filename is present,
uses year from NTFS Modified timestamp.


¹ ffprobe reads the "disk" tag in .mp4 as "disc", but ffmpeg
does not write it using either "disc" or "disk";
presumably this is a bug in ffmpeg (using
<http://ffmpeg.zeranoe.com/builds/win64/static/ffmpeg-1.1.3-win64-static.7z>)

Paul
04-02-2013, 05:42 PM
Nice analysis, Coises.

Understand your needs. We'll work with you to get Mezzmo updating the created date so that you can get this date appearing on your PS3. Please email us at support [at] conceiva [dot] com and provide a patch that has some extra support for retrieving the created date. Also, if you have a MP4 file that has these fields filled in, then please upload it to a filesharing site and send us the download link. It will allow us to test the extra metadata support before providing the patch to you.

Coises
04-02-2013, 08:10 PM
That’s great! If a patch is possible, then let me approach this from the opposite direction: what would be most valuable, as opposed to what already exists.

Starting with the most important/useful:

1. Make the Created field editable. If the date can be fixed manually, without hacking into the database, then any circumstance can be handled... the rest is just about making it easier.

2. When retrieving data from thetvdb.com, set Created from FirstAired in the Base Episode Record.

3. When retrieving data from IMDb, set Created from the first record (earliest date) for the title in release-dates.list. (Sometimes this will be only a year or a month and a year, rather than a full date.)

4. When parsing filenames, recognize full dates (yyyy-mm-dd) as well as just years, and if a full date is present, set Created to the full date, not just January 1 of the year.

5. When retrieving metadata, set Created from the full date given by ICRD (in .avi) or cday (in .mp4) if present, not just January 1 of the year.

6. Don’t fail randomly to recognize NTFS Modified timestamps before January 1, 1980.

I realize others might not put these in the same order of importance.

One of my reasons for choosing Mezzmo is the ability to adjust and correct information directly in the program’s own database, without having to gather all the information first: that way, I can let Mezzmo do most of the work, and only intervene when I want to make some specific change. I put 4 before 5 and 6 because changing the file name is much easier than managing metadata (which is different for every container and unavailable for at least one important one: mpg) or the Modified timestamp.

I will set up a couple small example files (an avi and an mp4) and e-mail you later.

Edit: examples here: http://www.coises.com/lji/metadatatest/

Paul
04-03-2013, 10:03 AM
Thanks, Coises. We'll look into this shortly and contact you via email when a patch is ready to try.