Opened 8 years ago

Closed 3 years ago

#10294 closed Bug Report - General (fixed)

Bluray playback stutters due to delay reading next .m2ts file

Reported by: mythtv@… Owned by: peper03
Priority: minor Milestone: 29.0
Component: MythTV - Blu-ray Playback Version: Master Head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

While watching BD disks stored on a remote backend, there are occasional stutters at fixed points during playback (i.e. repeatable each and every time). Upon investigation, it looks like the stuttering occurs when it reaches the end of one .m2ts file and starts the next. Looking at the frontend log, it seems that there is a ~2 second period where it stops requesting new data at the end of a file, then starts looking for the next file. I suspect that this drains the buffers, causing stuttering until the next file is opened and the buffers are filled again. I have attached the part of the frontend log with --loglevel debug and -v network which shows the pause.

Attachments (1)

BD_playback.txt (11.7 KB) - added by mythtv@… 8 years ago.

Download all attachments as: .zip

Change History (9)

Changed 8 years ago by mythtv@…

Attachment: BD_playback.txt added

comment:1 Changed 8 years ago by mythtv@…

I should probably clarify that this is a disc backed up using makemkvcon backup --decrypt, not a BD ISO.

comment:2 Changed 8 years ago by mythtv@…

I tried implementing a 'preload' of the next m2ts file in the playlist to reduce the time taken to switch to the new file, but the problem still persists. It would seem that bluray.c would need to be changed so that it was aware of the fact that it is reading from a buffer, and signal the buffer to reading from the next file once the buffered reads reached the EOF.

comment:3 Changed 8 years ago by robertm

Owner: robertm deleted
Status: newassigned

comment:4 Changed 8 years ago by Raymond Wagner

Status: assignednew

comment:5 Changed 8 years ago by jameswalker@…

I can confirm the same behaviour which unfortunately makes MythTV a non viable bluray playing option until it is fixed as over 50% of my library uses the multiple m2ts approach.

I am on the latest update for 0.25 (fixes branch).

comment:6 Changed 8 years ago by Nicolas Riendeau

Ticket locked: set

Please no "me too"...

comment:7 Changed 3 years ago by peper03

Milestone: unknown29.0
Owner: set to peper03
Status: newassigned
Ticket locked: unset

The problem is not caused because the next file is not preloaded but rather because the timecode jumps when reading from the next file (turn on the 'playback' logs to see it). This causes the player to think there's a sync problem and so there's a bit of a stutter until it's satisfied everything is back in sync again.

comment:8 Changed 3 years ago by Richard Hulme <peper03@…>

Resolution: fixed
Status: assignedclosed

In d5ba36f7c39f544a189097f52a8ef4453990e21f/mythtv:

Flatten Blu-Ray timecodes when switching from one clip to another to avoid pauses due to the player thinking there's a huge AV-sync issue.

Fixes #10294

Note: See TracTickets for help on using tickets.