Opened 19 years ago

Closed 19 years ago

Last modified 10 years ago

#287 closed enhancement (fixed)

XvMC decoding, MPEG2 stream recognized as MPEG1

Reported by: jung@… Owned by: danielk
Priority: minor Milestone: 0.19
Component: mythtv Version: head
Severity: low Keywords: XvMC MPEG1 MPEG2
Cc: Ticket locked: no

Description (last modified by danielk)

Whenever a XvMC is used, it sometimes works and sometimes it does not, I have found that when the same DVB-C (ts) stream is recognized as MPEG1 the XvMC-hardware decoding does not work ( AVFD: Stream #0, has id 0x33 codec id MPEG1VIDEO, type Video at 0x0x82a95a0 ), but when the same stream is recognized as MPEG2 everything works.( AVFD: Stream #0, has id 0x215 codec id MPEG2VIDEO, type Video at 0x0x827e940 )

Debug output attached.

Attachments (3)

debug-broken.txt (89.6 KB) - added by jung@… 19 years ago.
debug txt-files, for easier reading
debug-worked.txt (55.3 KB) - added by jung@… 19 years ago.
debug txt-files, for easier reading (working)
mpeg1-hack.patch (981 bytes) - added by danielk 19 years ago.

Download all attachments as: .zip

Change History (11)

comment:1 Changed 19 years ago by danielk

Description: modified (diff)
Owner: changed from Isaac Richards to danielk
Priority: criticalminor
Status: newassigned

comment:2 Changed 19 years ago by danielk

Milestone: 0.19
Severity: mediumlow
Type: defectenhancement

It looks like the transmitter is marking an MPEG-2 stream as a MPEG-1 stream, since libav can handle MPEG-1 in the MPEG-2 decoder it should be easy to work around this problem with the channel. I just want to check if this will break libmpeg first.

But you should notify the engineers at that broadcaster of their problem.

comment:3 Changed 19 years ago by jung@…

But why the stream is sometimes recognized as MPEG1 and sometimes MPEG2. This happens on all of my channels. That's a little wierd if it's a broadcasters problem..

Changed 19 years ago by jung@…

Attachment: debug-broken.txt added

debug txt-files, for easier reading

Changed 19 years ago by jung@…

Attachment: debug-worked.txt added

debug txt-files, for easier reading (working)

Changed 19 years ago by danielk

Attachment: mpeg1-hack.patch added

comment:4 Changed 19 years ago by danielk

Description: modified (diff)

Can you try the attached patch, it should fix the problem without breaking anything if I have diagnosed the problem correctly.

comment:5 Changed 19 years ago by jung@…

Resolution: worksforme
Status: assignedclosed

works like a charm with the XvMC on, and all of the other freezes went away too, and channel locks every time now. Great work that little hack.

comment:6 Changed 19 years ago by danielk

Resolution: worksformefixed

(In [7212]) Fixes #287.

Some channels report MPEG1 when they are really transmitting MPEG2.

This forces MythTV to treat all MPEG1 streams as MPEG2 streams when using XvMC. Since libav only supports MPEG2 XvMC and not MPEG1 XvMC this shouldn't hurt anyone. Theoretically someone might have MPEG1 XvMC acceleration and not MPEG2 XvMC accelleration, but even so we wouldn't support XvMC on that configuration anyway bwcause of the libav limitation.

comment:7 Changed 10 years ago by Jean-Yves Avenard <jyavenard@…>

In fee00c36f79dd06432392dd9d4891efc5d253fd2/mythtv:

Remove hack forcing MPEG1 video to be treated as MPEG2

This hack was added to fix #287, which was a problem with XvMC decoding.
It makes no sense today, and actually break genuine MPEG1 videos.

Fixes #12160

comment:8 Changed 10 years ago by Jean-Yves Avenard <jyavenard@…>

In 0a560205c40b4698732b97ac479415fb3494f240/mythtv:

Remove hack forcing MPEG1 video to be treated as MPEG2

This hack was added to fix #287, which was a problem with XvMC decoding.
It makes no sense today, and actually break genuine MPEG1 videos.

Fixes #12160

(cherry picked from commit fee00c36f79dd06432392dd9d4891efc5d253fd2)

Note: See TracTickets for help on using tickets.