Cannot make proper ScreenShot on x265 videos

Just found out today that SS on all x265 resolutions come out garbeld with vertical lines on my X92_S912 (CE8.95.6)
However SS on all x264 resolutions work properly…

Is it just on my box or…?

1 Like

I don’t think anyone tried that already.

yes, the same lines and part of last x264 frame

1 Like

This is what I get from a screenshot of X265.

I have also noticed some strange kind of stepping in the top right hand corner for capture from any other format.

I’m using the commend kodi-send --host= -a “TakeScreenshot” from within WinSCP.

1 Like

I have exactly the same problem, my box have s912 cpu, with 2gb ram.

The same issue here. I cannot make proper screenshots though I was able to do that ~2 or 3 releases ago.

The same thing happens with vp9 encoded video as well, you can fix it by creating an file in .config that contains:-

echo 1 > /sys/module/amvdec_h265/parameters/double_write_mode
echo 1 > /sys/module/amvdec_vp9/parameters/double_write_mode

You’ll need to reboot to apply the changes.

1 Like

Isn’t it?

 echo 3 > /sys/module/amvdec_h265/parameters/double_write_mode
 echo 3 > /sys/module/amvdec_vp9/parameters/double_write_mode
1 Like

I’ve been using echo 1 > for months and it works perfectly fine for me.

Both 1 and 3 work, 2 messes up the resolution of the playing file.

On my S912, using echo 1 or echo 2, X265 playback makes the screen go haywire and any attempt at capture results in a black screen

echo 3 works perfectly for X265

X264 also continues to work, although there is still the ‘stepping’ issue that is not present with X265 capture.

Thanks guys for the pointing in the right direction though as it’s a step forward :smiley:

Unless all you do all day is taking screen captures of what you are watching, I wouldn’t recommend using double_write_mode, as it degrades picture quality due to compression.

Screenshots can be useful for a variety of uses, whether regular or occasional.

From where I sit though, there are now 2 options to use dependent upon the trade off in picture degradation against having a working option, so having a choice is a step forward pending any form of final solution further on down the line.

I think this is due to the fact that there is no way to synchronize between when the capture occurs and weather or not the amvideocap0 buffer is completely full of data.

I wrote this script that basically replicates the capture code Kodi uses but in python, it preforms 3 captures one after the other, guaranteeing that the last one will contain a full frame of data.

Give it a go if you want. As an added bonus it captures just the video frame, no GUI overlaid on top. (3.7 KB)

Just add the script to any button on you remote using a keymap and you are set.

               <key id="your_key_id">runscript(script.amlogic.framecapture)</key>
1 Like


I’ll give that a whirl.

Nice, how can I made capture gui and frame together ?

Use Kodi’s built in capture.

My script directly accesses the amvideocap0 buffer and thus has no knowledge or access to Kodi’s GUI buffer and so will never be able to capture it.

Carried out some basic testing and so far it seems to do the job quite admirably.

I’ll give a full appraisal when I’ve tested various files and streams but as an alternative option out of the box so to speak, It’s impressive.