Opened 12 years ago

Closed 11 years ago

#4621 closed patch (fixed)

dropped frames in MPEG4 AVC (H.264) streams due to non monotone dts

Reported by: anonymous Owned by: Janne Grunau
Priority: minor Milestone: 0.22
Component: mythtv Version: head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

I was running svn with a patch found on the dev list some time ago that enabled 2 cores on my on my core2 duo. After Changeset 15816 it no longer applies and i guess it would not be needed any more since that changeset allows for 2 or more cores in ffmpeg. I have always been running with "Standard" and XV in my profile and that has been working ok with the attached patch. I have no skills at all when it comes to programming so i can't tell what it does differently. I can get it to play smoothly in latest SVN for a while if i fast forward for a while and then hit play, but after about 20 seconds a NVP buffer Pause appears and it starts to stutter. this never happened with before. Cores are running about 50% each so there is plenty left.

Attachments (3)

bbchd.diff (3.0 KB) - added by anonymous 12 years ago.
mythtv-h264_threading2.patch (2.8 KB) - added by anonymous 12 years ago.
Updated BBC HD patch (svn 15826)
skip_loop_r15913.patch (497 bytes) - added by John 12 years ago.
skip_loop_filter, reduced h264 processor load

Download all attachments as: .zip

Change History (13)

Changed 12 years ago by anonymous

Attachment: bbchd.diff added

comment:1 Changed 12 years ago by danielk

Owner: changed from Isaac Richards to Janne Grunau
Status: newassigned
Type: defectpatch
Version: unknownhead

anonymous probably just needs to enable the use of two cores, but I'm assigning this to Janne as there is a patch attached...

comment:2 Changed 12 years ago by Janne Grunau

Milestone: unknown0.21
Status: assignedaccepted

nah, there is unfortunately a problem with the timestamps of h264 frames. Using the dts as we do now in avformatdecoder does unfortunately no longer work. Replacement with calculated pts for the next frame is almost finished. It's a pity that libavcodec's decoder don't set AVFrame.pts.

comment:3 Changed 12 years ago by anonymous

I had 2 cores enabled. Let me know if there is anything you want me to provide or test. Would be really nice to get this going again before 0.21 is released. Great job on all the new stuff implemented it works like a charm for me.

Changed 12 years ago by anonymous

Updated BBC HD patch (svn 15826)

comment:4 Changed 12 years ago by anonymous

I too was using the patch floating around the list that made BBC HD playback work. I've updated it against svn15826 and can now watch BBC HD again (need to enable 2 cores in mythfrontend now). The patch enables the skip loop filter otherwise my E6600 can't keep up. I guess its not the right fix otherwise it would have been applied previously, but it fixes things for me for now.

Good to see the h264 multi cpu bits being added to myth!!

comment:5 Changed 12 years ago by Janne Grunau

Summary: 720P50 no longer plays smothlydropped frames in MPEG4 AVC (H.264) streams due to non monotone dts

comment:6 Changed 12 years ago by Janne Grunau

(In [15910]) assure strictly monotonic increasing video pts

For some/all h.264 streams our libav* copies report broken dts. Since we used the dts as video pts, non monotone dts causes playback issues resulting in dropped frames. This change calculates the next video pts if it detects non monotonicity. Refs #4621

comment:7 Changed 12 years ago by Janne Grunau

Milestone: 0.210.22

comment:8 Changed 12 years ago by john

Janne,

Just to confirm that together 15910 and 15816 allow smooth playback of BBC_HD. Only patch still needed to SVN is the skip_loop_filter statement, (unless you have a really monster dual core cpu)

Changed 12 years ago by John

Attachment: skip_loop_r15913.patch added

skip_loop_filter, reduced h264 processor load

comment:9 Changed 12 years ago by Janne Grunau

(In [15923]) ignore pts wraparound in the pts validation. Refs #4621

comment:10 Changed 11 years ago by Janne Grunau

Resolution: fixed
Status: acceptedclosed

Skip loop filter will be handled in #4653. closing this as fixed since the original problem is fixed.

Note: See TracTickets for help on using tickets.