PenkethBoy 2068 Posted March 14, 2017 Posted March 14, 2017 I have been testing how to update Emby Metadata for video files that do not have readily available metadata online - i.e nothing equivalent of the tvdb/tmdb api's services So i have two options i think (both manual) 1) Update the nfo directly with say actor and genre entries 2) Add the same info to the video file mp4/mkv updating hundreds of nfo files individually is my least prefered option i can use tools like mp3Tag to update mp4 files in groups that have similar characteristics - still slow but works ok - MKV's are a bit more of a challenge and still experimenting on the best way to do them. So has anybody a better workflow/ideas etc that would make this less manual? Thanks
PenkethBoy 2068 Posted March 16, 2017 Author Posted March 16, 2017 I have done some testing of the import of "tags" from video files to Emby - i.e. which ones are used when a library scan is performed. @@Luke I have added a few notes and hints should somebody else want to try this for themselves. Background I used a short video file (Ted Talk) and added a lot of extra tag fields to the mp4 using Mp3Tag and its extended Tag feature see below. There are more but they are a bit obscure so left those out. I created the following Libraries - Movies, TV, Home Video, Music Video and Unset. I copied the mp4 file to each Library and ran a scan. This was on a new DB using the Beta server (3.2.7.5 and 3.2.8.1) so there was no historical data in the database. All metadata providers were turned off as this test is primarily for Video's with no metadata providers and to ensure it was clear what Emby had used from the mp4 tags. I checked what Emby uses as a command line for querying the mp4 file. This can be found in the logs when debug logging is turned on e.g. C:\Users\TimPercy\AppData\Roaming\Emby-Server\ffmpeg\20170308\ffprobe.exe -i file:"F:\EmbyTest\HomeVid\testing.mp4" -threads 0 -v info -print_format json -show_streams -show_chapters -show_format (the output can be changed to csv or xml or a few other formats if you need - just change the json in the file to say csv and add "> output.txt 2> err.txt" to the end of the string and it will save the output to those files or see the ffprobe documentation.) The output is a json file and looks like this. {"streams": [{"index": 0,"codec_name": "h264","codec_long_name": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10","profile": "Constrained Baseline","codec_type": "video","codec_time_base": "1/48","codec_tag_string": "avc1","codec_tag": "0x31637661","width": 512,"height": 288,"coded_width": 512,"coded_height": 288,"has_b_frames": 0,"sample_aspect_ratio": "1:1","display_aspect_ratio": "16:9","pix_fmt": "yuv420p","level": 21,"chroma_location": "left","refs": 1,"is_avc": "true","nal_length_size": "4","r_frame_rate": "24/1","avg_frame_rate": "24/1","time_base": "1/24","start_pts": 0,"start_time": "0.000000","duration_ts": 5786,"duration": "241.083333","bit_rate": "408133","bits_per_raw_sample": "8","nb_frames": "5786","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},"tags": {"creation_time": "2016-10-24T20:52:36.000000Z","language": "und","handler_name": "VideoHandler"}},{"index": 1,"codec_name": "aac","codec_long_name": "AAC (Advanced Audio Coding)","profile": "LC","codec_type": "audio","codec_time_base": "1/44100","codec_tag_string": "mp4a","codec_tag": "0x6134706d","sample_fmt": "fltp","sample_rate": "44100","channels": 1,"channel_layout": "mono","bits_per_sample": 0,"r_frame_rate": "0/0","avg_frame_rate": "0/0","time_base": "1/44100","start_pts": 0,"start_time": "0.000000","duration_ts": 10637312,"duration": "241.208889","bit_rate": "47970","max_bit_rate": "59944","nb_frames": "10388","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},"tags": {"creation_time": "2016-12-09T15:53:22.000000Z","language": "und","handler_name": "GPAC ISO Audio Handler"}},{"index": 2,"codec_name": "png","codec_long_name": "PNG (Portable Network Graphics) image","codec_type": "video","codec_time_base": "0/1","codec_tag_string": "[0][0][0][0]","codec_tag": "0x0000","width": 400,"height": 400,"coded_width": 400,"coded_height": 400,"has_b_frames": 0,"sample_aspect_ratio": "0:1","display_aspect_ratio": "0:1","pix_fmt": "pal8","level": -99,"color_range": "pc","refs": 1,"r_frame_rate": "90000/1","avg_frame_rate": "0/0","time_base": "1/90000","start_pts": 0,"start_time": "0.000000","duration_ts": 21708750,"duration": "241.208333","disposition": {"default": 0,"dub": 0,"original": 0,"comment": 0,"lyrics": 0,"karaoke": 0,"forced": 0,"hearing_impaired": 0,"visual_impaired": 0,"clean_effects": 0,"attached_pic": 1,"timed_thumbnails": 0}}],"chapters": [],"format": {"filename": "file:F:\\EmbyTest\\HomeVid\\testing.mp4","nb_streams": 3,"nb_programs": 0,"format_name": "mov,mp4,m4a,3gp,3g2,mj2","format_long_name": "QuickTime / MOV","start_time": "0.000000","duration": "241.208333","size": "13910179","bit_rate": "461349","probe_score": 100,"tags": {"major_brand": "isom","minor_version": "1","compatible_brands": "isom","creation_time": "2016-12-09T15:53:21.000000Z","date": "1997","synopsis": "pod cast description >Emby Overview","category": "Higher Education","episode_id": "01","network": "studios","season_number": "1","episode_sort": "0","keywords": "podcastkeywords","genre": "Podcast, Emby-Genre","media_type": "0","album": "TEDTalks","album_artist": "albumArtist","artist": "artist","comment": "To learn more about this speaker, find other TEDTalks, and subscribe to this Podcast series, visit www.TED.com\nFeedback: contact@@Ted.com","copyright": "Emby Studio Field","INVOLVEDPEOPLE": "involvedpeople","MEDIATYPE": "mediatype","MIXARTIST": "mixartist","PUBLISHER": "publisher","SETSUBTITLE": "setsubtitle","title": "TED: Chinaka Hodge (2016 Women)","sort_name": "titelsort","WWWARTIST": "www.artist","WWWAUDIOFILE": "www.audiofile","WWWAUDIOSOURCE": "www.audiosource","WWWCOMMERCIALINFO": "www.commercialinfo","WWWCOPYRIGHT": "www.copyright","WWWPAYMENT": "www.payment","WWWPUBLISHER": "www.publisher","WWWRADIOPAGE": "www.radiopage","podcast": "0"}}} Results As can be seen in the "Format" section of the json file all the extended tag fields and the normal fields are provided by ffprobe. For Video files (Movies, TV, Home Video, Music Videos and Unset) Tags Emby will use Title - if the option per Library to "Prefer embedded titles over filenames" is enabled the Title field text is imported otherwise its the filename. Year - Mapped to year as you would expect. Genre - will import multiple values if delimited by a "," and they appear in the Emby Genre field in Metadata Manager and the nfo file as separate values. Copyright - is mapped to the Emby "Studio" Field PodCastDesc - Gets mapped to the Emby Overview Field and saved as "plot" in the nfo file. (This is not used for Music import - i guess as music nfo's do not have a Plot entry in the nfo?) Tags Emby does NOT Use Artist/AlbumArtist - Could be used to add Actors Comment - Could be used for Emby Outline/Plot entries InvolvedPeople - As an alternative to using Artist to add actors Podcast/PodcastCategory/PodcastKeywords - could be mapped to existing Emby fields Publisher - added to Studio perhaps For TV - TVEpisode/TVEpisodeID/TVNetwork/TVSeason - could easily be mapped to Emby equivalent fields - assuming no Internet Metadata involved. and a selection of WWW prefixed fields which could be mapped to Emby Website field. So unfortunately for me it is not currently possible to add actors in any way i have found other than via the Emby interface or manually via editing NFO's. I checked the database file and the same info that is imported can be seen for the relevant records. I could have missed a tag field that might give me the above and if i have please point it out PS. There are a few differences with Audio files. The main ones being Publisher gets mapped to the Emby Studio field and all the MusicBrainz ID's get imported for each mp3 file. Artist and AlbumArtist are also imported for Music
Luke 42079 Posted March 18, 2017 Posted March 18, 2017 Those extra fields are a possibility for a future update, thanks. 1
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now