[Xperia Z2 General] Einride:
Well, after another day or so, the video playback failed again, and this time I remember to check dmesg before rebooting:

<6>[108692.854356] msm_vidc: 4: Opening video instance: c21d0000, 1
<7>[108692.856706] msm_vidc: 1: Failed to download firmware
<7>[108692.857299] msm_vidc: 1: Failed to load firmware
<7>[108692.857305] msm_vidc: 1: Failed to load video firmware
<7>[108692.858062] msm_vidc: 1: Failed to move from state: 1 to 2
<7>[108692.858069] msm_vidc: 1: Failed to move video instance to init state
<7>[108692.858112] msm_vidc: 1: Failed to create video instance, core: 0, type = 1

The above is repeated multiple times in the dmesg

A working playback gives this dmesg log:

<6>[ 285.398961] msm_vidc: 4: Opening video instance: c4871000, 1
<6>[ 285.403522] pil_venus fdce0000.qcom,venus: venus: loading from 0x06e00000 to 0x07300000
<6>[ 285.468987] pil_venus fdce0000.qcom,venus: venus: Brought out of reset
<6>[ 285.551898] tfa98xx_codec_get_speaker_type_control
<6>[ 285.551941] tfa98xx_codec_put_speaker_type_control 0
<6>[ 285.551980] tfa98xx_codec_get_speaker_channel_control
<6>[ 285.552019] tfa98xx_codec_put_speaker_channel_control 2
<6>[ 285.552058] tfa98xx_codec_put_speaker_amp_control 1
<6>[ 285.554192] msm8974_mi2s_startup: dai name msm-dai-q6-mi2s.3 c27fd408
<6>[ 285.554199] msm8974_mi2s_startup: acquire mi2s resources
<6>[ 285.554213] msm8974_configure_quat_mi2s_gpio: gpio = 58, gpio name = QUAT_MI2S_SCK, rtn = 0
<6>[ 285.554227] msm8974_configure_quat_mi2s_gpio: gpio = 59, gpio name = QUAT_MI2S_WS, rtn = 0
<6>[ 285.554240] msm8974_configure_quat_mi2s_gpio: gpio = 60, gpio name = QUAT_MI2S_DATA0, rtn = 0
<6>[ 285.554253] msm8974_configure_quat_mi2s_gpio: gpio = 61, gpio name = QUAT_MI2S_DATA1, rtn = 0
<3>[ 285.555232] tfa98xx-codec tfa98xx-codec.1: set format for codec dai failed
<6>[ 285.580234] speaker_amp_control_enable:1 speaker_amp_control_on:0
<6>[ 285.580245] tfa98xx_enable type:Playback channel:Both lr:Normal
<6>[ 285.580400] config_ptr = AMP_Normal
<6>[ 285.581114] warm start 025d 025d param_change 1
<6>[ 285.581121] stereo_speaker_warm_on
<7>[ 285.710369] msm_vidc: 1: Persist buffers already allocated
<6>[ 288.627609] msm_vidc: 4: Closed video instance: c4871000
<6>[ 291.646488] tfa98xx_codec_put_speaker_amp_control 0
<6>[ 291.646519] stereo_speaker_off
<6>[ 291.749216] set_speaker_amp_control_enable speaker_amp disable
<6>[ 291.749400] tfa98xx_codec_get_speaker_channel_control
<6>[ 291.749556] tfa98xx_codec_put_speaker_channel_control -1
<6>[ 291.749711] tfa98xx_codec_get_speaker_type_control
<6>[ 291.749864] tfa98xx_codec_put_speaker_type_control -1
<6>[ 291.807012] msm8974_mi2s_shutdown: free mi2s resources

Snippet from venus_hfi.c (which seems to be for the Z2):

static int venus_hfi_load_fw(void *dev)
{
int rc = 0;
struct venus_hfi_device *device = dev;
if (!device) {
dprintk(VIDC_ERR, "%s Invalid paramter: %p\n",
__func__, device);
return -EINVAL;
}
mutex_init(&device->clock_lock);
device->clk_gating_level = VCODEC_CLK;
rc = venus_hfi_iommu_attach(device);
if (rc) {
dprintk(VIDC_ERR, "Failed to attach iommu");
goto fail_iommu_attach;
}
if (!device->resources.fw.cookie)
device->resources.fw.cookie = subsystem_get("venus");
if (IS_ERR_OR_NULL(device->resources.fw.cookie)) {
dprintk(VIDC_ERR, "Failed to download firmware\n");
rc = -ENOMEM;
goto fail_load_fw;
}

There seems to be a bug with the video driver and/or the firmware, could be related to a memory leak, but that's pretty damn hard to find. If it's a memory leak it could pop up randomly depending on the video played back, the number of playbacks, the formats, who knows?

Are you both running unlocked bootloaders? Perhaps a firmware bug could be related to this?