If you could PM me a link with some sample, i could try to test it and see what happens with transcoding :)
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 :)
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 :)
It sounds right but what about the subtitles?
I have problems playing back DTS-ES The audio drops out every few seconds, this is with a DTS/DTS-ES/DTS-MA receiver
I think this was a firmware problem and has been resolved in the latest version of openelec (3.2.4)
Rasplex is still using version 3.2.2 ( atleast in the stable version 0.3.1)
A beta of openelec 4.0 was released today and hopefully the Rasplex guys can include this new version by the time they are ready to release 0.4.0 of Rasplex.
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) ?
I assume mpeg4 includes xvid ?
OE 4.0 means XBMC Gotham, that's in the plan but it means also that PlexInc has to merge with Gotham :)
It sounds right but what about the subtitles?
We have two options there regarding transcoding, i have seen that subtitles can be directly included in video with transcoder or they can be rendered by RPI.
I am not sure yet which is the best way to go as i dont have much subititles medias on hand :)
OE 4.0 means XBMC Gotham, that's in the plan but it means also that PlexInc has to merge with Gotham :)
Ahh ok. Version 3.2.4 of openelec fixed the DTS-ES problem anyway I think, something to do with the old kernal.
We have two options there regarding transcoding, i have seen that subtitles can be directly included in video with transcoder or they can be rendered by RPI.
I am not sure yet which is the best way to go as i dont have much subititles medias on hand :)
Mereged subtitles have always been absolutey fine for me on the raspberry pi.
All mine with subtitles are MKV files with merged subtitles and these are easily selected in the menu.
Not so sure about external subtitles like .srt files etc... but i think these are ok too and don't need transcoding
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) ?
Is xvid included under mpeg4 ? because xvid plays natively without problems.
Is xvid included under mpeg4 ? because xvid plays natively without problems.
I'm not sure as i dont have any xvid sample. I'll try to find one and see if its coming as mpeg4.
You can check the exact codec seen by PMS if you go on PMS -> select your movie -> information -> this displays the video codec and audio codec determined by PMS. Please have a look at it and lemme know if it shows mpeg4 or something else :)
- Codec MPEG4
- Bitrate 978 kbps
- Bit Depth 8
- Bvop 1
- Chroma Subsampling 4:2:0
- Codec I D XVID
- Color Space yuv
- Duration 40:58
- Frame Rate 25.000 fps
- Gmc 0
- Height 352
- Qpel 0
- Scan Type progressive
- Width 640
And that plays perfectly :)
is this coming from PMS ?
would you mind copy paste what you have by clicking on the "View XML" just at the bottom of the window ?
Yeah thanks,
This file is mpeg4 / ac3 :)
yeah mpeg4 codec but with codec i.d xvid.
i think there is mpeg4 codec with codec i.d divx too but i am unsure if they work nativley
I guess that there will be some adjustments to be made on the first RasPlex version which will support transcoding anyways :)
this will probably show up some new special cases to be handled. Also i wanted to keep things as light as possible for PMS as some people might have servers that can have hard time with transcoding.
Yeah i totally get that because my PMS is running on a ReadyNas nv+V2 which cannot transcode at all not even audio.
Luckily the pi seems to be able to handle everything I have got natively
I guess that the limitations that I have defined above are covering pretty much what Rpi can play.
Then if you PMS can handle transcoding you'll be able to playback it, if not then you won't but you wouldnt have played it anyways :)
Transcoding will probably also improve quite a lot the channels stuff as most of them use some fancy encoding formats which are not natively supported.
I have two PMS servers, one is a Syno DS713+ and even though it a pretty big CPU for a NAS it has hard time when running some 1080p transcoding.
But the other PMS i have for testing is an i7 iMac and i can play smoothly on RPi some originally high bitrate videos with transcoding like 30 mbits video + 10 Mbits audiio :)
Yeah I have been looking at getting a slightly more powerful NAS like your DS713+ or a Asustor AS-604t because images can be quite slow to load before they are cached with the readynas.
Maybe when I win the lottery :-)

