Occasional black screen on Vero 4k

Wrote this bash script to analyse MKVs check what the metadata says the FPS is and check it against the actual file. If there is a mismatch the metadata is updated.

The coding is probably terrible as I don’t know much about writing bash scripts so worked it all out last night from Google and Stack Overflow, but either way might be helpful for someone. You need ffmpeg, mediainfo and mkvtoolnix installed. Just pass through as an argument the file path you want to look through (e.g. /TV Shows/Show/Season/*.mkv).

It shouldn’t cause any major issues I don’t think but obviously use this at your own risk!


for f in "$@"; do
	printf "$f\n"
	MetaData=`ffprobe -v 0 -of csv=p=0 -select_streams v:0 -show_entries stream=r_frame_rate "$f"`
    MetaDataSum=`echo "scale=3;$MetaData" | bc`

    Actual=`mediainfo "--Inform=Video;%FrameRate%;" "$f"`

    echo $MetaDataSum
    echo $Actual

	DefaultDurationFloat=`echo "scale=9;(1/$Actual)*1000000000" | bc` 
	DefaultDuration=`echo "scale=0;$DefaultDurationFloat/1" | bc`

	echo $DefaultDuration

    if [ $MetaDataSum != $Actual ]
		echo NO MATCH
		mkvpropedit "$f" --edit track:v1 --set default-duration=$DefaultDuration
		echo MATCH

    printf "\n"
1 Like

I am still getting black screens when watching media. I don’t think it is always an FPS issue that we were seeing earlier in the thread.

I thought it might be a cable issue, but have swapped a known good cable and it is still happening. Got the log from this evening but can’t see anything obvious in there:


Any ideas, I’d be pulling my hair out if I had any!

Is it always with the same TV series?

Nope was watching something different last night and it happened. There doesn’t seem to be any consistency to it.

I’ll check this tomorrow morning


My only other thought on what could be causing this is there a chance the unit is overheating? It is currently in a cabinet (which has active cooling), with a lot of other hardware.

However I would have expected, if it was overheating that it’d do it more consistently once it starts doing it. For example after it went black yesterday it didn’t occur again whilst I watched the rest of the show.

If it’s overheating the front LED should turn red

Haven’t had a chance to check logs yet but will do this now.

I’ve checked this for you now.

Please enable HPD Lock under Settings -> Display and reboot.


Thanks, will enable this when I get home. Will let you know how I get on.

Only had a couple of time to check this since enabling HPD Lock. The black screen happened again this evening, log is here:


It happened again shortly after I resumed the playback so another log is here:


I also captured a video if it happening the first time:


You have the Vero plugged into a soundbar and the soundbar connected to the TV, correct? Can you test with the Vero connected directly to the TV?

Correct, although I think I tried that previously. Will double check it though!

1 Like

Scratching my head over why you keep getting this:

Oct 20 21:38:23 osmc kernel: codec:vdec1 video changed to 3840 x 2160 60 fps clk->667MHZ

Your desktop is 1080p, the video you are playing is 1280x720 (although the filename implies it’s 1080p). The word Plex appears also so is that converting the stream, and if so how?

That is weird, just checking all of the files from that season and looks as though that is a one off. In terms of Plex I use PlexKodiConnect to link my Plex server and OSMC. I disabled the plugin to keep my logs clean though. It is also set up for direct play so there shouldn’t be any transcoding happening.

Thanks for the video and logs

Were you watching an H264 file?
Does the issue only occur on H264 files?

To me that looks like the side effect of an IDR in the video.

It’s handy that you’re familiar with the command line. Run:

echo 1 | sudo tee /sys/module/amvdec_h264/parameters/error_recovery_mode

You may wish to put it in rc.local to make it persistent for a while.

It was a H264 file, the majority of my library will be H264 but I can’t say for sure it only occurs with H264 files as it isn’t something I have checked before now.

Sure, can run that - I’m not with the Vero now is that going to output something I need to share, or is that a potential fix?

typing that line will change part of how h.264 files are processed. It will take effect only until you reboot. You will have to either enter that line any time you reboot, or add it to rc.local. He is just looking for you to test the effect and report back.

:+1: Perfect, thanks.

My rc.local file now looks like this - is that right?

#!/bin/sh -e
# rc.local
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
# In order to enable or disable this script just change the execution
# bits.
# By default this script does nothing.

echo 1 | sudo tee /sys/module/amvdec_h264/parameters/error_recovery_mode

exit 0

If you are doing in rc.local then it’s running as root, so the sudo isn’t needed.

echo 1 > /sys/module/amvdec_h264/parameters/error_recovery_mode

would work. But try making the change from the command line and test before making it permanent in rc.local