RPi Transcoding

I may be in the wrong place here, so apologies, but here goes;

I'm playing a lot of 1080p and 720p material, I don't know lot of detail about the video, but its generally DTS 5.1 audio, and all wrapped as an MKV file. 

I get smooth playback on Rasplex, but sometimes the video abruptly stops. If I set transcode to 20Mbps rather than direct play, it is far, far more reliable. I notice on my plex server that the video is still direct play, but the audio seems to be transcoded / down-mixed to PCM ?

Is there a way to preserve the DTS digital audio, or perhaps convert to DD 5.1?  Anything other than PCM?  

I dont know why setting to 20mbps is fixing the reliability, even though it is direct stream video, but it is. It seems in "busy" scenes, presumably very high bitrate sections of video, it bombs out, and drops me back to the movie art, although there doesn't always seem to be a reason why. 

Is the video being re-packaged into something more compatible by forcing transcode?  Can I still get DTS or DD audio direct ?

Are you just just using your TV speakers or do you have the pi connected through an AV Receiver ?

If its the latter have you enabled DTS and AC3 passthrough in the preferences in RasPlex ?

Yes I have a reciever connected, as I am getting DTS and DD 5.1 audio when the Pi is set to direct play in preferences. The issue I have is stability, I find that movies sometimes abruptly stop for no reason, and I have to press play again. I think on high bitrate scenes this sometimes happens more.  (never had an issue in XBMC)

If I force transcode at the highest settings (20Mbps) I notice that in actual fact the video isnt being transcoded, its still marked as direct on the server, but this setting helps stability a lot, presumably because the server is doing something to the video to wrap it in a more compatible way?

Anyhow, I notice that despite the video remaining as direct play, the audio ends up on my receiver as PCM and the server status shows that it is transcoded. Is there not a way to preserve the original audio stream, or at least re-transcoded it to something which is still DTS or DD?  I dont see a setting, so this isnt something configurable as far as I can see. 

Yes I have a reciever connected, as I am getting DTS and DD 5.1 audio when the Pi is set to direct play in preferences. The issue I have is stability, I find that movies sometimes abruptly stop for no reason, and I have to press play again. I think on high bitrate scenes this sometimes happens more. (never had an issue in XBMC)

If I force transcode at the highest settings (20Mbps) I notice that in actual fact the video isnt being transcoded, its still marked as direct on the server, but this setting helps stability a lot, presumably because the server is doing something to the video to wrap it in a more compatible way?

Anyhow, I notice that despite the video remaining as direct play, the audio ends up on my receiver as PCM and the server status shows that it is transcoded. Is there not a way to preserve the original audio stream, or at least re-transcoded it to something which is still DTS or DD? I dont see a setting, so this isnt something configurable as far as I can see.


If you have a DTS and DD compatible receiver and you have Rasplex set to pass through for these codecs there shouldn't be a problem because the receiver is handling the audio not the pi.

Are you 100% sure you have Rasplex set to passthrough for DTS and DD in the preferences ?

I do not use transcoding as my server doesn't support it so I couldn't comment on what is happening when you transcode.

Sorry I can't be any more help

Yes I have a reciever connected, as I am getting DTS and DD 5.1 audio when the Pi is set to direct play in preferences. The issue I have is stability, I find that movies sometimes abruptly stop for no reason, and I have to press play again. I think on high bitrate scenes this sometimes happens more.  (never had an issue in XBMC)

If I force transcode at the highest settings (20Mbps) I notice that in actual fact the video isnt being transcoded, its still marked as direct on the server, but this setting helps stability a lot, presumably because the server is doing something to the video to wrap it in a more compatible way?

Anyhow, I notice that despite the video remaining as direct play, the audio ends up on my receiver as PCM and the server status shows that it is transcoded. Is there not a way to preserve the original audio stream, or at least re-transcoded it to something which is still DTS or DD?  I dont see a setting, so this isnt something configurable as far as I can see. 

I have experienced this problem too. Exactly like it.

I have experienced this problem too. Exactly like it.

Hi,

do you try to edit the Rasplex Profile on your Plex Server: "Plex Home Theater-RaspberryPi.xml"?

I changed line 5:

 
   

to:

 

  

It is important that "ac3" and "dca" is at first.

This worked for me and I have ac3 and dts sound with transcoded files. :)

Thanks I have tried this made some progress. 

I can now get AC3 / Dolby Digital 5.1, but I seem to be getting Dolby even on films that are DTS?  It is as if it is transcoding DTS to Dolby?

I have the line exactly as you have it above. Presumably I don't list DTS as a codec? 

My receiver has only one light for detecting ac3 and dts. So i can not see if there is ac3 or DTS transcoded.

Maybe you can do a test with the order of the codecs.


Try: “dca,ac3,aac,mp3”


Is this working for you?


I think dca = DTS

Correct me if I am wrong.

I've tried putting DCA first. I even tried with DTS in there, but none of that made a difference. I get Dolby for both Dolby and DTS movies.

It's progress, so I am fairly happy, but I would be keen to know if it can output DTS also. 

How do I tell if Plex is transcoding files or not?  I am trying to play some video files recorded by SageTV using a Hauppauge HD-PVR.  The files are H.264 encoded in an MPEG2-TS container.  The audio is shown as AC3 5.1.  Plex shows the video as 1080p which is incorrect as it should be 1080i.  These should play without transcoding in an RPi should they not?

The problem is when I try to skip forward in the file the audio and video get seriously out of synch.  I was guessing that this is due to transcoding - is that the case?

How do I tell if Plex is transcoding files or not?  I am trying to play some video files recorded by SageTV using a Hauppauge HD-PVR.


Two methods come to mind:

1: Check the popup message shown when starting the playback. This will say if it needs to be transcoded.
2: Use a keyboard and press "I" during playback, to bring up the media info overlay. Some remotes have a corresponding button too.
 

The files are H.264 encoded in an MPEG2-TS container.  The audio is shown as AC3 5.1.  Plex shows the video as 1080p which is incorrect as it should be 1080i.  These should play without transcoding in an RPi should they not?


I'm not entirely sure. For normal MP4/MKV containers I think they should, but MPEG2-TS may be a different matter.
As for the interlaced/progressive issue, I'm not sure if Plex even checks for that in presenting the resolution acronym.
Basically anything with width 1280 will be called 720p, while anything with width 1920 will be called 1080p.
(This about the pre-play presentation. Media info during playback is another matter.)

It's a bit absurd that we use the max vertical height for the acronyms, while it's usually tested by the width... :D
But that's because higher aspect ratios than 1.78 enforce lower height, even when physical signals are 1080p.
(Just like the old lower ratio of 1.33 enforces black borders at right and left, for correct proportions.)
 

The problem is when I try to skip forward in the file the audio and video get seriously out of synch.  I was guessing that this is due to transcoding - is that the case?


That's often the case, because the client requesting the position jump has no awareness of keyframe positions in the original file (since it never sees that file, but only the transcoded stream), and the server NEEDS to jump to video keyframe positions in order to play video ungarbled. This problem varies a lot depending on how the original file is encoded. Videos with frequent key frames tend to give less problems, but videos with sparse key frames give worse problems.

Even so, I think the server needs improvement in this regard, so that it always adjusts the playback position of audio so as to ensure correct sync between audio and video after any jump, regardless of whether either track is transcoded or not. But this is obviously beyond control of RasPlex...

Best regards: dlanor

That's often the case, because the client requesting the position jump has no awareness of keyframe positions in the original file (since it never sees that file, but only the transcoded stream), and the server NEEDS to jump to video keyframe positions in order to play video ungarbled. This problem varies a lot depending on how the original file is encoded. Videos with frequent key frames tend to give less problems, but videos with sparse key frames give worse problems.

Even so, I think the server needs improvement in this regard, so that it always adjusts the playback position of audio so as to ensure correct sync between audio and video after any jump, regardless of whether either track is transcoded or not. But this is obviously beyond control of RasPlex...
 

I think I might have mentioned elsewhere that I am looking at transitioning to Plex from SageTV.  One thing that Sage does very well is skip fwd.  It is instantaneous and does not have any issues like losing synch.  That is a VERY important feature to me as I watch sports and I zip through all stoppages of play.  Plex is very good for playing back movies or other TV shows where I don't care about moving around.  But if it can't do reliable skipping without causing problems then that is a big problem in the way that I would want to use my system.

Thanks for your help - it was very useful!

Oh, and I forgot to mention that it does appear that the files are NOT being transcoded as the Info screen says something like server:CarnoustiePlex DirectPlay.  But they still seem to suffer from major sync issues when moving around in the file.

Hi all!

I'm having some issues with transcoding. A +-17mbps h264+dts movie in direct play mode plays perfectly. But if a set the 20mps limit in options, the audio is always transcoded to stereo. Even a 8mbps movie with AC3 audio is transcoded to stereo. 

Audio output is set to HDMI, DTS and AC3 options are checked and hdmi channels are set to 5.1.

I don't know if this is a config issue or a release issue.

Thank you.

Which version of RasPlex & PMS are you using?  

Hi all!

I'm having some issues with transcoding. A +-17mbps h264+dts movie in direct play mode plays perfectly. But if a set the 20mps limit in options, the audio is always transcoded to stereo. Even a 8mbps movie with AC3 audio is transcoded to stereo. 

Audio output is set to HDMI, DTS and AC3 options are checked and hdmi channels are set to 5.1.

I don't know if this is a config issue or a release issue.

Thank you.

Hi all!

I'm having some issues with transcoding. A +-17mbps h264+dts movie in direct play mode plays perfectly. But if a set the 20mps limit in options, the audio is always transcoded to stereo. Even a 8mbps movie with AC3 audio is transcoded to stereo.

Audio output is set to HDMI, DTS and AC3 options are checked and hdmi channels are set to 5.1.

I don't know if this is a config issue or a release issue.

Thank you.

Hi lumeku,

Have you tried to edit the Rasplex Profile? See Post #146.

Which version of RasPlex & PMS are you using?  

Last version of both.

Hi lumeku,

Have you tried to edit the Rasplex Profile? See Post #146.

Yes, I've tried it and nothing changed for me.

hi all,

I have been having these issues too. Server and receiver set to do most of the work.

I have 2 movies (Dark Knight Rises & Inception) both ripped from blu-ray at 1080p with DTS audio (MKV). When I set it to play Directplay the display stutters and audio. One of the movies did say transcode not recognised or something so will need to check again.

The weird thing is before I got  Rasplex I had the video/audio pass through my Blu-ray player and it was running without any issues.

Running latest Rasplex and PMS.

Hey all,

I just got a question for which I can't really find an answer to.
I have a farily new ubuntu server running PMS.

Server specs:
OS: Ubuntu Server 12.04
AMD FX6300
8Gb of Ram
SSD for OS
HDD for Media files

So my question is should I use "Force Transcode" in the settings? Here's a screenshot of what I'm talking about.
DSC_0070.jpg

My files are mostly torrents which are .avi mp4 or mkv and most of them are 480p.

Thank you for any replies.

I don't think there is much chance that a 480p h.264 encoded file will need transcoding for the Pi's sake, same goes for most networks too.  On a wired network with a decent server you should be able to stream up to 720p/1080p at 20Mbit (assuming audio passthrough and/or some overclocking).

On Rasplex I tend to be either playing h.264 in a MP4 container, or MPEG2 (I have the licence).

With MPEG2, I have found that the Rpi can play the regular program and transport stream containers, but it struggles with the Microsoft DVR-MS and WTV containers.  Automatic remuxing of these containers would be awesome.

From memory, no dramas with AC3 either.

I found it struggle with Microsoft DVR-MS and WTV containers also even on the Pi 2, and my i5 media centre but MPEG2 put in a MKV container played pefectly

any improvement in this area would be great