Welcome to our forums! Please take a few moments to read through our Community Guidelines (also conveniently linked in the header at the top of each page). There, you'll find guidelines on conduct, tips on getting the help you may be searching for, and more!

AC3/DD audio transcode causes glitches in video

R3dbvllR3dbvll Members Posts: 19 ✭✭
edited August 8 in Android TV & Amazon Fire TV

I have an Amazon Fire TV Stick gen 2 (it replaced a gen 1).
For reference, the Fire Stick is plugged directly into an Onkyo AVR which supports DD, and DD+.

On the gen 1, I could stream my MKV DVD rips with no transcoding. Because of the on-going issue with Plex on the Tv Stick 2, I've had to turn off DD support. This forces plex to transcode the audio, which my AVR processes as PCM.

Most of the time this works fine. But on some DVDs, some scenes become quite pixelated as if some kind of processing effect is in play. If I turn DD support back on, the video is fine. Either way, Plex tells me that there is no video transcode going on.

An example DVD where this happens is the BBC adaption of 'Emma'. It happens quite a lot in the first 2 minutes of the first episode for example.

I should also say that the plex server is running on a PC with a Core I5 7600K and 16GM RAM. The MKVs are on a Synology Diskstation. The PC and diskstation are connected over ethernet. The Fire TV obviously uses WiFi - 5G with a very good signal, and can stream 130mb/s.

Anyone got any thoughts?

TIA

Answers

  • R3dbvllR3dbvll Members Posts: 19 ✭✭

    @MovieFan.Plex as discussed in this thread

    I just tried it again.

    The film in question is 'Emma' - its actually a single series TV programme on DVD - http://thetvdb.com/?tab=series&id=117411&lid=7

    A good example is from 2 min 44 seconds, for about 10 seconds. I've uploaded a couple of photos I took of the TV screen for reference.

    I've attached the server log for the time I was playing Emma.

    Can you tell me how I can get the logs from the Plex client?

    Here is the XML:


    <Video ratingKey="101455" key="/library/metadata/101455" parentRatingKey="101454" grandparentRatingKey="101453" guid="com.plexapp.agents.thetvdb://117411/1/1?lang=en" librarySectionID="14" librarySectionKey="/library/sections/14" type="episode" title="Episode 1" grandparentKey="/library/metadata/101453" parentKey="/library/metadata/101454" grandparentTitle="Emma (2009)" parentTitle="Season 1" summary="Rich, independent and kind-spirited, Emma Woodhouse has no need to marry, but nothing delights her more than matchmaking those around her. Once she has married off her close companions, she alights upon the pretty Harriet Smith to fashion into her new playmate and ally.

    She persuades Harriet that she is too good for her suitor, the farmer Robert Martin, and encourages her to set her sights higher. But close family friend Mr Knightley warns Emma that her meddling will cause great pain - to both Robert and Harriet. Emma refuses to listen, and Mr Knightley is furious at Emma's stubbornness." index="1" parentIndex="1" rating="7.6" viewOffset="171109" viewCount="2" lastViewedAt="1496254996" year="2009" thumb="/library/metadata/101455/thumb/1495961750" art="/library/metadata/101453/art/1485976032" parentThumb="/library/metadata/101454/thumb/1485977548" grandparentThumb="/library/metadata/101453/thumb/1485976032" grandparentArt="/library/metadata/101453/art/1485976032" duration="3392560" originallyAvailableAt="2009-10-04" addedAt="1485975988" updatedAt="1495961750" chapterSource="media">












    Many thanks for any help or insight you can offer!

  • R3dbvllR3dbvll Members Posts: 19 ✭✭

    Just to add - this was with direct streaming and direct play turned on. The video was not being transcoded (according to Plex - you can see in one of the images in the top left of the screen).

    When Dolby Digital support is turned on, DD is passed-thru to my AVR, and I don't get this weird graphical issue.

  • JuiceWSAJuiceWSA Members Posts: 5,619 ✭✭✭✭✭
    edited May 31

    That XML contains nothing about the streams.

    Need the full set of log files:
    https://support.plex.tv/hc/en-us/articles/200250417-Plex-Media-Server-Log-Files

    A brief look reveals that video may have an mpeg2 video stream in an MKV container:

    May 31, 2017 19:21:27.147 [12552] DEBUG - MDE: computed resolution bounding box of 720x576.
    May 31, 2017 19:21:27.147 [12552] DEBUG - Scaled up video bitrate to 10255Kbps based on 1.500000x fudge factor.
    May 31, 2017 19:21:27.147 [12552] DEBUG - Codecs: testing mp3_mf (encoder)
    May 31, 2017 19:21:27.147 [12552] DEBUG - Codecs: testing aac_mf (encoder)
    May 31, 2017 19:21:27.147 [12552] DEBUG - MDE: received PLEX_PROTOCOL_ANY from client, selected protocol hls
    May 31, 2017 19:21:27.147 [12552] DEBUG - MDE: analyzing media item 96838
    May 31, 2017 19:21:27.147 [12552] DEBUG - MDE: E1 - Episode 1: Direct Play is disabled
    May 31, 2017 19:21:27.147 [12552] DEBUG - MDE: E1 - Episode 1: media must be transcoded in order to use the hls protocol
    May 31, 2017 19:21:27.147 [12552] DEBUG - MDE: E1 - Episode 1: no direct play video profile exists for http/mkv/mpeg2video
    May 31, 2017 19:21:27.147 [12552] DEBUG - MDE: E1 - Episode 1: no direct play video profile exists for http/mkv/mpeg2video/ac3
    May 31, 2017 19:21:27.147 [12552] DEBUG - Episode 1 - video.bitrate limitation applies: 6837 > 3179
    May 31, 2017 19:21:27.147 [12552] DEBUG - MDE: E1 - Episode 1: Direct Streaming is disabled, so video stream will be transcoded
    May 31, 2017 19:21:27.147 [12552] DEBUG - MDE: E1 - Episode 1: no remuxable profile found, so video stream will be transcoded
    May 31, 2017 19:21:27.147 [12552] DEBUG - MDE: computed resolution bounding box of 720x576.
    May 31, 2017 19:21:27.147 [12552] DEBUG - Scaled up video bitrate to 10255Kbps based on 1.500000x fudge factor.
    May 31, 2017 19:21:27.147 [12552] DEBUG - MDE: E1 - Episode 1: Audio Direct Streaming is disabled, so video's audio stream will be transcoded
    

    Log files aren't really my thing, but it looks like you don't have Direct Play - Auto and Direct Stream - Enabled.

    It could also have something to do with your quality settings in the app not being high enough to cover the bit rate of the video, or the Fire Stick is unable to transfer enough bit rate through the WiFi, and/or Plex's brave new auto chicken-choker mode kicking in to further destroy an already marginal piece of media.

    It also appears Plex's transcoder is hard at work messing up stuff and misreporting it's actions because while the Video says is 'Direct' on screen the log says it's being transcoded and that follows because if Plex isn't doing anything to the video stream it can't inject it's madness into the picture portion of the picmission... clearly it is.

    Hot tip:
    If you're going to use SD material you'd better make certain it Direct Plays. Otherwise Plex is going to destroy it. Pretty much like your pictures prove.

    Tony

    FileBot For Easy Plex File Naming: http://www.filebot.net/

    Automated Plex Naming With Filebot: https://forums.plex.tv/discussion/191687/plex-naming-schemes-for-filebot

    Plex Friendly Handbrake Guide - DVDs/BluRays: https://forums.plex.tv/discussion/comment/1335697/#Comment_1335697

    Plex Clients: AFTVs, Androids, PMP, Rokus (running RARflix: http://streamfree.tv/roku-channels/private/all/rarflix-108-thread.html )

  • R3dbvllR3dbvll Members Posts: 19 ✭✭

    Hi Juice (been away on holiday).

    This was with direct play turned on.
    With direct play on and DD support turned on, the visuals work perfectly.

    However there is currently a fault in the player on plex/fire tv where by DD 5.1 sound cuts out (there is a whole thread about this on the Fire TV (not the Stick)).

    To get around this, turn off DD support, so plex then does the work of transcoding the audio to PCM (I think), which works fine, but for some reason on some video sources the video intself suffers this weird artifaction. Plex tells me no video transcoding is going on.

    Bear in the mind that I have very good wifi bandwidth over 5G, and Plex on my fire stick (gen 2) is easily able to play much higher bitrate material (I have blurays handbraked to 10mb/s MKVs)

    I'll try to grab the log files you mention.

  • JuiceWSAJuiceWSA Members Posts: 5,619 ✭✭✭✭✭
    edited June 21

    OK.

    There are a few updates in the wings we're waiting on to go public that may address this issue, but those log files could reveal something not immediately apparent by just talking about it.

    Now this is strange, but I should mention it. I have a Chinese TV with some external speakers (2). One would think AC3 5.1 would be something you wouldn't want to try to use with this setup, but for some reason only the Chinese know this TV deals with AC3 5.1 just fine. So I enabled AC3 audio in the Plex app and also changed the AFTV device audio to DD Auto instead of Stereo. Go figger.

    I get a whole lot of stuff to Direct Play when logic dictates it should be transcoding or be unheard. You may want to give it a shot.

    There is absolutely something going on with that video stream and information overlay isn't reporting it. Let's hope those log files lead us to that area and let us know what's happening.

    Tony

    FileBot For Easy Plex File Naming: http://www.filebot.net/

    Automated Plex Naming With Filebot: https://forums.plex.tv/discussion/191687/plex-naming-schemes-for-filebot

    Plex Friendly Handbrake Guide - DVDs/BluRays: https://forums.plex.tv/discussion/comment/1335697/#Comment_1335697

    Plex Clients: AFTVs, Androids, PMP, Rokus (running RARflix: http://streamfree.tv/roku-channels/private/all/rarflix-108-thread.html )

  • R3dbvllR3dbvll Members Posts: 19 ✭✭

    I know I've not been back to this for a little while (life and work got in the way).

    This is still very much a relevant issue. I have captured both server and client side logs at the moment the problem happens. Should I add them to this thread or start a new one?
    I want to recap the issue, and provide some more background information:

    My setup
    * Plex Media Server Version 1.7.5.4035 running on Windows 10
    * Core i5-7600K
    * 16GB RAM
    * PMS running on Samsung SSD
    * Video files stored on Synology DS410J NAS, mounted to Windows PC via SMB
    * PC and NAS connected to network over ethernet, via Asus RT-AC68U router
    * Plex client running on Amazon Fire TV Stick Gen 2 connected to network via 5Ghz WiFi (rough test of through-put shows over 100mb/s)

    Background

    Ever since I got the gen 2 AFTV Stick I've found that Plex cannot play Dolby Digital (AC3) audio without frequent pauses. There is another long-running thread on this issue, which is about the Fire TV not the Stick, but the problem is the same.

    The work-around is to turn off DD support in the Plex client. This forces an audio transcode to AAC. I have also modified the android.xml file for PMS so that transcode is to 6 channels, as most of my films have 5.1 support.

    The issue

    For the most part, transcoding to AAC works fine. However, I have noticed that on a number of films and TV shows (regardless of age), whilst the audio is fine, the video will spontaneously become blocky for a few seconds. This is repeatable - you can view the same section of film/TV and have the effect repeated.

    This does not happen if Dolby Digital passthrough support is turned on in the client, so that there is no audio transcode.
    Note that when the problem happens, Plex claims (in the UI) that there is no video transcode happening, only audio.

    These films/tv shows are in MKV containers and are MPEG-2, taken straight from the source DVD using MakeMKV.
    If I transcode the affected video to H.264 using Handbrake the problem goes away. However, I do not wish to transcode my whole library.

    I have tested the following scenarios:

    • DD support on : audio interuptions but video has no problems (not use-able)
    • DD support off, and:
    1. Audio transcode to AAC by plex client (6 channel) : video problem occurs
    2. Audio transcode to AAC by plex client (2 channel) : video problem occurs
    3. AAC created using Handbrake and re-muxed into original MKV : Video problem occurs
    4. Transcode video to H.264 using handrake : no audio or video problem
    5. Force plex to transcode video on the fly : no audio or video problem

    It seems the issue is related to two things:
    1. The video being MPEG-2
    2. The audio being transcoded to AAC by Plex

    I have the PMS server logs and the plex client logs if that helps.
    The video I tested was the 2009 BBC TV adaption of 'Emma', Episode 1 about 2 minutes and 43 seconds in.
    In the logs, this is at 08-06 19:26:12:296.

    Hopefully someone can help. I'd like to at least understand what is causing the problem if nothing else. Finding a solution (at least until DD support works again) would be ideal.

  • R3dbvllR3dbvll Members Posts: 19 ✭✭

    I've attached the server and client logs.

  • R3dbvllR3dbvll Members Posts: 19 ✭✭

    @MovieFan.Plex sorry to be a pain, but would it be possible to take a look at this?
    I would imagine this would be affecting other users, but perhaps it is a configuration issue just for me.

    Appreciate any help!

    Thanks

Sign In or Register to comment.