Mailing List Archive

Jumpy video playback
Hi Mark,

My MythTV production system recorded this weekend a program that does
not play back correct on my frontend with the Nvidia GT520 (driver
version 340).
It looks to me that the frame ordering is not correct; it jumps every second.
The complete recording of 10GB has this when played to the end.
However, if I cut off the first GB or so from the file then what
remains plays perfect.
Also, when I play it back on my development system (Intel only) then
the playback is smooth.
If you are interested then I can send you the file (or the first 100MB of it).
Please let me know and also how you want it (WeTransfer or gmail
attachment is what I use most of the time).

Groetjes,
Klaas.
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Jumpy video playback [ In reply to ]
On 1/9/20 5:36 PM, Klaas de Waal wrote:
> Hi Mark,
>
> My MythTV production system recorded this weekend a program that does
> not play back correct on my frontend with the Nvidia GT520 (driver
> version 340).
> It looks to me that the frame ordering is not correct; it jumps every second.
> The complete recording of 10GB has this when played to the end.
> However, if I cut off the first GB or so from the file then what
> remains plays perfect.
> Also, when I play it back on my development system (Intel only) then
> the playback is smooth.
> If you are interested then I can send you the file (or the first 100MB of it).
> Please let me know and also how you want it (WeTransfer or gmail
> attachment is what I use most of the time).
>
> Groetjes,
> Klaas.
> _______________________________________________
>

I have noticed this type of behavior, but only on some reruns of
Midsomer Murders from early 2000's. It is especially bad on the
"Ovation" channel. I suspect some issue with the source, particularly
since I saw similar things when watching Midsomer Murders on Amazon
Prime with the prime app on NVidia Shield.


Peter
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Jumpy video playback [ In reply to ]
On Sat, 11 Jan 2020 at 01:18, Peter Bennett <pb.mythtv@gmail.com> wrote:

>
>
> On 1/9/20 5:36 PM, Klaas de Waal wrote:
> > Hi Mark,
> >
> > My MythTV production system recorded this weekend a program that does
> > not play back correct on my frontend with the Nvidia GT520 (driver
> > version 340).
> > It looks to me that the frame ordering is not correct; it jumps every
> second.
> > The complete recording of 10GB has this when played to the end.
> > However, if I cut off the first GB or so from the file then what
> > remains plays perfect.
> > Also, when I play it back on my development system (Intel only) then
> > the playback is smooth.
> > If you are interested then I can send you the file (or the first 100MB
> of it).
> > Please let me know and also how you want it (WeTransfer or gmail
> > attachment is what I use most of the time).
> >
> > Groetjes,
> > Klaas.
> > _______________________________________________
> >
>
> I have noticed this type of behavior, but only on some reruns of
> Midsomer Murders from early 2000's. It is especially bad on the
> "Ovation" channel. I suspect some issue with the source, particularly
> since I saw similar things when watching Midsomer Murders on Amazon
> Prime with the prime app on NVidia Shield.
>
>
> Peter
> _______________________________________________
>
> I got a bit further on this; the problem is in the frame rate!
It looks like that the recording is incorrectly identified as 24Hz instead
of as 50Hz.

When everything is OK it works like this as I understand it:
(1) Broadcast signal is 50Hz interlaced
(2) The playback info box shows this as 25.00fps
(3) De-interlacing then generates 50 fps.
(4) The Nvidia driver is set to 50Hz by MythTV/xrandr
(5) This is shown in the System Status / Display box (very useful new
addition)
(6) The actual framerate is also shown on my TV as 50Hz

With the problematic recording steps (1) to (3) are the same.
The difference is:
(4) The Nvidia driver is set to 23.98Hz by MythTV/xrandr
(5) This is shown in the System Status / Display box (very useful new
addition)
(6) The actual framerate is also shown on my TV as 50Hz

When the first 10 megabytes of the recording are removed then the playback
is correct.

This happened twice in the last two weeks in about 100 recordings or so.
The broken recording is created with multirec; the previous recording on
that
channel was still running at the moment the new recording started.
I have also in the past observed that the start of playback of recordings
created
by multirec has sometimes blocks.

My tentative conclusion at this moment is:
- there is something not correct in the first 10MB of the file
- the frame rate is obtained from the first 10MB of the file
- this frame rate is used to set the Nvidia with xrandr
- later the correct frame rate is obtained as shown in the playback box
- but the Nvidia framerate setting is never updated

Klaas.
Re: Jumpy video playback [ In reply to ]
On Sun, 12 Jan 2020 at 10:43, Klaas de Waal <klaas.de.waal@gmail.com> wrote:

>
>
> On Sat, 11 Jan 2020 at 01:18, Peter Bennett <pb.mythtv@gmail.com> wrote:
>
>>
>>
>> On 1/9/20 5:36 PM, Klaas de Waal wrote:
>> > Hi Mark,
>> >
>> > My MythTV production system recorded this weekend a program that does
>> > not play back correct on my frontend with the Nvidia GT520 (driver
>> > version 340).
>> > It looks to me that the frame ordering is not correct; it jumps every
>> second.
>> > The complete recording of 10GB has this when played to the end.
>> > However, if I cut off the first GB or so from the file then what
>> > remains plays perfect.
>> > Also, when I play it back on my development system (Intel only) then
>> > the playback is smooth.
>> > If you are interested then I can send you the file (or the first 100MB
>> of it).
>> > Please let me know and also how you want it (WeTransfer or gmail
>> > attachment is what I use most of the time).
>> >
>> > Groetjes,
>> > Klaas.
>> > _______________________________________________
>> >
>>
>> I have noticed this type of behavior, but only on some reruns of
>> Midsomer Murders from early 2000's. It is especially bad on the
>> "Ovation" channel. I suspect some issue with the source, particularly
>> since I saw similar things when watching Midsomer Murders on Amazon
>> Prime with the prime app on NVidia Shield.
>>
>>
>> Peter
>> _______________________________________________
>>
>> I got a bit further on this; the problem is in the frame rate!
> It looks like that the recording is incorrectly identified as 24Hz instead
> of as 50Hz.
>
> When everything is OK it works like this as I understand it:
> (1) Broadcast signal is 50Hz interlaced
> (2) The playback info box shows this as 25.00fps
> (3) De-interlacing then generates 50 fps.
> (4) The Nvidia driver is set to 50Hz by MythTV/xrandr
> (5) This is shown in the System Status / Display box (very useful new
> addition)
> (6) The actual framerate is also shown on my TV as 50Hz
>
> With the problematic recording steps (1) to (3) are the same.
> The difference is:
> (4) The Nvidia driver is set to 23.98Hz by MythTV/xrandr
> (5) This is shown in the System Status / Display box (very useful new
> addition)
> (6) The actual framerate is also shown on my TV as 50Hz
>
> When the first 10 megabytes of the recording are removed then the playback
> is correct.
>
> This happened twice in the last two weeks in about 100 recordings or so.
> The broken recording is created with multirec; the previous recording on
> that
> channel was still running at the moment the new recording started.
> I have also in the past observed that the start of playback of recordings
> created
> by multirec has sometimes blocks.
>
> My tentative conclusion at this moment is:
> - there is something not correct in the first 10MB of the file
> - the frame rate is obtained from the first 10MB of the file
> - this frame rate is used to set the Nvidia with xrandr
> - later the correct frame rate is obtained as shown in the playback box
> - but the Nvidia framerate setting is never updated
>
>
> Typo correction: with the problematic recording the TV shows the actual
frame rate as 24Hz.
Re: Jumpy video playback [ In reply to ]
On Sun, 12 Jan 2020 at 09:44, Klaas de Waal <klaas.de.waal@gmail.com> wrote:
> I got a bit further on this; the problem is in the frame rate!
> It looks like that the recording is incorrectly identified as 24Hz instead of as 50Hz.
>
> When everything is OK it works like this as I understand it:
> (1) Broadcast signal is 50Hz interlaced
> (2) The playback info box shows this as 25.00fps
> (3) De-interlacing then generates 50 fps.
> (4) The Nvidia driver is set to 50Hz by MythTV/xrandr
> (5) This is shown in the System Status / Display box (very useful new addition)
> (6) The actual framerate is also shown on my TV as 50Hz

That's a fair summary of how it should work.

> With the problematic recording steps (1) to (3) are the same.
> The difference is:
> (4) The Nvidia driver is set to 23.98Hz by MythTV/xrandr
> (5) This is shown in the System Status / Display box (very useful new addition)
> (6) The actual framerate is also shown on my TV as 50Hz

I'm not sure how we can set 23.98Hz but the display still shows 50Hz -
unless the xrandr call failed (anything in the logs?)

But more importantly - if the video is detected as 25.00fps
(regardless of interlacing) - why is it trying 23.98?

> When the first 10 megabytes of the recording are removed then the playback is correct.
>
> This happened twice in the last two weeks in about 100 recordings or so.
> The broken recording is created with multirec; the previous recording on that
> channel was still running at the moment the new recording started.
> I have also in the past observed that the start of playback of recordings created
> by multirec has sometimes blocks.

Multirect aside - the playback code should hopefully handle modest
corruption issues.

> My tentative conclusion at this moment is:
> - there is something not correct in the first 10MB of the file
> - the frame rate is obtained from the first 10MB of the file
> - this frame rate is used to set the Nvidia with xrandr
> - later the correct frame rate is obtained as shown in the playback box
> - but the Nvidia framerate setting is never updated

Sounds very plausible.

thanks and regards
Mark
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Jumpy video playback [ In reply to ]
Hi Mark,

File with the first 128MB of the "Jumpy video playback" recording is sent.

I'm not sure how we can set 23.98Hz but the display still shows 50Hz -
> unless the xrandr call failed (anything in the logs?)
>
> But more importantly - if the video is detected as 25.00fps
> (regardless of interlacing) - why is it trying 23.98?
>

I did make a mistake in my email (and tried to correct it later on...).
When the Information Center / System Status / Display shows 23.98Hz then my
TV shows 24Hz.

This corruption does not happen often; the weekend of 4/5 January it
happened on two recordings but after that I have not seen it anymore. But
this is with a generally rock-solid near-perfection cable signal. There
will be more often corrupted files with DVB-T/T2 recordings done with
antenna's.

The way to view the actual display fps is now to stop watching the
recording and go to the Information Center / System Status and select the
Display tab. The Nvidia driver keeps the last fps setting it has received
and hence it is possible to see what it was when playing the video.

Feature Request: It would be great for debugging if the driver fps value
was displayed in the Playback Menu / Playback / Playback Data box. There is
already an additional line that shows the Deint settting so there is
already space for a "Display fps" setting to the right of it........

Groetjes,
Klaas.
Re: Jumpy video playback [ In reply to ]
On Tue, 14 Jan 2020 at 20:54, Klaas de Waal <klaas.de.waal@gmail.com> wrote:
>
> Hi Mark,
>
> File with the first 128MB of the "Jumpy video playback" recording is sent.

Many thanks.

My nvidia box is down at the moment but it plays back fine with all
variations of decoders etc on my main intel dev machine (not using
xrandr).

The problem is this line in the log:-

2020-01-14 22:04:58.228867 I [22455/22591] Decoder
decoders/avformatdecoder.cpp:1363:normalized_fps AFD: Selected FPS:
23.6667 (Avg:23.6667 Mult:1 Codec:0 Container:90000 Estimated:25)

The initial rate detection is wrong but it is very quickly corrected -
but in the meantime the display mode is switched to support the
incorrect rate.

I'll check the frame rate detection again - but that piece of code is
extremely 'sensitive'.

I can however see that MythVideoOutput won't act on the change in
frame rate if there are no other parameter changes at the same time -
so that can be fixed. Just need to guard against spurious changes as
changing video mode frequently is a recipe for disaster:)

> This corruption does not happen often; the weekend of 4/5 January it happened on two recordings but after that I have not seen it anymore. But this is with a generally rock-solid near-perfection cable signal. There will be more often corrupted files with DVB-T/T2 recordings done with antenna's.

Possibly the same issue as https://code.mythtv.org/trac/ticket/13543 ?

> The way to view the actual display fps is now to stop watching the recording and go to the Information Center / System Status and select the Display tab. The Nvidia driver keeps the last fps setting it has received and hence it is possible to see what it was when playing the video.

With xrandr/mode switching, we always just keep the last video mode as
long as the resolution is the same as the GUI mode - i.e. we assume it
doesn't matter what refresh rate the GUI is using. This saves a lot of
mode switches if you primarily watch 'local' broadcast material -
which will usually be the same frame rate.

> Feature Request: It would be great for debugging if the driver fps value was displayed in the Playback Menu / Playback / Playback Data box. There is already an additional line that shows the Deint settting so there is already space for a "Display fps" setting to the right of it........

The problem with the debugging screen is it is starting to have a
negative impact on performance - it has gradually got more complicated
and the code to populate the fields is, iirc, not cheap.

I've been mulling over a change to split it into different screens
that you can cycle through with repeated key presses - but that
doesn't work if you bring up the debug screen from the main playback
menu...

As an aside, I always like to use the tv itself to check what refresh
rate it thinks it's using - that has cleared up some confusion on a
number of occasions but not all displays have this functionality.

Thanks and regards
Mark
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Jumpy video playback [ In reply to ]
Hi Mark,

I tested with the master of yesterday evening and video playback is OK now.
TV stays at 50Hz.

Thanks,
Klaas.
Re: Jumpy video playback [ In reply to ]
Hi Mark,

I have a video playback problem with last Sunday's master and my Nvidia
living room system when playing Eurosport recordings.
When I have selected "NVIDIA VDPAU acceleration" then I can jump forward
and backward and the picture is perfect.
However, when I have selected "NVIDIA NVDEC acceleration" then after every
jump there is a short period, about 0.2 seconds, of distorted picture.
The interesting thing is that I have this on all recordings of the
Eurosport channels but not on any of the other channels that I watch from
the same cable source. This could possibly be related to differences in
video coding, GOP etc, but I have not dived into that.
You should be able to reproduce this with the Eurosport stream that I have
mailed earlier.

Thanks,
Klaas.
Re: Jumpy video playback [ In reply to ]
On 27/01/2020 17:54, Klaas de Waal wrote:
> Hi Mark,
>
> I have a video playback problem with last Sunday's master and my
> Nvidia living room system when playing Eurosport recordings.
> When I have selected "NVIDIA VDPAU acceleration" then I can jump
> forward and backward and the picture is perfect.
> However, when I have selected "NVIDIA NVDEC acceleration" then after
> every jump there is a short period, about 0.2 seconds, of distorted
> picture.
> The interesting thing is that I have this on all recordings of the
> Eurosport channels  but not on any of the other channels that I watch
> from the same cable source. This could possibly be related to
> differences in video coding, GOP etc, but I have not dived into that.
> You should be able to reproduce this with the Eurosport stream that I
> have mailed earlier.
>
> Thanks,
> Klaas.
>
>
>
Just tried some UK HD (H.264) recordings using NVDEV Normal on my system
(was using VDPAU High Quality)  GeForce GTX 1050 Ti/PCIe/SSe2, with
NVIDIA 435.21 driver and I am also seeing the short distortion on
forward and backward skips. No distortion with UK SD (MPEG-2). VDPAU
High Quality has no distortions on either HD or SD.

MythTV Version : v31-Pre-1824-g284185a6d4
MythTV Branch : master
Network Protocol : 91
Library API : 31.20200101-1
QT Version : 5.9.5
Options compiled in:
 linux profile use_hidesyms using_alsa using_oss using_pulse
using_pulseoutput using_backend using_bindings_perl
using_bindings_python using_bindings_php using_dvb using_firewire
using_frontend using_hdhomerun using_vbox using_ceton using_hdpvr
using_ivtv using_joystick_menu using_libcec using_libcrypto
using_libdns_sd using_libfftw3 using_libxml2 using_lirc using_mheg
using_opengl using_egl using_qtwebkit using_qtscript using_qtdbus
using_taglib using_v4l2 using_v4l2prime using_x11
using_libbluray_external using_xrandr using_profiletype
using_systemd_notify using_systemd_journal using_drm using_bindings_perl
using_bindings_python using_bindings_php using_freetype2
using_mythtranscode using_opengl using_opengles using_egl using_drm
using_vaapi using_nvdec using_vdpau using_ffmpeg_threads using_mheg
using_libass using_libxml2


Mike


_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Jumpy video playback [ In reply to ]
On Mon, 27 Jan 2020 at 17:55, Klaas de Waal <klaas.de.waal@gmail.com> wrote:
>
> Hi Mark,
>
> I have a video playback problem with last Sunday's master and my Nvidia living room system when playing Eurosport recordings.
> When I have selected "NVIDIA VDPAU acceleration" then I can jump forward and backward and the picture is perfect.
> However, when I have selected "NVIDIA NVDEC acceleration" then after every jump there is a short period, about 0.2 seconds, of distorted picture.
> The interesting thing is that I have this on all recordings of the Eurosport channels but not on any of the other channels that I watch from the same cable source. This could possibly be related to differences in video coding, GOP etc, but I have not dived into that.
> You should be able to reproduce this with the Eurosport stream that I have mailed earlier.

Hi Klaas

Yes - I can reproduce the issue with your sample - and with others.

Is this definitely a new problem? My memory is hazy (so many test
samples, so many setups!) - but I seem to remember seeing this before.

Thanks and regards
Mark
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Jumpy video playback [ In reply to ]
On Mon, 27 Jan 2020 at 18:26, Mike Bibbings <mike.bibbings@gmail.com> wrote:
> Just tried some UK HD (H.264) recordings using NVDEV Normal on my system
> (was using VDPAU High Quality) GeForce GTX 1050 Ti/PCIe/SSe2, with
> NVIDIA 435.21 driver and I am also seeing the short distortion on
> forward and backward skips. No distortion with UK SD (MPEG-2). VDPAU
> High Quality has no distortions on either HD or SD.

Mike

As a slight aside, are you seeing any issues with the 435.21 driver? I
noticed a regression in VP9 (4k) playback when I reinstalled ubuntu
last week and in testing Klaas' issue I reverted to 430 and the
problem resolved itself.

Thanks and regards
Mark
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Jumpy video playback [ In reply to ]
Hi Mark,

>
> Yes - I can reproduce the issue with your sample - and with others.
>
> Is this definitely a new problem? My memory is hazy (so many test
> samples, so many setups!) - but I seem to remember seeing this before.
>
> To me this is a new problem as this is the first time I used NVDEC, having
now a GT1030 card that does support it.
FYI, the driver is version 440.44.

Thanks,
Klaas.
Re: Jumpy video playback [ In reply to ]
On 27/01/2020 20:11, Mark Kendall wrote:
> On Mon, 27 Jan 2020 at 18:26, Mike Bibbings <mike.bibbings@gmail.com> wrote:
>> Just tried some UK HD (H.264) recordings using NVDEV Normal on my system
>> (was using VDPAU High Quality) GeForce GTX 1050 Ti/PCIe/SSe2, with
>> NVIDIA 435.21 driver and I am also seeing the short distortion on
>> forward and backward skips. No distortion with UK SD (MPEG-2). VDPAU
>> High Quality has no distortions on either HD or SD.
> Mike
>
> As a slight aside, are you seeing any issues with the 435.21 driver? I
> noticed a regression in VP9 (4k) playback when I reinstalled ubuntu
> last week and in testing Klaas' issue I reverted to 430 and the
> problem resolved itself.
>
> Thanks and regards
> Mark
> _______________________________________________


Mark,

Not seeing any other issues with 4.35.21 driver, my usage is very basic
only LiveTV/Recordings.

On my main system, distortions with forward and backwards skips happen
for HD (H.264) with display set to 3840x2160@50Hz or 1920x1080@50Hz
using NVDEC NVIDIA 435.21 and  NVIDIA 430.50 drivers.

I also tried it on my laptop, seeing forward and backwards skip
distortions, display 1920x1080 @60Hz with UK HD (H.264) playback using NVDEC

GeForce GTX 960M/PCIe/SSE2

4.6.0 NVIDIA 430.50 and 4.6.0 NVIDIA 435.21 drivers

Using VDPAU High Quality, no distortions.


Mike

_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Jumpy video playback [ In reply to ]
On Tue, 28 Jan 2020 at 10:57, Mike Bibbings <mike.bibbings@gmail.com> wrote:
> Mark,
>
> Not seeing any other issues with 4.35.21 driver, my usage is very basic
> only LiveTV/Recordings.

Thanks Mike - looks like the problem is only VP9 material - perhaps
related to the new AV sync code.

> On my main system, distortions with forward and backwards skips happen
> for HD (H.264) with display set to 3840x2160@50Hz or 1920x1080@50Hz
> using NVDEC NVIDIA 435.21 and NVIDIA 430.50 drivers.
>
> I also tried it on my laptop, seeing forward and backwards skip
> distortions, display 1920x1080 @60Hz with UK HD (H.264) playback using NVDEC
>
> GeForce GTX 960M/PCIe/SSE2
>
> 4.6.0 NVIDIA 430.50 and 4.6.0 NVIDIA 435.21 drivers
>
> Using VDPAU High Quality, no distortions.

I'm fairly sure this is the same issue that John P reported a while
back. From memory I confirmed the same issue exists in other players
(not all FFmpeg based) - which seemed to indicate it is a cuda/nvdec
internal issue. I certainly see no errors reported in the logs.

Regards
Mark
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org