AC3 Transcoding to AAC

Server Version#: 1.25.0.5246
Player Version#: Roku Ultra (seen as Premiere+) 6.9.12.7411-08cd87cc9-PlexPreview

Screenshot #1
Screenshot #2
Screenshot #3

I have a file that I’ve encoded to AC3 from AAC using ffmpeg:

ffmpeg -i "Citizen X (1996).mkv" -codec copy -acodec ac3 "Citizen X (1996).mkv"

Using mediainfo, it shows me the file is AC3 encoded:

tophicles@syslog:/mnt/user/movies/Citizen X (1996)$ mediainfo "Citizen X (1996).mkv" 
General
Unique ID                                : 301530763685612555745739461009018925706 (0xE2D8B67316973A0273752968E2B7328A)
Complete name                            : Citizen X (1996).mkv
Format                                   : Matroska
Format version                           : Version 4
File size                                : 8.19 GiB
Duration                                 : 1 h 43 min
Overall bit rate mode                    : Variable
Overall bit rate                         : 11.4 Mb/s
Writing application                      : Lavf58.20.100
Writing library                          : Lavf58.20.100
ErrorDetectionType                       : Per level 1

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L4
Format settings                          : CABAC / 4 Ref Frames
Format settings, CABAC                   : Yes
Format settings, ReFrames                : 4 frames
Codec ID                                 : V_MPEG4/ISO/AVC
Duration                                 : 1 h 43 min
Bit rate mode                            : Variable
Bit rate                                 : 11.0 Mb/s
Maximum bit rate                         : 15.0 Mb/s
Width                                    : 1 920 pixels
Height                                   : 1 080 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Variable
Original frame rate                      : 23.976 FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Stream size                              : 7.89 GiB (96%)
Writing library                          : x264 core 148 r2623 d5b2374
Encoding settings                        : cabac=1 / ref=4 / deblock=1:-1:-1 / analyse=0x3:0x133 / me=umh / subme=9 / psy=1 / psy_rd=1.00:0.15 / mixed_ref=1 / me_range=24 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-3 / threads=34 / lookahead_threads=5 / sliced_threads=0 / nr=150 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=8 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=120 / keyint_min=61 / scenecut=0 / intra_refresh=0 / rc_lookahead=120 / rc=crf / mbtree=1 / crf=18.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / vbv_maxrate=15000 / vbv_bufsize=31250 / crf_max=0.0 / nal_hrd=vbr / filler=0 / ip_ratio=1.40 / aq=3:1.00
Default                                  : Yes
Forced                                   : No
Color range                              : Limited
Color primaries                          : BT.709
Transfer characteristics                 : BT.709
Matrix coefficients                      : BT.709

Audio
ID                                       : 2
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Commercial name                          : Dolby Digital
Codec ID                                 : A_AC3
Duration                                 : 1 h 43 min
Bit rate mode                            : Constant
Bit rate                                 : 192 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 31.250 FPS (1536 SPF)
Bit depth                                : 16 bits
Compression mode                         : Lossy
Stream size                              : 142 MiB (2%)
Writing library                          : Lavc58.35.100 ac3
Language                                 : English
Service kind                             : Complete Main
Default                                  : Yes
Forced                                   : No

Text
ID                                       : 3
Format                                   : UTF-8
Codec ID                                 : S_TEXT/UTF8
Codec ID/Info                            : UTF-8 Plain Text
Duration                                 : 1 h 40 min
Language                                 : English
Default                                  : No
Forced                                   : No

If you examine the screenshots, you’ll see that the Plex server sees the file has AC3 encoding, but continues to transcode it to AAC (no Direct Play). Any idea why?

Plex Media Server Logs_2021-11-16_23-50-58.zip (5.5 MB)

Apologies for the incorrect forum placement :slight_smile:

From what I can tell looking at the server logs, the Roku has asked the server to play a compatible format, and not direct play. The server indicates that AC3 is not compatible, indicating the Roku is not exposing AC3 as a supported format. I may be able to provide more insight with Roku logs.

Please follow these steps and report back, and I will check the logs.

  • Open the Plex channel
  • Enable Remote Logging in the settings
  • Close and reopen the Plex channel
  • Attempt play the same content
  • Wait for it to start
  • Stop playback, and disable remote logging.
  • Report back with the time/timezone you tested this.

Aside from this, you may want to check the Roku audio settings, outside of the Plex channel.

  • Roku - > Settings → Audio and verify all the modes are set to Auto. If set to stereo, it’s possible AC3 is not exposed as a valid codec.

Remote logging enabled, played, stopped and then disabled.
Time was approximately 00:40 - 00:42 EST (12:40am - 12:42am Eastern Standard)

I have verified the Roku audio settings are set to auto.

For some reason, the logs are missing some important bits. Maybe a network issue sending them, but I can see the Roku is indicating that it only supports stereo. The info I was looking for was what specific codecs. If you can, please trying enabling remote logging again, and let me know when done. I can take a look at the logs one more time.

How is the Roku plugged in? Is it connected via HDMI to a TV, amp, etc. Is there anything else in the path like an HDMI switch etc?

You could try switching the audio mode to something manual. e.g. Digital Audio Output set to custom, and choose Dolby Digital.

I did test a few more devices, and if the Roku doesn’t negotiate audio properly in auto mode (HDMI handshake issues), or is set to stereo, it may only support PCM stereo. Just a heads up, so a first step is checking how the Roku is plugged in, and if it’s just a straight HDMI to TV/AMP, try setting the mode to Dolby Digital in the Roku audio settings.

Thanks for the effort thus far, I appreciate it!
The Roku is plugged directly into HDMI3 on the TV (it’s HDMI ARC).
I did have the audio set to “Dolby Digital” on the Roku originally it didn’t seem to make a difference. I’ll try again tonight and see if I get a different result.

I’m going to try from a Roku here at work and see if there’s a difference. Perhaps it’s something on my TV (Sony Bravia 65 Android).

Ok, so it’s definitely something at home… just tried on my Roku here at work and it’s Direct Playing AC3. The plot thickens!
ac3

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