OK here are some news of the progress.
I ended up with a working profile and client implementation.
As of now it seems to give very good results. it has though some constraints on which i'd like to pick your thoughts :)
So here is how it works :
When a media is played, RasPlex checks for the following conditions :
- Is the video codec known ? (h264, mpeg4)
- Is the audio codec known (aac, ac3, mp3, dca (DTS), flac) ?
- Is the video bitrate reasonnable ( < 20 Mbits) ?
-> If all these conditions are met, then it will trigger DirectPlay.
-> If any of those is not met, then it will trigger Transcoding.(see below)
Here is what transcoding does.
- Video stream : if the video stream has a known codec (list above) and bitrate < 20 mbits, then it will just forward the stream, if not stream is transcoded to H264 with a maximum bitrate of 20 mbps
- Audio stream : if the audio stream has a known codec (list above) and bitrate < 1.5 mbits then it will just forward the stream, if not stream is transcoded to AAC with a maximum bitrate of 1.5 mbps
This allows to handle separately both streams so that you can only transcode video if audio is supported an has a proper bitrate.
The only thing that I would have liked is to be able to dynamically specify the bitrates from PHT.
Like on RPi the limitation seems to be more around a global bandwith, that is you can play a 7 Mbps audio stream if you are running a 10 mbps video stream. it wont work if you play a 20 Mbits video stream with a 7 mbits audio because of total bandwidth limitation.
The idea would have been to define bitrates so that Audio birate + Video bitrates remain behind a threshold, but it seems that as of now you can only cap video and audio bitrates to fixed threshold when transcoding.
So maybe the best we can do is define this limit to 20 Mbits for video and 1.5 Mbit for audio. This will downgrade a bit the audio when you would have a lower bitrate video, but i guess that should be ok.
Any thought / comment about this is welcome :)