MKV on Xbox One with Plex and Synology

I use the wonderful Plex media library software on my Synology and normally everything is perfect but recently I have been having some issues playing some of the high level (1080p) MKV on the Xbox One, after a bit of head scratching (it works fine on the browser client), it turned out to be because the Xbox One cant play MKV natively so is trying to transcode on the fly which is a bit much for my Synology’s ARM processor, now Plex has the the newish “Optimise” function, but it takes AGEEEESSSS and then it is still buggy (mine keeps re-doing the optimise whenever the library refreshed and a few other things).

Anyway, long story short, I just need to convert the MKV into MP4 which Xbox One will play without any transcoding simply and in a lossless way (I don’t want to recode everything). to do this I use the ffmpeg library in a one line bash script file, this line converts all the files in the current directory and only takes a few seconds.

for i in *mkv; do ffmpeg -i "$i" -vcodec copy -acodec copy "${i%.mkv} Plex Version.mp4"; done

Now the resultant files work perfectly on the Xbox one and its dead easy to convert large batches of files.
Thats all

Update

As you will all know, MP4 does not hold subtitles and is a bit on the limited side compared to the MKV container, so for the videos I had that were full blown Blueray rips with a bunch of different audio tracks and lot os subtitles, i had to find an alternative, this was supplied by HandBrakeCLI the command line version of Handbrake, the following command just re-renders the MKV to a lower spec that my Synology can cope with, not perfect but a solution I can live with till I can buy a dedicated plex server box

for i in *mkv; do HandBrakeCLI --optimize -i "$i" -o "/${i%.mkv} Plex Version.mkv" -E mp3 --preset="Normal" --subtitle scan,1,2,3,4,5,6,7,8,9,10 -a 1,2,3,4,5,6,7,8,9,10 ; done

Leave a Reply

Your email address will not be published. Required fields are marked *