Opened 8 years ago

Closed 5 years ago

Last modified 5 years ago

#2516 closed Bug (fixed)

Subtitles not Showing Correctly for DVB Files

Reported by: romulous Owned by: kasper93
Priority: normal Milestone: 1.7.9
Component: Subtitles Version: 1.6.2.4902
Severity: major Keywords:
Cc: Evaluation:

Description

This report is a result of a bug report for xy-vsfilter:
http://code.google.com/p/xy-vsfilter/issues/detail?id=108

In response to that ticket, it has been requested that I report this issue to upstream - MPC-HC in this case, so it can be fixed there before it is merged into downstream (xy-vsfilter).

Briefly summarising the original report, the following test file does not show subtitles in Zoom Player when using xy-vsfilter:
https://rapidshare.com/files/169776626/Subtitle_sync_example.ts

The Zoom developers looked at the issue, and weren't sure if the splitter was to blame (LAV in this case) or the subs renderer (xy-vsfilter). I posted the report to the xy-vsfilter bug tracker, and they confirmed the behaviour, but believe the issue needs to be fixed in MPC-HC first as the maintainer of the DVB & PGS rendering code they are using. The subs do display in MPC-HC, but the display is messed up (a screenshot is attached to comment #1 in the xy-vsfilter bug report).

After the code is fixed in MPC-HC, they will merge the changes into xy-vsfilter - which should fix the issue in Zoom Player. Any assistance would be appreciated.

Change History (14)

comment:1 Changed 8 years ago by Underground78

Cc: Underground78 added

I'm not sure to understand correctly what needs to be fixed on our side? He says that "MPC-HC ISR seems to display them correctly".

comment:2 Changed 8 years ago by cyberbeing

A few months ago, the subtitles in that sample didn't display at all in either the MPC-HC ISR or VSFilter 2.41. Because of some semi-recent changes to the DVB code @ MPC-HC, they now display correctly in the MPC-HC ISR, but display incorrectly in MPC-HC VSFilter 2.41.

Using MPC-HC VSFilter 2.41 r5672 from the external filters built by xhmikosr:
YV12 output has a wrap-around effect, with blue on the left side.
YUY2 output doesn't display anything.
RGB32 output has a wrap-around effect, but with normal black on the left side.

What needs to be fixed, is the recent changes to the MPC-HC DVB code over the past few months, which seem to have broken output in VSFilter with the sample provided by romulous.

Though at this point the question is, what exactly is causing this issue?

Is is a bug in the DVB parsing code?

Is it a bug with how the DVB code changes were integrated into VSFilter?

Is it a bug in the MPC-HC MPEG-2 TS splitter?

Was a workaround created for the MPC-HC ISR by not for VSFilter?

I'm suspecting it has something to do with that sample being anamorphic. Could the DVB code base rendering and wrapping on the final anamorphic stretched 1024x576, and that breaks VSFilter considering it needs to render directly to the 544x576 source frame unlike the ISR? This is just a guess though.

comment:3 Changed 8 years ago by Underground78

VSFilter wasn't modified for this change, it uses the same code than the ISR to parse the DVB subtitles. I would guess that the changes in the DVB parsing code (which is now much more correct than it used to be) made visible an older bug in VSFilter.

Your intuition might be correct, not sure if we can get a non-anamorphic sample to test that.

comment:4 Changed 8 years ago by cyberbeing

It does appear to be related how the DVB code handles anamorphic video. If I resize the video from 544x576 to 1024x576 in FFDShow, VSFilter 2.41 renders correctly to the 1024x576 frame.

VSFilter output to 1024x576 actually looks considerably better (sharper, retains positioning data?) than the MPC-HC ISR @ 1024x576. This likely means there is a DVB display bug for this sample with the ISR as well.

comment:5 Changed 8 years ago by cyberbeing

What resolution are DVB-T subtitles stored at? 720x576? If I resize the 544x576 video to 720x576, VSFilter seems to have the non-positioned main dialog line correctly centered. So it would now seem the issue is similar to that with PGS subtitles and VSFilter, where we may have a subtitle resolution which is greater than the video resolution. If that's the case, this may not be something easily solved unless someone implements a PGS and DVB scaler for VSFilter.

This suggests that the reason why the MPC-HC ISR is blurry with different positioning, is because the subtitles are being scaled from 720x576 to 1024x576?

comment:6 Changed 8 years ago by Underground78

I think the DVB subtitles are stored at the resolution of the source so probably 720x576. So I guess you're right about what is the issue.

comment:7 Changed 8 years ago by cyberbeing

Though in this case the broadcast video is actually 544x576 16:9 anamorphic.

Do you think this is something MPC-HC can fix? Thinking about it a bit more, the situation seems a bit different than PGS, since the subs cut-off on the right are wrapping to the left. It would seem that DVB subtitles are output as blocks, instead of an entire video frame like PGS. This means it should be possible to reposition them within the source video frame? How is positioning data currently relayed for DVB subtitles?

I looked it up, and it appears there is also something called the Display Definition Segement (DDS) which defines the valid area for DVB subtitles to be rendered. If DDS is not present, 720x576 is assumed. Does the MPC-HC DVB parser have 720x576 hardcoded somewhere? Could the parser be modified to allow overriding the DDS to the source video frame?

comment:8 Changed 8 years ago by Underground78

I will try to have a look but probably that won't be before this week-end.

comment:9 Changed 8 years ago by romulous

One of the people who is affected by this issue has provided some more sample files if required:
https://skydrive.live.com/embed?cid=440B69D95A3B292F&resid=440B69D95A3B292F%21226&authkey=AP8sQHM91yd0SpA

Some explanatory details of the recordings here:
http://forum.inmatrix.com/index.php?showtopic=13639&#entry51587

comment:11 Changed 5 years ago by kasper93

Cc: Underground78 removed
Component: GeneralSubtitles
Milestone: next release placeholder
Owner: set to kasper93
Status: newassigned

Refs: #5278

comment:12 Changed 5 years ago by kasper93

Resolution: fixed
Status: assignedclosed

In 79cba12:

CMemSubPic: Resize subpic to fit into video frame.

This resolves issues with anamorphic videos for VSFilter.

Fixes #2516

comment:13 Changed 5 years ago by kasper93

Milestone: next release

Will be in the nightly builds as of revision 1.7.8.73.

comment:14 Changed 5 years ago by thevbm

Milestone: next release1.7.9

Milestone renamed

Note: See TracTickets for help on using tickets.