Jump to content

Emby not finding "Release Date" of mp4 files


Recommended Posts

Posted

TL/DR: I expected Emby to pick out metadata from my mp4 files to fill the "Release date" and/or "Year".

There are several topics on this already, but I could not find one that answered my specific question.  I've got Emby server on Synology Disk Station.  I have nearly 1000 home mp4 files, but no metadata from any of them is being picked up by Emby.  I'm not using Nfo (the options were not checked when I added the folder as an Emby library "Home videos & photos" type).

I've read that Emby uses "Year" tag to fill the "Release date" field in the UI.

I've picked out a sample mp4 file, which is attached.  Maybe there's something wrong with the metadata in the file?  What is missing that Emby requires and how do I add it?  Perhaps Emby could add a feature to fallback to "Create Date" or "Media Create Date" (which is in the file's metadata, as you can see below) when the metadata tag it would normally use is missing?

exiftool shows lots of useful tags, and it would be ideal if I could somehow tell Emby which one(s) to use:

Spoiler
/d/tmp $ exiftool 20130410_131525.mp4
ExifTool Version Number         : 10.80
File Name                       : 20130410_131525.mp4
Directory                       : .
File Size                       : 5.1 MB
File Modification Date/Time     : 2022:01:06 17:27:43-06:00
File Access Date/Time           : 2022:01:06 17:27:43-06:00
File Inode Change Date/Time     : 2022:01:06 17:27:43-06:00
File Permissions                : rwxrwxr--
File Type                       : MP4
File Type Extension             : mp4
MIME Type                       : video/mp4
Major Brand                     : MP4  Base Media v1 [IS0 14496-12:2003]
Minor Version                   : 0.0.0
Compatible Brands               : isom, 3gp4
Movie Data Size                 : 5364660
Movie Data Offset               : 32
Movie Header Version            : 0
Create Date                     : 2013:04:10 18:16:13
Modify Date                     : 2013:04:10 18:16:13
Time Scale                      : 1000
Duration                        : 2.86 s
Preferred Rate                  : 1
Preferred Volume                : 100.00%
Preview Time                    : 0 s
Preview Duration                : 0 s
Poster Time                     : 0 s
Selection Time                  : 0 s
Selection Duration              : 0 s
Current Time                    : 0 s
Next Track ID                   : 3
Track Header Version            : 0
Track Create Date               : 2013:04:10 18:16:13
Track Modify Date               : 2013:04:10 18:16:13
Track ID                        : 1
Track Duration                  : 2.73 s
Track Layer                     : 0
Track Volume                    : 0.00%
Image Width                     : 1920
Image Height                    : 1080
Graphics Mode                   : srcCopy
Op Color                        : 0 0 0
Compressor ID                   : avc1
Source Image Width              : 1920
Source Image Height             : 1080
X Resolution                    : 72
Y Resolution                    : 72
Compressor Name                 :
Bit Depth                       : 24
Video Frame Rate                : 27.146
Matrix Structure                : 1 0 0 0 1 0 0 0 1
Media Header Version            : 0
Media Create Date               : 2013:04:10 18:16:13
Media Modify Date               : 2013:04:10 18:16:13
Media Time Scale                : 48000
Media Duration                  : 2.86 s
Handler Type                    : Audio Track
Handler Description             : SoundHandle
Balance                         : 0
Audio Format                    : mp4a
Audio Channels                  : 2
Audio Bits Per Sample           : 16
Audio Sample Rate               : 48000
Avg Bitrate                     : 15 Mbps
Image Size                      : 1920x1080
Megapixels                      : 2.1
Rotation                        : 0

 

I don't mind writing a script to fill more metadata if I must; I just need to know what tag Emby requires.

Viewing the edit metadata page (which I realize I cannot use, since I deselected NFO), shows an empty "Release date" and "Year", so clearly none of the existing tags are being used:

Spoiler

image.png.a61ddc35e58fda9876c803f19c03a44b.png

Also attached is a screenshot of the options I selected during library creation, for completeness:

Spoiler

image.png.9ad17033ea7ceeea9c627ef1ac514584.png

 

 

Posted

Hello mikrott,

** This is an auto reply **

Please wait for someone from staff support or our members to reply to you.

It's recommended to provide more info, as it explain in this thread:

Thank you.

Emby Team

Happy2Play
Posted
4 hours ago, Luke said:

@Happy2Play are you able to reproduce?

Isn't this a matter of what ffprobe see and you use?

Spoiler

C:\Users\Media\AppData\Roaming\Emby-Server\system>ffprobe -i "C:\Users\Media\Downloads\20130410_131525.mp4" -threads 0 -v info -print_format json -show_streams -show_chapters -show_format -show_data
ffprobe version 4.5.0-emby_2021_12_10-g463c71b3b3+1170 Copyright (c) 2007-2021 the FFmpeg developers and softworkz for Emby LLC
  built with gcc 10.3.0 (Rev5, Built by MSYS2 project)
{
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\Users\Media\Downloads\20130410_131525.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 0
    compatible_brands: isom3gp4
    creation_time   : 2013-04-10T18:16:13.000000Z
  Duration: 00:00:02.86, start: 0.000000, bitrate: 15018 kb/s
  Stream #0:0[0x1](eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1920x1080, 15596 kb/s, Level 40, 27.15 fps, 30 tbr, 90k tbn (default)
    Metadata:
      creation_time   : 2013-04-10T18:16:13.000000Z
      handler_name    : VideoHandle
      vendor_id       : [0][0][0][0]
      encoder         :
  Stream #0:1[0x2](eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 94 kb/s (default)
    Metadata:
      creation_time   : 2013-04-10T18:16:13.000000Z
      handler_name    : SoundHandle
      vendor_id       : [0][0][0][0]
    "streams": [
        {
            "index": 0,
            "codec_name": "h264",
            "codec_long_name": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",
            "profile": "High",
            "codec_type": "video",
            "codec_tag_string": "avc1",
            "codec_tag": "0x31637661",
            "width": 1920,
            "height": 1080,
            "coded_width": 1920,
            "coded_height": 1080,
            "closed_captions": 0,
            "film_grain": 0,
            "has_b_frames": 0,
            "pix_fmt": "yuv420p",
            "level": 40,
            "field_order": "progressive",
            "refs": 1,
            "is_avc": "true",
            "nal_length_size": "4",
            "id": "0x1",
            "r_frame_rate": "30/1",
            "avg_frame_rate": "3375000/124327",
            "time_base": "1/90000",
            "start_pts": 0,
            "start_time": "0.000000",
            "duration_ts": 246097,
            "duration": "2.734411",
            "bit_rate": "15596817",
            "bits_per_raw_sample": "8",
            "nb_frames": "75",
            "extradata": "\n00000000: 0164 0028 ffe1 000b 6764 0028 acd2 01e0  .d.(....gd.(....\n00000010: 089f 9501 0005 68ee 06e2 c0              ......h....\n",
            "extradata_size": 27,
            "disposition": {
                "default": 1,
                "dub": 0,
                "original": 0,
                "comment": 0,
                "lyrics": 0,
                "karaoke": 0,
                "forced": 0,
                "hearing_impaired": 0,
                "visual_impaired": 0,
                "clean_effects": 0,
                "attached_pic": 0,
                "timed_thumbnails": 0,
                "captions": 0,
                "descriptions": 0,
                "metadata": 0,
                "dependent": 0,
                "still_image": 0
            },
            "tags": {
                "creation_time": "2013-04-10T18:16:13.000000Z",
                "language": "eng",
                "handler_name": "VideoHandle",
                "vendor_id": "[0][0][0][0]",
                "encoder": "                               "
            }
        },
        {
            "index": 1,
            "codec_name": "aac",
            "codec_long_name": "AAC (Advanced Audio Coding)",
            "profile": "LC",
            "codec_type": "audio",
            "codec_tag_string": "mp4a",
            "codec_tag": "0x6134706d",
            "sample_fmt": "fltp",
            "sample_rate": "48000",
            "channels": 2,
            "channel_layout": "stereo",
            "bits_per_sample": 0,
            "id": "0x2",
            "r_frame_rate": "0/0",
            "avg_frame_rate": "0/0",
            "time_base": "1/48000",
            "start_pts": 0,
            "start_time": "0.000000",
            "duration_ts": 137216,
            "duration": "2.858667",
            "bit_rate": "94158",
            "nb_frames": "134",
            "extradata": "\n00000000: 1190                                     ..\n",
            "extradata_size": 2,
            "disposition": {
                "default": 1,
                "dub": 0,
                "original": 0,
                "comment": 0,
                "lyrics": 0,
                "karaoke": 0,
                "forced": 0,
                "hearing_impaired": 0,
                "visual_impaired": 0,
                "clean_effects": 0,
                "attached_pic": 0,
                "timed_thumbnails": 0,
                "captions": 0,
                "descriptions": 0,
                "metadata": 0,
                "dependent": 0,
                "still_image": 0
            },
            "tags": {
                "creation_time": "2013-04-10T18:16:13.000000Z",
                "language": "eng",
                "handler_name": "SoundHandle",
                "vendor_id": "[0][0][0][0]"
            }
        }
    ],
    "chapters": [

    ],
    "format": {
        "filename": "C:\\Users\\Media\\Downloads\\20130410_131525.mp4",
        "nb_streams": 2,
        "nb_programs": 0,
        "format_name": "mov,mp4,m4a,3gp,3g2,mj2",
        "format_long_name": "QuickTime / MOV",
        "start_time": "0.000000",
        "duration": "2.859000",
        "size": "5367264",
        "bit_rate": "15018577",
        "probe_score": 100,
        "tags": {
            "major_brand": "isom",
            "minor_version": "0",
            "compatible_brands": "isom3gp4",
            "creation_time": "2013-04-10T18:16:13.000000Z"
        }
    }
}

But there is not Releasedate/Premieredate info unless you are mapping other fields.  So to me "creation time" woulld have to mapped here.

So adding ReleaseDate in mkvtomp4 made this field populate.  ffprobe shows date.

Spoiler

C:\Users\Media\AppData\Roaming\Emby-Server\system>ffprobe -i "C:\Users\Media\Desktop\Videos\Photo\20130410_131525.mp4" -threads 0 -v info -print_format json -show_streams -show_chapters -show_format -show_data
ffprobe version 4.5.0-emby_2021_12_10-g463c71b3b3+1170 Copyright (c) 2007-2021 the FFmpeg developers and softworkz for Emby LLC
  built with gcc 10.3.0 (Rev5, Built by MSYS2 project)
{
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\Users\Media\Desktop\Videos\Photo\20130410_131525.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 0
    compatible_brands: isom3gp4
    creation_time   : 2013-04-10T18:16:13.000000Z
    title           : 20130410_131525
    date            : 2013-04-10
    encoder         : MkvToMp4 [www.mkvtomp4.ru] version: 0.224 (x64)
    hd_video        : 2
    media_type      : 9
  Duration: 00:00:02.86, start: 0.000000, bitrate: 15019 kb/s
  Stream #0:0[0x1](eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1920x1080, 15596 kb/s, Level 40, 27.15 fps, 30 tbr, 90k tbn (default)
    Metadata:
      creation_time   : 2013-04-10T18:16:13.000000Z
      handler_name    : VideoHandle
      vendor_id       : [0][0][0][0]
      encoder         :
  Stream #0:1[0x2](eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 94 kb/s (default)
    Metadata:
      creation_time   : 2013-04-10T18:16:13.000000Z
      handler_name    : SoundHandle
      vendor_id       : [0][0][0][0]
    "streams": [
        {
            "index": 0,
            "codec_name": "h264",
            "codec_long_name": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",
            "profile": "High",
            "codec_type": "video",
            "codec_tag_string": "avc1",
            "codec_tag": "0x31637661",
            "width": 1920,
            "height": 1080,
            "coded_width": 1920,
            "coded_height": 1080,
            "closed_captions": 0,
            "film_grain": 0,
            "has_b_frames": 0,
            "pix_fmt": "yuv420p",
            "level": 40,
            "field_order": "progressive",
            "refs": 1,
            "is_avc": "true",
            "nal_length_size": "4",
            "id": "0x1",
            "r_frame_rate": "30/1",
            "avg_frame_rate": "3375000/124327",
            "time_base": "1/90000",
            "start_pts": 0,
            "start_time": "0.000000",
            "duration_ts": 246097,
            "duration": "2.734411",
            "bit_rate": "15596817",
            "bits_per_raw_sample": "8",
            "nb_frames": "75",
            "extradata": "\n00000000: 0164 0028 ffe1 000b 6764 0028 acd2 01e0  .d.(....gd.(....\n00000010: 089f 9501 0005 68ee 06e2 c0              ......h....\n",
            "extradata_size": 27,
            "disposition": {
                "default": 1,
                "dub": 0,
                "original": 0,
                "comment": 0,
                "lyrics": 0,
                "karaoke": 0,
                "forced": 0,
                "hearing_impaired": 0,
                "visual_impaired": 0,
                "clean_effects": 0,
                "attached_pic": 0,
                "timed_thumbnails": 0,
                "captions": 0,
                "descriptions": 0,
                "metadata": 0,
                "dependent": 0,
                "still_image": 0
            },
            "tags": {
                "creation_time": "2013-04-10T18:16:13.000000Z",
                "language": "eng",
                "handler_name": "VideoHandle",
                "vendor_id": "[0][0][0][0]",
                "encoder": "                               "
            }
        },
        {
            "index": 1,
            "codec_name": "aac",
            "codec_long_name": "AAC (Advanced Audio Coding)",
            "profile": "LC",
            "codec_type": "audio",
            "codec_tag_string": "mp4a",
            "codec_tag": "0x6134706d",
            "sample_fmt": "fltp",
            "sample_rate": "48000",
            "channels": 2,
            "channel_layout": "stereo",
            "bits_per_sample": 0,
            "id": "0x2",
            "r_frame_rate": "0/0",
            "avg_frame_rate": "0/0",
            "time_base": "1/48000",
            "start_pts": 0,
            "start_time": "0.000000",
            "duration_ts": 137216,
            "duration": "2.858667",
            "bit_rate": "94158",
            "nb_frames": "134",
            "extradata": "\n00000000: 1190                                     ..\n",
            "extradata_size": 2,
            "disposition": {
                "default": 1,
                "dub": 0,
                "original": 0,
                "comment": 0,
                "lyrics": 0,
                "karaoke": 0,
                "forced": 0,
                "hearing_impaired": 0,
                "visual_impaired": 0,
                "clean_effects": 0,
                "attached_pic": 0,
                "timed_thumbnails": 0,
                "captions": 0,
                "descriptions": 0,
                "metadata": 0,
                "dependent": 0,
                "still_image": 0
            },
            "tags": {
                "creation_time": "2013-04-10T18:16:13.000000Z",
                "language": "eng",
                "handler_name": "SoundHandle",
                "vendor_id": "[0][0][0][0]"
            }
        }
    ],
    "chapters": [

    ],
    "format": {
        "filename": "C:\\Users\\Media\\Desktop\\Videos\\Photo\\20130410_131525.mp4",
        "nb_streams": 2,
        "nb_programs": 0,
        "format_name": "mov,mp4,m4a,3gp,3g2,mj2",
        "format_long_name": "QuickTime / MOV",
        "start_time": "0.000000",
        "duration": "2.859000",
        "size": "5367523",
        "bit_rate": "15019301",
        "probe_score": 100,
        "tags": {
            "major_brand": "isom",
            "minor_version": "0",
            "compatible_brands": "isom3gp4",
            "creation_time": "2013-04-10T18:16:13.000000Z",
            "title": "20130410_131525",
            "date": "2013-04-10",
            "encoder": "MkvToMp4 [www.mkvtomp4.ru] version: 0.224 (x64)",
            "hd_video": "2",
            "media_type": "9"
        }
    }
}

 

Posted

Thanks for digging into this.  For what it's worth, I followed what you're doing and tried it myself:

ffmpeg -i 20130410_131525.mp4 -metadata date="2013-04-10" -c copy output.mp4

Confirmed the date metadata is present:

/d/tmp$ ffprobe output.mp4
...
Output #0, mp4, to 'output.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 0
    compatible_brands: isom3gp4
    date            : 2013-04-10
...

Then copied "output.mp4" to "20130410_131525.mp4" and used the "Refresh metadata" feature in the Emby UI on just this file, then visited the "Edit metadata" page to see this:

image.png.b38f7ec643fb1d347b0207aab65ce484.png

We're close!  In fact, I can work with this now that I know what bit of metadata to add and how to do it, but please:

  1. consider a feature to fallback to "creation_time" when there is no "date" shown from ffprobe, and
  2. maybe look into why "04/09/2013" shows when ffprobe shows "04-10-2013"

I checked my Synology server to confirm the date/time settings are correct.

  • Thanks 1
  • 4 months later...
Posted

Glad you were able to figure something out.

Happy2Play
Posted
On 1/7/2022 at 1:23 PM, mikrott said:

maybe look into why "04/09/2013" shows when ffprobe shows "04-10-2013"

Best guess would Daylight Saving time as the database column is a datetimestamp (Epoch & Unix Timestamp), not just date. 

So 04-10-2013 becomes 04-10-2013 12:00:00 AM or similar and converted to Unix Timestamp.  Then your system localization comes into play and throws this time stamp off.

image.png.6e72c481d2ff574fe9d4bfd5db9e8838.png

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...