Recording metadata - TPeterson

Want to write your own code to work with a HDHomeRun or work with the HDHomeRun DVR? We are happy to help with concepts, APIs, best practices.
TPeterson
Posts: 138
Joined: Thu May 31, 2007 8:29 pm
Device ID: 10123716, 10157425, 1039FE2B, 103AEA6C, 1075D4B1, 1076C3A7, 1080F19F
Location: San Carlos, CA
x 1
Contact:

Recording metadata - TPeterson

Post by TPeterson »

Thanks, Nick, but your app has ceased to play my TS files and I am really not ready to go back to watching live TV. 🙄 I understand that the 'obvious' solution is to subscribe to your DVR, but I'd like to stick with using your HW and my own SW (Cliff Watson EPG) for those recordings.

nickk
Silicondust
Posts: 20420
Joined: Tue Jan 13, 2004 9:39 am
x 280

Re: NextGen TV Certification testing started

Post by nickk »

TPeterson wrote: Tue Jul 25, 2023 7:06 pm Thanks, Nick, but your app has ceased to play my TS files and I am really not ready to go back to watching live TV. 🙄 I understand that the 'obvious' solution is to subscribe to your DVR, but I'd like to stick with using your HW and my own SW (Cliff Watson EPG) for those recordings.
While not officially supported, as long as the recording has the required metadata at the start the HDHomeRun app should play it. The recorded file is simply the TS data from the HDHomeRun with a small chunk of metadata at the start (TV guide information like the name of the show and the episode information).

TPeterson
Posts: 138
Joined: Thu May 31, 2007 8:29 pm
Device ID: 10123716, 10157425, 1039FE2B, 103AEA6C, 1075D4B1, 1076C3A7, 1080F19F
Location: San Carlos, CA
x 1
Contact:

Re: NextGen TV Certification testing started

Post by TPeterson »

That is terrific news, Nick! I had earlier heard only that the HDHR app no longer played TS files. Where can I find information on the metadata structure?

nickk
Silicondust
Posts: 20420
Joined: Tue Jan 13, 2004 9:39 am
x 280

Re: NextGen TV Certification testing started

Post by nickk »

TPeterson wrote: Tue Jul 25, 2023 8:07 pm That is terrific news, Nick! I had earlier heard only that the HDHR app no longer played TS files. Where can I find information on the metadata structure?
Not sure where you heard that - the data format hasn't changed since the DVR was released in 2016.

We haven't published a formal spec for the metadata. It is JSON data packed into TS frames, padded as needed so the first 64 * 188 bytes of the file are available for metadata.

TPeterson
Posts: 138
Joined: Thu May 31, 2007 8:29 pm
Device ID: 10123716, 10157425, 1039FE2B, 103AEA6C, 1075D4B1, 1076C3A7, 1080F19F
Location: San Carlos, CA
x 1
Contact:

Re: NextGen TV Certification testing started

Post by TPeterson »

OK, so there's no published spec. Can I find some example files someplace?

NedS
Silicondust
Posts: 3286
Joined: Mon Dec 10, 2018 12:38 pm
x 106

Re: NextGen TV Certification testing started

Post by NedS »

TPeterson wrote: Tue Jul 25, 2023 8:33 pm OK, so there's no published spec. Can I find some example files someplace?
It's something I've been meaning to document. I'll try to get something put together soon.

gtb
Expert
Posts: 4242
Joined: Thu Oct 06, 2011 1:00 pm
Location: Sunnyvale, CA USA
x 18

Re: NextGen TV Certification testing started

Post by gtb »

NedS wrote: Wed Jul 26, 2023 12:40 pm
TPeterson wrote: Tue Jul 25, 2023 8:33 pm OK, so there's no published spec. Can I find some example files someplace?
It's something I've been meaning to document. I'll try to get something put together soon.
Based on reverse engineering starting about five years ago, based on looking at the stored json, I took a stab at providing a json schema for the DVR which can be found at: https://github.com/garybuhrmaster/HDHRU ... son.schema

That json schema is likely wrong and/or incomplete in at least some ways, but might be useful as a starting point should SiliconDust choose to provide a formal document.

(in that larger repo there are also utilities to show and/or update the header metadata, and also import into a DVR instance existing transport files by adding such metadata).

TPeterson
Posts: 138
Joined: Thu May 31, 2007 8:29 pm
Device ID: 10123716, 10157425, 1039FE2B, 103AEA6C, 1075D4B1, 1076C3A7, 1080F19F
Location: San Carlos, CA
x 1
Contact:

Re: Recording metadata - TPeterson

Post by TPeterson »

A great starting point! Thanks, Gary.

signcarver
Expert
Posts: 11213
Joined: Wed Jan 24, 2007 1:04 am
Device ID: 10A05954 10802091 131B34B7 13231F92 1070A18E 1073ED6F 15300C36
x 32

Re: Recording metadata - TPeterson

Post by signcarver »

That is a good start, frequent categories I have that didn't appear to be there are sports and special... and at glance you also appear to be missing some properties that would be specific for sports such as Team1 and Team2.

Note to others: not all properties are always used

gtb
Expert
Posts: 4242
Joined: Thu Oct 06, 2011 1:00 pm
Location: Sunnyvale, CA USA
x 18

Re: Recording metadata - TPeterson

Post by gtb »

signcarver wrote: Wed Jul 26, 2023 9:30 pm That is a good start, frequent categories I have that didn't appear to be there are sports and special... and at glance you also appear to be missing some properties that would be specific for sports such as Team1 and Team2.

Note to others: not all properties are always used
Likely missing since I never watch sports (so would not have seen a file with such categories), and apparently have never recorded a special.

I think that rather than trying to crowd source any other missing (or in error) attributes (and there are almost certainly more) one by one, let's see what SiliconDust (NedS) produces in the soon timeframe.

TPeterson
Posts: 138
Joined: Thu May 31, 2007 8:29 pm
Device ID: 10123716, 10157425, 1039FE2B, 103AEA6C, 1075D4B1, 1076C3A7, 1080F19F
Location: San Carlos, CA
x 1
Contact:

Re: NextGen TV Certification testing started

Post by TPeterson »

NedS wrote: Wed Jul 26, 2023 12:40 pm
TPeterson wrote: Tue Jul 25, 2023 8:33 pm OK, so there's no published spec. Can I find some example files someplace?
It's something I've been meaning to document. I'll try to get something put together soon.
Hi, Ned! Have you made any progress on this? Have an ETA or URL for it?

techpro2004
Posts: 666
Joined: Tue Oct 06, 2015 1:25 pm

Re: Recording metadata - TPeterson

Post by techpro2004 »

Just an fyi, mcebuddy can convert files to a hdhomerun dvr compatible format with the correct metadata structure.

TPeterson
Posts: 138
Joined: Thu May 31, 2007 8:29 pm
Device ID: 10123716, 10157425, 1039FE2B, 103AEA6C, 1075D4B1, 1076C3A7, 1080F19F
Location: San Carlos, CA
x 1
Contact:

Re: Recording metadata - TPeterson

Post by TPeterson »

@techpro2004, thanks for the tip.

mrrrk
Posts: 6
Joined: Wed Feb 28, 2024 2:46 am
x 1

Re: Recording metadata - TPeterson

Post by mrrrk »

It's not extensively tested - and I take no responsibility if it screws up anyone's files - but I hacked together some C# code to read, change and write metadata fields here:

https://github.com/mrrrk/MpegMetadata

Maybe someone will find it useful :D

edit - just realised there's something very similar here: https://github.com/garybuhrmaster/HDHRU ... leMetadata
...and done more concisely and with more expertise than my shabby effort.

TPeterson
Posts: 138
Joined: Thu May 31, 2007 8:29 pm
Device ID: 10123716, 10157425, 1039FE2B, 103AEA6C, 1075D4B1, 1076C3A7, 1080F19F
Location: San Carlos, CA
x 1
Contact:

Re: Recording metadata - TPeterson

Post by TPeterson »

@mrrrk: Thanks!

Post Reply