(2013-01-18, 09:34)cfetzer Wrote: MythTV 0.27 seems to bring some support for this: http://code.mythtv.org/trac/changeset/49dbed5be0/mythtv
Haven't checked it in detail, but it sounds promising.
Is anyone able to upload a sample recording with different framerates somewhere (for example on dropbox)?
I would like to submit a patch for this that implements a basic lookup on the recordedseek table for these functions. Taking the information from that MythTV patch, I made a cmyth_mysql function that pulls the closest MS offset from the recordedseek table (type = 33). This value could be before or after the actual frame mark, generally within a MS or two.
This should also be compatible with previous version of MythTV because if no value comes back from the DB it falls back to the static frame rate method from before.
It has been a long time since I've done much in C/C++, and while I've tested this on my own system, I feel it could be double checked.
Debugging log output will show this:
Code:
22:12:52 T:2691705664 DEBUG: AddOnLog: MythTV cmyth PVR Client: start_mark: 0, end_mark: 2082, start: 0, end: 69069, bad_start: 0, bad_end: 69469
22:12:52 T:2691705664 DEBUG: AddOnLog: MythTV cmyth PVR Client: start_mark: 15293, end_mark: 20603, start: 509509, end: 705532, bad_start: 510276, bad_end: 687454
22:12:52 T:2691705664 DEBUG: AddOnLog: MythTV cmyth PVR Client: start_mark: 30425, end_mark: 37410, start: 1033860, end: 1290041, bad_start: 1015181, bad_end: 1248248
22:12:52 T:2691705664 DEBUG: AddOnLog: MythTV cmyth PVR Client: start_mark: 52183, end_mark: 59102, start: 1782400, end: 2037744, bad_start: 1741174, bad_end: 1972038
22:12:52 T:2691705664 DEBUG: AddCut - Pushing new cut to back [00:00:00.000 - 00:01:09.069], 3
22:12:52 T:2691705664 DEBUG: ReadPvr - Added break [00:00:00.000 - 00:01:09.069] found in PVRRecording for: pvr://recordings/Default/The Daily Show With Jon Stewart/
22:12:52 T:2691705664 DEBUG: AddCut - Pushing new cut to back [00:08:29.509 - 00:11:45.532], 3
22:12:52 T:2691705664 DEBUG: ReadPvr - Added break [00:08:29.509 - 00:11:45.532] found in PVRRecording for: pvr://recordings/Default/The Daily Show With Jon Stewart/
22:12:52 T:2691705664 DEBUG: AddCut - Pushing new cut to back [00:17:13.860 - 00:21:30.041], 3
22:12:52 T:2691705664 DEBUG: ReadPvr - Added break [00:17:13.860 - 00:21:30.041] found in PVRRecording for: pvr://recordings/Default/The Daily Show With Jon Stewart/
22:12:52 T:2691705664 DEBUG: AddCut - Pushing new cut to back [00:29:42.400 - 00:33:57.744], 3
22:12:52 T:2691705664 DEBUG: ReadPvr - Added break [00:29:42.400 - 00:33:57.744] found in PVRRecording for: pvr://recordings/Default/The Daily Show With Jon Stewart/
Example:
Code:
start_mark: 52183, end_mark: 59102, start: 1782400, end: 2037744, bad_start: 1741174, bad_end: 1972038
Added break [00:29:42.400 - 00:33:57.744]
start/end_mark: the mark lookup value
start/end: the ms of the start and end of the time frame
bad_start/end: the comparision to the constant frame rate value math
start = 1782400 ms => 1782.400 seconds = 00:29:42.400
bad_start = 1741174 ms => 1741.174 seconds = 00:29:01.174
Proper break added: Added break [00:29:42.400 - 00:33:57.744]
As shown in the example above, the offset is over 30 seconds off at the end of the the show. And if that is a hour long show it gets worse.
If there is no map in the database, the output shows:
"missing recorded map, try running 'mythcommflag --rebuild' for this recording"
I hope this at least a decent enough start to getting it implemented into the PVR for MythTV. Thank you for all of your work you've put into this so far!
Patch:
http://pastebin.com/CNFYjq4R
EDIT: Typo in the description above.
EDIT 2: Now that I'm awake, I have reworked the patch into a fork of xbmc-pvr-addons:
https://github.com/nerddtvg/xbmc-pvr-add...fb09b77c18 I will be initiating a pull request soon for it.