Modify

Opened 8 months ago

Last modified 8 months ago

#12986 new Bug Report - General

Distorted video when recording (but audio is fine)

Reported by: WilliamDeRieux@… Owned by: jyavenard
Priority: critical Milestone: 0.28.2
Component: MythTV - Recording Version: 0.28.0
Severity: high Keywords:
Cc: Ticket locked: no

Description

I have been using the following git commit since Oct 22, 2016: https://github.com/MythTV/mythtv/commit/7f8f1688e882cd0587097fe4867e20d8fa122cce

I just verified that the issue does not exist with that revision.

However, I updated on Jan 29, 2017 to commit https://github.com/MythTV/mythtv/commit/15cc3137243e39058e95b44e85b468807217fae5

Somewhere after the commit on Oct 22....the video became distorted -- also this is on the Fixes/0.28 branch

I also checked to make sure that the video source and/or capture card was working correctly. I was able to get correct video through bolth an external monitor and through mplayer.

I'm using an Analog Capture card over Composite-video with an ATI TV Wonder Pro 500.

I've marked this as Critical with a high severity because MythTV cannot record any watchable video (unless you just want the audio).

Again it works correctly as of Oct 22, 2016: https://github.com/MythTV/mythtv/commit/7f8f1688e882cd0587097fe4867e20d8fa122cce

I have a screenshot of what the distortion looks like here: https://www.dropbox.com/s/3gem712i9fj79rd/mythtv_distorted_video.png?dl=0

Attachments (0)

Change History (5)

comment:1 in reply to: ↑ description ; follow-up: Changed 8 months ago by WilliamDeRieux@…

Replying to WilliamDeRieux@…:

I have been using the following git commit since Oct 22, 2016: https://github.com/MythTV/mythtv/commit/7f8f1688e882cd0587097fe4867e20d8fa122cce

I just verified that the issue does not exist with that revision.

However, I updated on Jan 29, 2017 to commit https://github.com/MythTV/mythtv/commit/15cc3137243e39058e95b44e85b468807217fae5

Somewhere after the commit on Oct 22....the video became distorted -- also this is on the Fixes/0.28 branch

I also checked to make sure that the video source and/or capture card was working correctly. I was able to get correct video through bolth an external monitor and through mplayer.

I'm using an Analog Capture card over Composite-video with an ATI TV Wonder Pro 500.

I've marked this as Critical with a high severity because MythTV cannot record any watchable video (unless you just want the audio).

Again it works correctly as of Oct 22, 2016: https://github.com/MythTV/mythtv/commit/7f8f1688e882cd0587097fe4867e20d8fa122cce

I have a screenshot of what the distortion looks like here: https://www.dropbox.com/s/3gem712i9fj79rd/mythtv_distorted_video.png?dl=0

I believe this may be related to ticket #12479 since the video distortion is similar, but involves live TV and not when using mythtranscode.

As suggested in that ticket I am reverting the changes in my working copy from https://github.com/MythTV/mythtv/commit/db5c40cfc14dcca456446fe059b01fe90211dd60 and will test if this issues goes away.

comment:2 in reply to: ↑ 1 Changed 8 months ago by WilliamDeRieux@…

Replying to WilliamDeRieux@…:

I believe this may be related to ticket #12479 since the video distortion is similar, but involves live TV and not when using mythtranscode.

As suggested in that ticket I am reverting the changes in my working copy from https://github.com/MythTV/mythtv/commit/db5c40cfc14dcca456446fe059b01fe90211dd60 and will test if this issues goes away.

Yes, the issue was indeed resolved by reverting the changes made by commit: https://github.com/MythTV/mythtv/commit/db5c40cfc14dcca456446fe059b01fe90211dd60

comment:3 Changed 8 months ago by WilliamDeRieux@…

Also commit: https://github.com/MythTV/mythtv/commit/db5c40cfc14dcca456446fe059b01fe90211dd60

states:

Create pitch/strides that are a multiple of 32 bytes
Allows all lines in a frame to be 16-bytes aligned

I really don't understand how a value of 64 was determined...

mythframe.h:
------------------------
static inline void init(VideoFrame *vf, VideoFrameType _codec,
                        unsigned char *_buf, int _width, int _height, int _size,
                        const int *p = 0,
                        const int *o = 0,
                        float _aspect = -1.0f, double _rate = -1.0f,
                        int _aligned = 64) MUNUSED;

static inline uint buffersize(VideoFrameType type, int width, int height,
                              int _aligned = 64)

videobuffers.h
------------------------
  public:
    YUVInfo(uint w, uint h, uint size, const int *p, const int *o,
            int aligned = 64);

I would think that maximum alignment would be 32 (since using a value greater than 32 causes the issue)

Both of these will work (and the distorted video when recording and/or watching live tv no longer occurs):

mythframe.h:
------------------------
static inline void init(VideoFrame *vf, VideoFrameType _codec,
                        unsigned char *_buf, int _width, int _height, int _size,
                        const int *p = 0,
                        const int *o = 0,
                        float _aspect = -1.0f, double _rate = -1.0f,
                        int _aligned = 0) MUNUSED;

static inline uint buffersize(VideoFrameType type, int width, int height,
                              int _aligned = 16)

videobuffers.h
------------------------
  public:
    YUVInfo(uint w, uint h, uint size, const int *p, const int *o,
            int aligned = 0);
mythframe.h:
------------------------
static inline void init(VideoFrame *vf, VideoFrameType _codec,
                        unsigned char *_buf, int _width, int _height, int _size,
                        const int *p = 0,
                        const int *o = 0,
                        float _aspect = -1.0f, double _rate = -1.0f,
                        int _aligned = 32) MUNUSED;

static inline uint buffersize(VideoFrameType type, int width, int height,
                              int _aligned = 32)

videobuffers.h
------------------------
  public:
    YUVInfo(uint w, uint h, uint size, const int *p, const int *o,
            int aligned = 32);

comment:4 Changed 8 months ago by stuarta

  • Milestone changed from 0.28.1 to 0.28.2

Moving remaining open 0.28.1 tickets to 0.28.2

comment:5 Changed 8 months ago by WilliamDeRieux@…

Commit #: db5c40cfc14dcca456446fe059b01fe90211dd60 was committed on Jun 26, 2014 (~ 2 years ago)

I believe that these commits might be responsible for exposing this 2 year old bug (since it worked correctly on Oct 22, 2016 and the following commits were made on Nov 22, 2016).

Again these are on the fixes/0.28 branch...

261858dc9db063c84e0e462e5111c98c4a18a38e (Properly handle stride size when transcoding) f513db7548ba14ed52fda13fa1108b478dbf0c23 (Properly handle stride size when transcoding in fifo mode)
825d528a6ec42103c600b8991613f4f6b3d19775 (Fix FIFO transcoding) 5bf021a477e998267ee1ebd2f09c39b96962ebb2 (Fix RTjpeg transcoding) 49ef81ea4c31dea3140fc3c0f69423660b2e5900 (Fixes transcoding when decoder doesn't ouput YUV420 frame)

Mainly because the code uses the buffersize() function instead of hard-coding the math.

Add Comment

Modify Ticket

Action
as new The owner will remain jyavenard.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.