That message is probably from ffmpeg failing before it even starts encoding. Since you are using CPU transcoding, it is either a permissions issue with the output directory or the disk is full or something.
Jellyfin 10.10.6 (Docker)
Ubuntu 24.04.2 LTS w/HWE
Intel i3 12100
Intel Arc A380
OS drive - SK Hynix P41 1TB
Storage
4x WD Red Pro 6TB CMR in RAIDZ1
then i think it is a permission issue because i add another media after this one and i have no issues with that one, Is it possible that the problem is with the mkv file itself?
I had the same problem and changed the player.
Go to Settings - Client Settings - Vdeio player type and choose either Integrated player or External player, both worked for me (I used VLC for the external player).