Opened 6 years ago
Closed 6 years ago
#13416 closed Bug Report - General (Fixed)
Interlaced Mediacodec counts fast on Shield
Reported by: | mspieth | Owned by: | Peter Bennett |
---|---|---|---|
Priority: | minor | Milestone: | 30.1 |
Component: | MythTV - Video Playback | Version: | Master Head |
Severity: | medium | Keywords: | |
Cc: | Ticket locked: | no |
Description
I have been using avsync2 and mediacodec with interlaced recorded TV program.
I play back at faster than real time e.g. x1.2 or x1.5. The counter for the end of the program reaches 0 before the actual end of the program, thus reverting to x1.0. It seems to be the same ratio regardless of the rate played.
Attachments (3)
Change History (16)
Changed 6 years ago by
Attachment: | 20190227_1659_timing_fix.patch added |
---|
comment:1 Changed 6 years ago by
This fix only applies to avsync2. Elapsed playback time is now based on the timecodes of the frames rather than count of number of frames played. This should help with any video or situation where the timecode advances at the wrong rate.
I have a 30 minute recording that I played using mediacodec on shield at 1.5x. Before this change it reverted to 1.0x and showed 30 playback minutes when it was actually only 2/3 through (at the 20 minute point approximately). With the patch the timings are correct and it reaches the end of the recording correct;y at the 1.5x speed, also the timings displayed with Info are now correct.
I have done some tests with cutpoints also, and they seem OK with this change.
comment:2 Changed 6 years ago by
Milestone: | needs_triage → 30.1 |
---|
Changed 6 years ago by
Attachment: | monotonic-time-avsync2-20190303.patch added |
---|
comment:4 Changed 6 years ago by
Add patch which will mitigate any ntp time jumps that occur during playback and avsync2.
Feel free to disregard the sleep loop which is supposed to trick the scheduler from deferring this thread/process after the actual time expired. The trick is used elsewhere in myth too.
comment:5 Changed 6 years ago by
I agree that I should have used QElapsedTimer here. I will make the change, but ...
One thing mystifies me, I cannot see where the timer is started. According to the QElapsedTimer documentation, the timer is invalid until QElapsedTimer::start() is called, and I cannot find any call to start() in the patch. It would be good enough to just call start() in the constructor, I think, and it could continue timing until destroyed.
Is something missing or am I missing something?
comment:6 Changed 6 years ago by
Sorry I missed copying the m_avTimer.start() in mythplayers constructor.
Changed 6 years ago by
Attachment: | monotonic-time-avsync2-20190303.2.patch added |
---|
comment:7 Changed 6 years ago by
Also its probably a good idea to read the use avsync2 setting in teh constructor and cache it as I think it will make mysql a bit busy.
comment:8 Changed 6 years ago by
AFAIK All settings are cached, only read from sql the first time accessed.
comment:12 Changed 6 years ago by
Resolution: | fixed |
---|---|
Status: | closed → new |
Reopening as this needs to be fixed another way. The applied fix will be reverted.
Explanation -
It causes jumps in the frame numbers which prevent the VideoOutput classes detecting a discontinuity and releasing out of date reference frames for multi-frame deinterlacers
comment:13 Changed 6 years ago by
Resolution: | → Fixed |
---|---|
Status: | new → closed |
Closing this again as the frame discontinuity issue is now being handled differently and this fix has been committed again. Also, changing the way this works will be a lot of work and it is working well as is.
Proposed, lightly tested, fix