Are both SD and HD files interlaced? (or just the SD ones)?
Do they both report hw decode?
Are both SD and HD files interlaced? (or just the SD ones)?
Do they both report hw decode?
Run "perf top" when it's laggy. Leave for a minute to settle.
If you see "vc4_atomic_commit_tail"/"clk_request_start" appearing in list (and increasing in percentage), then you have the same issue.
I don't think LE has updated Pi kernel too recently, so you'll have to wait for that to happen, and then you can test a nightly.
camelreef what you describe sounds like a problem I encountered (not with kodi) where kernel gradually consumes more and more cpu.
This was due to a leak on a linked list (we only added, never removed items), meaning searching the linked list got slower with time.
https://github.com/raspberrypi/linux/pull/4940 fixed it (not directly, but it reverted and replaced the code with the bug).
Can you play the MPEG2-SD file locally (e.g. copy to sdcard or usb stick and play from there?)
We need to determine if it's a network issue, or decode issue.
How is Pi connected to NAS? Fully wired or wireless? SMB/NFS/other?
An iperf test may be useful between Pi3 and NAS.
Are you using built in SMB/NFS/other support or OS support (e.g. mounting network drive outside of kodi then playing from there).
Ok, bug is about 3 year old, so I guess there is not a lot interest in fixing it (too bad, given it is easily reproductible).
On the bug page, someone mentions disabling MMAL acceleration avoids the issue. How do you disable this acceleration (and is it even feasible on RPi 4)?
MMAL has gone. The bug appears to be a buffer overwrite (e.g. buffer allocated is smaller than amount written).
But they tend to have fairly random symptoms - often changing something unrelated (like disabling MMAL) may make the issue appear or disappear.
There are some known issues with seeking with TrueHD.
No solution (but it seems a bit random so some configurations get hit more than others).
Thanks madalone. I don't see any auto turn on in CEC settings.
Disable CEC completely and see if issue still occurs. That will narrow down whether it is CEC related or not.
Post mediainfo of a file with the issue
Are you connecting to the display through hdmi or composite (shared with headphones socket)?
Sorry for the long delay, life got in the way. I'm working on this issue, but the command getedid is not found. I'm using 9.2.8 on a RPI4. I tried adding the lines hdmi_group=1 hdmi_mode=16 to the config.txt but the device is still booting into 4k on the known good TV I'm working with. My plan is to get a good EDID from this TCL TV I have and then set it so it works on the picky Samsung unit, not sure if you think this is a good idea or not. I tried searching the edid commands for LE9 but I haven't found anything useful. Thanks for the help.
LE 9 is no longer updated. I'd suggest trying LE10 and seeing if that has the issue (and it will support getedid).
No definite ideas, but if it were me I'd try:
I would carefully check for any CEC settings in AVR menu and TV menu.
TV seems more likely to be setup correctly as it's working with a direct connection, but may have different configuration per HDMI port.
Try different hdmi ports on AVR and TV.
Unplug TV/AVR/Pi from mains and remove all hdmi connections. Leave unplugged for a minute).
Connect (just) hdmi leads from Pi to AVR and AVR to TV.
Power on TV. Then AVR. Then Pi.
added
video=HDMI-A-1:1280x720M@60D to second line of the file.
cmdline.txt is a single line. Anything after the first newline is ignored. Make sure you add any options to the first line.
When I get video lags, I restart raspberry Pi and it helps... Have no idea why
Did you downgrade widevine as mentioned earlier. Latest widevine is known to cause lags.
Azurewrath can you try this test build.
I think the issue was your video was 10-bit but not HDR, which is a little unusual.
That meant the kernel didn't do a full modeset (as HDR colourspace didn't change) but did change the colour depth (which adjusts the pixel clock) which really wants a full modeset.
The test build is a stanard Matrix build with a kernel patch added to force the modeset.
I installed your test build and the 'vc4.inval_delay=5000' added to the cmdline.txt appears to have resolved the issue in my setup. That is with an LG C9 and Yamaha TSR-7810 AVR with the Rpi4 plugged into the AVR using CEC over the ARC HDMI connection. Thanks for looking into this issue! Does this test build include the updates from 10.0.2 and is it safe to continue running or do you recommend that I revert back until your fix is rolled into the next release?
Yes, this build matches 10.0.2 and you can continue using it. Please confirm if vc4.inval_delay=2000 also works for you.
Also report if vc4.inval_delay=0 vc4.cec_debug=0x100 works for you.
My TV is set to limited colour range. I don't want to change this because it is connected to an AVR with other devices which are all sending limited RGB (e.g. the Bluray player).
Limited/full range is signalled over hdmi (in the AVI infoframe) and generated by the source (e.g. the Pi)
You shouldn't set it on the sink (TV) - it should just display in the colour range that has been signalled.
Has the "plain" decoder (w/o PRIME) been fixed too? (i had the same issues when using the plain decoder w/o PRIME too)
No, the fix is in hardware decode specific code.
If it's failing without PRIME, then it suggests a core ffmpeg issue (so will affect kodi on any platform not using hw decode) and will affect many other players that use ffmpeg internally.
Did the original sample provided have the issue?