Transcode audio only - passthru video

Server Version#: 3.77.4
Player Version#: Roku

I have multiple files with audio AC3 and I use Roku as a player, video format is x264 which is supported by it… Plex transcode the files properly into AAC so Roku Ultra can reproduce it. The problem is that is also transcodes the VIDEO from x264 to x264 (same format) but it reduces its quality.

Is there a way to just copy the video stream? (passthru) and transcode the audio only.

PS: I use hardware accelerated transcoding.

Thank you.
Daniel.

Which Roku model?

I have a Roku 3. It will accept DirectStream H.264 up to about 30 Mbps of video without difficulty hardwired.

If you have a Roku 3, make certain you aren’t limiting the bitrate in the app settings (easily overlooked – I did it too once).

Hello,

DirectStream works… the video plays fine but no audio because Roku Ultra 4660X does not support decoding AC3 (docs)… that is why Plex is transcoding it to AAC and that is fine… but it also transcodes the video and that reduces its quality.

The question is “How to pass thru the video when transcoding it?”

Thank you.

  1. DirectPlay - when the file can be sent without any modification
  2. DirectStream - when the container (file type/extension) isn’t supported by the device directly.
  3. DirectStream w/ video transcode - Video encoding not compatible or bit rate to high or image based subtitles are in use and “Burning” required.
  4. Audio Transcode - Obvious here

So we’re not confusing things, which do you have and can you create a quick DEBUG log file ZIP for me to see?

  1. Settings - General - DEBUG logging only
  2. Start playback - 30 second max
  3. Stop Playback - wait 30 seconds
  4. Settings - Server - Troubleshooting - Download Logs
  5. Hover over the item you just played and get the media info (specficially the “View XML” which shows me the streams in it. I don’t need the genre or actor info)

Attach both the ZIP and XML please. We will see what it did and why it did it

Sorry for the delay… here is the information you requested.

Sever logs: Plex Media Server Logs_2019-02-06_14-28-54.zip (71.5 KB)

Media Info: 6188.zip (3.8 KB)

Thank you.

Thank you for the XML and the logs. Everything is clear.

  1. The file was re-encoded wrong when it was reduced to 3 Mbps. The incorrect file 5.1 was selected. The maximum allowed is 4.1. At this bitrate, the 20 Mbps maximum of 4.0 would have been more than adequate. You need to re-encode this file, manually increasing to 6 Mbps and adding 2-pass encoding in HandBrake at 4.0 profile to correct the problem.
  2. PMS did precisely as it should have. Here is the analysis of the file and why it transcoded.
Feb 06, 2019 14:25:48.656 [0x7f2ded6b3700] DEBUG - MDE: analyzing media item 17064
Feb 06, 2019 14:25:48.656 [0x7f2ded6b3700] DEBUG - MDE: Smallfoot (2018): Direct Play is disabled
Feb 06, 2019 14:25:48.656 [0x7f2ded6b3700] DEBUG - MDE: Smallfoot (2018): media must be transcoded in order to use the hls protocol
Feb 06, 2019 14:25:48.656 [0x7f2ded6b3700] DEBUG - MDE: Smallfoot (2018): no direct play video profile exists for http/mp4/h264/ac3
Feb 06, 2019 14:25:48.657 [0x7f2ded6b3700] DEBUG - MDE: Smallfoot (2018): no direct play video profile exists for http/mp4/h264/ac3
Feb 06, 2019 14:25:48.657 [0x7f2ded6b3700] DEBUG - Smallfoot - video.level limitation applies: 51 > 41
Feb 06, 2019 14:25:48.657 [0x7f2ded6b3700] DEBUG - Smallfoot - video.level limitation applies: 51 > 41
Feb 06, 2019 14:25:48.657 [0x7f2ded6b3700] DEBUG - MDE: Smallfoot (2018): no remuxable profile found, so video stream will be transcoded
Feb 06, 2019 14:25:48.657 [0x7f2ded6b3700] DEBUG - Smallfoot - video.level limitation applies: 51 > 41
Feb 06, 2019 14:25:48.657 [0x7f2ded6b3700] DEBUG - MDE: Cannot direct stream video stream due to profile or setting limitations
Feb 06, 2019 14:25:48.657 [0x7f2ded6b3700] DEBUG - Codecs: hardware transcoding: testing API vaapi
Feb 06, 2019 14:25:48.659 [0x7f2ded6b3700] DEBUG - Scaled up video bitrate to 1425Kbps based on 1.500000x fudge factor.
Feb 06, 2019 14:25:48.659 [0x7f2ded6b3700] DEBUG - MDE: Cannot direct stream audio stream due to codec ac3 when profile only allows aac
Feb 06, 2019 14:25:48.659 [0x7f2ded6b3700] DEBUG - MDE: Smallfoot (2018): selected media 1 / 17064

The original file is 4.1 which was encoded in Handbrake (this is the file in the library)

Full file info: fileinfo.txt (6.5 KB)

Then I used Plex Optimize Video feature and that created the mp4 file with profile 5.1… I guess I do not have to use that.

I just deleted that optimization Plex created and I tried to stream the file again… same issue, the file gets transcoded video+audio.

New server logs: Plex Media Server Logs_2019-02-06_16-33-05.zip (118.3 KB)

Thank you,
Daniel.

Well, I checked the logs and seems like the file gets transcoded because its width is 1920 and the profile indicates it should be no more than 1280.

Feb 06, 2019 16:31:29.264 [0x7f255777d700] DEBUG - MDE: analyzing media item 16025
Feb 06, 2019 16:31:29.264 [0x7f255777d700] DEBUG - MDE: Smallfoot (2018): Direct Play is disabled
Feb 06, 2019 16:31:29.264 [0x7f255777d700] DEBUG - MDE: Smallfoot (2018): media must be transcoded in order to use the hls protocol
Feb 06, 2019 16:31:29.264 [0x7f255777d700] DEBUG - MDE: Smallfoot (2018): no direct play video profile exists for http/mkv/h264/ac3
Feb 06, 2019 16:31:29.264 [0x7f255777d700] DEBUG - MDE: Smallfoot (2018): no direct play video profile exists for http/mkv/h264/ac3
Feb 06, 2019 16:31:29.264 [0x7f255777d700] DEBUG - Smallfoot - video.width limitation applies: 1920 > 1280
Feb 06, 2019 16:31:29.264 [0x7f255777d700] DEBUG - Smallfoot - video.width limitation applies: 1920 > 1280
Feb 06, 2019 16:31:29.264 [0x7f255777d700] DEBUG - MDE: Smallfoot (2018): no remuxable profile found, so video stream will be transcoded
Feb 06, 2019 16:31:29.265 [0x7f255777d700] DEBUG - Smallfoot - video.width limitation applies: 1920 > 1280
Feb 06, 2019 16:31:29.265 [0x7f255777d700] DEBUG - MDE: Cannot direct stream video stream due to profile or setting limitations
Feb 06, 2019 16:31:29.265 [0x7f255777d700] DEBUG - Codecs: hardware transcoding: testing API vaapi
Feb 06, 2019 16:31:29.266 [0x7f255777d700] DEBUG - Scaled up video bitrate to 3850Kbps based on 1.500000x fudge factor.
Feb 06, 2019 16:31:29.266 [0x7f255777d700] DEBUG - Scaled maximum bitrate for resolution reduction to 1713Kbps.
Feb 06, 2019 16:31:29.267 [0x7f255777d700] DEBUG - MDE: Cannot direct stream audio stream due to codec ac3 when profile only allows aac
Feb 06, 2019 16:31:29.267 [0x7f255777d700] DEBUG - MDE: Smallfoot (2018): selected media 0 / 16025

I might be reading the logs incorrectly, but that sure looks like the reason. (please correct me if I am wrong)

Anyways, ROKU documentation indicates 1920 is supported for h.264/hls.

Daniel.

I just downloaded version 1.15.0.659 the problem persist… I opened the profile Roku-7.x because the server logs shows that one as the profile in use and it shows:

    <VideoCodec name="h264">
      <Limitations>
        <UpperBound name="video.width" value="1920" isRequired="true" />
        <UpperBound name="video.height" value="1080" isRequired="true" />
        <UpperBound name="video.refFrames" value="8" />
        <UpperBound name="video.bitDepth" value="8" />
      </Limitations>
    </VideoCodec>

So the video is between the predefined limits… Why is it transcoding?..

PS: As a side node… How do I contact support?

Thank you,
Daniel.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.