Grrrrrrrrrrrrrrr
Found another problem in this. If the video has a second audio track that is AC3, then the video gets queued for conversion. So I see this in the logs
May 24, 2016 21:34:31 [0x7f5effff1700] DEBUG - We're going to try to auto-select an audio stream for account 4381710.
May 24, 2016 21:34:31 [0x7f5effff1700] DEBUG - Selecting best audio stream for part ID 4575 (autoselect: 1 language: en)
May 24, 2016 21:34:31 [0x7f5effff1700] DEBUG - We're going to try to auto-select a subtitle.
May 24, 2016 21:34:31 [0x7f5effff1700] DEBUG - Audio Stream: 10407, Subtitle Stream: -1
Looks like it is trying to pick the best audio stream, which is AC3 5.1. Then a bit later it says
May 24, 2016 21:34:31 [0x7f5f14ecb700] DEBUG - [Now] User is XXXXXXX (ID: XXXXXX)
May 24, 2016 21:34:31 [0x7f5f14ecb700] DEBUG - [Now] Device is Android (My D5503).
May 24, 2016 21:34:31 [0x7f5f14ecb700] DEBUG - [Now] Profile is Android
It’s worked out my device is an Android one, then a little bit later
May 24, 2016 21:34:37 [0x7f5f013ff700] DEBUG - We're going to try to auto-select an audio stream for account XXXXXX.
May 24, 2016 21:34:37 [0x7f5f013ff700] DEBUG - Selecting best audio stream for part ID 4575 (autoselect: 1 language: en)
May 24, 2016 21:34:37 [0x7f5f013ff700] DEBUG - We're going to try to auto-select a subtitle.
May 24, 2016 21:34:37 [0x7f5f013ff700] DEBUG - Audio Stream: 10407, Subtitle Stream: -1
May 24, 2016 21:34:37 [0x7f5f013ff700] DEBUG - MDE: analyzing media item 4405
May 24, 2016 21:34:37 [0x7f5f013ff700] DEBUG - MDE: Frozen Fever (2015): no direct play video profile exists for http/mp4/h264/ac3
May 24, 2016 21:34:37 [0x7f5f013ff700] DEBUG - MDE: Frozen Fever (2015): selected media 0 / 4405
So it would appear that the server picks the best audio stream in the file for synchronization, then finds the device does not support it so tries to transcode it. Fortunately the transcode engine is smart enough to notice that an AAC stereo track actually exists in the file and just remuxes the file minus the AC3 5.1 track.
However this is then spewing files under /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Cache/Transcode which is likely to run the server out of space as /var is only 32GB in size.
Really, I mean REALLY which numpty thought that was a good approach???
This all needs reworking so that the profile of the device is taken into account when selecting an audio stream, and if you notice it has a supported audio stream especially if it is the first audio stream just copy the dam video file to the device.
It’s not like I have done something stupid and had the first audio track as AC3 and the second as AAC. No sir I have double checked and every last single video file on my server has a stereo AAC track first and if it existed on the original source a AC3 5.1 track second. Actually not strictly true there are some foreign language films with original soundtrack and a voice dubbed soundtrack second. Further some have AAC and AC3 5.1 of both, though you can literally count these on your hands.
I guess a workaround for now would be to put a symlink from /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Cache/Transcode to the main file system that has a lot more allocated space. But that is a nasty nasty hack and does not get around the fact that their is far more I/O going on in the server than is remotely necessary.