Last 3-5 seconds of video freeze, sound continues

Hi all,

first of all: big props to you guys and the V4K, it’s an awesome little device and ticks all my boxes :slight_smile:

However I have one slight problem with it:
On EVERY video file (so far only x264) I tried, the last 3-5 (something along those lines, it’s always the exact same moment in every video though) seconds the picture freezes and the sound goes on. Then the video ends as normal. While for most movies this is not a problem (due to credits etc.) there are a lot of videos where it is very annoying.

I already googled a lot and found a (partway) solution for it. As soon as I deactive “amcodec” acceleration in the options, the video runs through to the end, however the playback is slightly choppy then which is even more annoying :slight_smile: .

Is there any way to fix this/change parameters to change this behavior? I already tried playing around with the advancedsettings.xml and the cache settings to no avail. In some threads on the WWW people say to “only deselect amcodec and keep e.g. MediaCodec” but I can’t find these entries in my options (level: Expert), there only is the option to enable or disable amcodec.

Thanks in advance for a response and I appreciate any help!

Please can you post a debug log and MediaInfo of an affected file? I’m playing H264 quite regularly and not having a problem so far. Also would be helpful if you can describe your audio setup.

Cheers

Sam

Hi Sam,

thanks for the (instant) reply :slight_smile:

MediaInfo for one of the affected files:
http://paste.osmc.io/ajebudokup.vhdl

Logs
http://paste.osmc.io/irivasebah

I activated logging, rebooted the machine, started the playback, skipped to the last 15 sec and waited. After that I uploaded the log. It’s the last 3sec that are freezing (always the exact same moment).

FWIW: The file plays perfectly on my computer (directly from the NAS), the computer as well as the V4K are connected via GBit ethernet switch to the NAS.

Nothing obvious in log.

Can you send me a sample that induces the problem and confirm your audio settings?

Cheers

Sam

Sure, I used the “The Simpsons Movie – 720p Trailer” from: H.264 Demo Clips - H264info.com

Link: simpsons_movie_trailer.zip - Download The Simpsons Movie - High Definition (720p) Theatrical Trailer - dvdloc8.com

It also induces the same problem (running fine with VLC on my PC): Last 3 seconds freezing (sound running normally) on V4K.

Can you please confirm your audio settings?
Sam

Audio Settings:
Output Device: AML-M8AUDIO, HDMI
Number of Channels: 2.1
Output configuration: Optimized
Volume Control Steps: 90
Maintain original volume on downmix: Enabled
Stereo Upmix: Disabled
Boost Centre Channel when downmixing: 2dB
Resample Quality: Medium
Theshold for pitch correction: 2
Keep audio device alive: 1min
Send low volume noise: disabled (was enabled before, caused crackling so I disabled it)

Play GUI Sounds: never
GUI Sounds: Kodi UI Sounds

Allow passthrough: enabled
Passthrough output device: AML-M8AUDIO, HDMI (greyed out)
AC3 capable receiver: Enabled
E-AC3 capable receiver: Enabled
DTS capable receiver: Enabled
TrueHD capable receiver: Disabled
DTS-HD capable receiver: Disabled

Enable audio DSP processing: Enabled

One more thing and it might be a buffering issue overall:
I wanted to record a video to show the problem and I saw that the buffering bar is “fluttering”, but only at the end exactly when the problem occurs. Personally I don’t think it has anything to do with the audio settings, since the whole video plays smoothly, it’s only the last 3 seconds that fail.

GIF of this (see bottom right corner):

Try turning this OFF

Turning audio DSP off does not change anything :frowning:

Just to say I have the same issue. I noticed at the end of episodes of The Office as there is watchable video right till the end.
It’s not 4k material btw. just 720 or 1080.
Movies and other series usually have end credits so you don’t notice this :).

Yes that’s true… As said, you can get rid of it by deactivating the amcodec for x264 material. This is what I’ve done for now and it seems to be ok so far albeit SOME choppyness in some files which usually settles down after about 10sec.

Still the video is noticeably smoother with amcodec activated, so I’m still keeping my fingers crossed for a future fix.

Deactivating amcodec means that the issue with the HW decoder implementation.

When you disable amcodec, the video is being decoded in software via ffmpeg.

I’ll look at the sound continuing issue after the next update when I have a bit more free time.

Cheers

Sam

1 Like

Was this resolved? I notice the same issue with H.264 SD quality MP4 files.

I cannot reproduce this problem in staging now; so should be resolved.

Pressing Context Menu during playback so we can see if ffmpeg is being used for playback or amcodec is would be useful.

Sam

I’ve tried several short movies and until now it only happens when amcodec is active.

This can be easily tested by using a plugin called Dumpert (official Kodi Video repo) which links to (supposedly funny) short recordings.

For example, there’s a movie called “Parkiet is fan van Star Wars” which stops updating the video at 1:50 when using amcodec while it continues playing to the end (1:54) when ffmpeg is used. Lots of clips are shorter making it even more noticeable.

Okay. This will be related to how amcodec works (big buffers). I will see what can be done to resolve this.

I suspect it may only happen when passthrough is not being used for the clip playing back

Thanks! I hope that you can at least reproduce the problem now.

I can’t reproduce it with passthrough enabled, but I can when it’s off and Adjust Refresh Rate is off (which is not ideal)

An audio reset via sysfs is probably a quick and dirty way to resolve this.

It’s on the list.

Passthrough is enabled, but the movie from the example is AAC so I guess that it’s decoded by ffmpeg (just as with the other clips). Looking forward to do some testing when it’s ready.