Veritcal blue artifact lines while transcoding on DS918+

server-synology

#1

I’m having this issue when ever a video needs transcoding (usually due to remote streaming over constrained bandwidth). The issue happens with multiple source files to multiple different clients. I have hardware transcoding configured running on PMS 1.13.2.5154. Hardware is a Synology DS918+ with 8GB of RAM running DSM 6.1.7-15284. See picture examples below of the artifacts:


I’ve attached my log files for consideration.

Thanks!


#2

I will need to see the XML of what you’re playing as well as whether or not you’re using HW transcoding but looking at your logs tells me your Synology is pretty seriously overloaded for I/O. 121 seconds to query the database = 2 minutes which is not acceptable :slight_smile:

You also have autotagging enabled (just added a lot of photos ?) and it’s throttled due to overload.

How much memory is installed? Hardware transcoding needs memory. With the amount of activity from other tasks, I wonder if there’s really enough .

What happens if you cancel photo library scanning?
How many photos did you add?
Would you please cancel any and all scannng then hover over Libraries, click the ellipsis, and click “Optimize Databse” then restart PMS?

Jun 11, 2018 16:18:52.791 [0x7f2c210d7700] WARN - AutoTagging: the service is currently throttled, skipping item 26696
Jun 11, 2018 16:18:52.793 [0x7f2c143ff700] WARN - AutoTagging: the service is currently throttled, skipping item 16871
Jun 11, 2018 16:18:52.794 [0x7f2c210d7700] WARN - AutoTagging: the service is currently throttled, skipping item 16805
Jun 11, 2018 16:18:52.798 [0x7f2c210d7700] WARN - AutoTagging: the service is currently throttled, skipping item 16898
Jun 11, 2018 16:18:52.798 [0x7f2c143ff700] WARN - AutoTagging: the service is currently throttled, skipping item 8643
Jun 11, 2018 16:18:52.800 [0x7f2c210d7700] WARN - AutoTagging: the service is currently throttled, skipping item 8642
Jun 11, 2018 16:18:52.802 [0x7f2c143ff700] WARN - AutoTagging: the service is currently throttled, skipping item 8645
Jun 11, 2018 16:18:52.804 [0x7f2c210d7700] WARN - AutoTagging: the service is currently throttled, skipping item 13924
Jun 11, 2018 16:18:52.806 [0x7f2c143ff700] WARN - AutoTagging: the service is currently throttled, skipping item 15674
Jun 11, 2018 16:18:52.807 [0x7f2c210d7700] WARN - AutoTagging: the service is currently throttled, skipping item 13925
Jun 11, 2018 16:18:52.809 [0x7f2c143ff700] WARN - AutoTagging: the service is currently throttled, skipping item 15675
Jun 11, 2018 16:18:52.811 [0x7f2c210d7700] WARN - AutoTagging: the service is currently throttled, skipping item 16170
Jun 11, 2018 16:18:52.812 [0x7f2c143ff700] WARN - AutoTagging: the service is currently throttled, skipping item 12788
Jun 11, 2018 16:18:52.814 [0x7f2c210d7700] WARN - AutoTagging: the service is currently throttled, skipping item 6512
Jun 11, 2018 16:18:52.815 [0x7f2c143ff700] WARN - AutoTagging: the service is currently throttled, skipping item 20734
Jun 11, 2018 16:18:52.817 [0x7f2c210d7700] WARN - AutoTagging: the service is currently throttled, skipping item 21594
Jun 11, 2018 16:18:52.819 [0x7f2c143ff700] WARN - AutoTagging: the service is currently throttled, skipping item 20755
Jun 11, 2018 16:18:52.820 [0x7f2c210d7700] WARN - AutoTagging: the service is currently throttled, skipping item 20756
Jun 11, 2018 16:18:52.822 [0x7f2c143ff700] WARN - AutoTagging: the service is currently throttled, skipping item 12715
Jun 11, 2018 16:18:52.824 [0x7f2c210d7700] WARN - AutoTagging: the service is currently throttled, skipping item 12732
Jun 11, 2018 16:18:52.825 [0x7f2c143ff700] WARN - AutoTagging: the service is currently throttled, skipping item 12741
Jun 11, 2018 16:18:52.827 [0x7f2c210d7700] WARN - AutoTagging: the service is currently throttled, skipping item 12749
Jun 11, 2018 16:18:52.828 [0x7f2c143ff700] WARN - AutoTagging: the service is currently throttled, skipping item 16129
Jun 11, 2018 16:18:52.830 [0x7f2c210d7700] WARN - AutoTagging: the service is currently throttled, skipping item 8865
Jun 11, 2018 16:18:52.832 [0x7f2c143ff700] WARN - AutoTagging: the service is currently throttled, skipping item 20200
Jun 11, 2018 16:18:52.833 [0x7f2c210d7700] WARN - AutoTagging: the service is currently throttled, skipping item 20921
Jun 11, 2018 16:19:01.680 [0x7f2c13e23700] ERROR - Throttle: timed out trying to read chunk 17
Jun 11, 2018 16:19:14.084 [0x7f2c14111700] ERROR - Throttle: timed out trying to read chunk 5
Jun 11, 2018 16:22:46.866 [0x7f2c1326b700] WARN - Waited one whole second for a busy database.
Jun 11, 2018 16:23:13.179 [0x7f2c1326b700] ERROR - Failed to delete session directory (boost::filesystem::remove: No such file or directory: "/volume1/Plex/Library/Application Support/Plex Media Server/Cache/Transcode/Sessions/plex-transcode-x3mfzx2o9w55bg0sgplul3di-405253b5-29f5-4edf-a711-f476551d9506/chunk-00101")
Jun 11, 2018 16:23:13.305 [0x7f2c28911700] WARN - SLOW QUERY: It took 121270.000000 ms to retrieve 10 items.
Jun 11, 2018 16:23:13.796 [0x7f2c14111700] ERROR - Throttle: timed out trying to read chunk 115
Jun 11, 2018 16:23:38.698 [0x7f2c14111700] ERROR - Throttle: timed out trying to read chunk 11
Jun 11, 2018 16:24:04.916 [0x7f2c22e23700] ERROR - Failed to delete session directory (boost::filesystem::remove: No such file or directory: "/volume1/Plex/Library/Application Support/Plex Media Server/Cache/Transcode/Sessions/plex-transcode-rvhpwbaremn6wecjpjvklz0k-0f0c1efc-7e7f-47f9-b656-02440a21fe84/chunk-00013")
Jun 11, 2018 16:24:05.158 [0x7f2c216b3700] WARN - SLOW QUERY: It took 210.000000 ms to retrieve 39 items.
Jun 11, 2018 16:30:03.685 [0x7f2c13847700] INFO - AutoUpdate: no updates available

Also you are showing these back to back which is a bad sign of a fragmented database caused by adding a lot of items (e.g. Photos) to index.

Jun 10, 2018 18:44:10.316 [0x7f81f788f700] WARN - Held transaction for too long (../Library/MetadataItem.cpp:7224): 16.940000 seconds
Jun 10, 2018 18:44:12.808 [0x7f81fe11d700] WARN - Took too long (0.190000 seconds) to start a transaction on ../Library/MetadataCollection.cpp:172
Jun 10, 2018 18:44:12.808 [0x7f81fe11d700] WARN - Transaction that was running was started on thread 0x7f81f788f700 at ../Library/MetadataItem.cpp:925
Jun 10, 2018 18:44:13.556 [0x7f81fe6f9700] WARN - SLOW QUERY: It took 480.000000 ms to retrieve 38 items.
Jun 10, 2018 18:44:14.465 [0x7f81e91a5700] WARN - SLOW QUERY: It took 550.000000 ms to retrieve 40 items.
Jun 10, 2018 18:44:16.886 [0x7f81e91a5700] WARN - SLOW QUERY: It took 910.000000 ms to retrieve 30 items.
Jun 10, 2018 19:02:12.976 [0x7f81fc7ff700] INFO - Library section 1 (Movies) will be updated because of a change in /volume1/Media/Movies
Jun 10, 2018 19:02:20.928 [0x7f81e6e7d700] WARN - SLOW QUERY: It took 210.000000 ms to retrieve 38 items.
Jun 10, 2018 19:02:21.086 [0x7f81e82ff700] WARN - SLOW QUERY: It took 280.000000 ms to retrieve 1 items.
Jun 10, 2018 19:02:21.166 [0x7f81e9493700] WARN - SLOW QUERY: It took 370.000000 ms to retrieve 30 items.
Jun 10, 2018 19:02:21.964 [0x7f81e9493700] WARN - SLOW QUERY: It took 220.000000 ms to retrieve 75 items.
Jun 10, 2018 19:03:13.975 [0x7f81e9781700] ERROR - QueryParser: Invalid field 'onlyTransient' found, ignoring.

#3

Thank you for the quick response! Find below the XML file for one of the files. I added a lot photos a few months back but the only photos getting added recently are just what gets backed up from my phone (maybe a couple a day). I have 8GB of RAM installed.


#4

I would like you to optimize the database and restart PMS. Until you do that, PMS is going to consistently fail. Also in Settings - Server - Scheduled Tasks, please make certain Database Optimization is enabled and the Syno is running during that time. You DB is (frankly) a disaster. :slight_smile:

You might have found the limit of what the ApolloLake GPU can do and it also can be an artifact of the transfer. Was this a remux when ripping or a re-encode? HEVC HDR at 60+ Mbps makes sense but dropping to AC-3 audio doesn’t.

updatedAt="1528683079" audienceRatingImage="rottentomatoes://image.rating.spilled" chapterSource="agent" primaryExtraKey="/library/metadata/33079" ratingImage="rottentomatoes://image.rating.rotten"><Media videoResolution="4k" id="36275" duration="5834000" bitrate="61465" width="3840" height="2160" aspectRatio="1.78" audioChannels="2" audioCodec="ac3" videoCodec="hevc" container="mkv" videoFrameRate="24p" videoProfile="main 10"><Part accessible="1" exists="1" id="36600"

#5

I optimized the database (twice) and restarted PMS. I’m still seeing the blue vertical artifacts but after doing more tests it appears to only be doing it with HEVC video files. It doesn’t seem to matter the bitrate of the HEVC video file (2Mbs - 60Mbs) as all the ones I’ve tried have the artifact. I’m still seeing ‘SLOW Query’ messages in the logs (fresh batch of logs included for your reference). Thanks!


#6

I reviewed your next set of logs.

Given the errors persist and not knowing what other apps you have installed on the Syno, I’d like to conduct a basic test if you’re willing.

  1. Stop PMS
  2. Control Panel - Shared Folders - Edit the Plex share - Permissions Tab - Give your username R/W permission - Save - Close
  3. File Station - navigate to the Plex share
  4. Rename Library to Library.SAVE (we are setting your existing Library off to the side for safe keeping while we investigate)
  5. Start PMS
  6. Open your browser to http://ip.addr.of.syno:32400/web
  7. You’ll see the familiar Sign in & Greeting from the setup wizard.
  8. I would like you to setup ONE library section only; preferably a small one -OR- the one with that movie folder in it. (a ‘special’ mini library so to speak)
  9. A key point before clicking Add is to uncheck thumbnail generation. We don’t need them. They’re very taxing on the CPU.
  10. Let it build
  11. Go to Settings - Server - Transcoder and make certain to enable Hardware Acceleration
  12. When the Syno is quiescent, test playback

#7

Performed the above test. Moved two HEVC video files in to the new test library. One a 60Mbs video file and the other a 10Mbs video file. They both show the same vertical blue artifacts. Find attached another set of logs. The artifacts seem to become less noticeable as the bitrate increases. Ie. at 2Mbs they are very noticeable where at 8Mbs they are difficult to see. They also aren’t always blue vertical bars. Some times they appear as sections of the video being sliced out vertically and shifted to to the side.


#8

If you take the 2 and 8 Mbps videos and play with with HW transcoding turned off? Is it still visible? I’m not looking for “Less/more” . I’m looking for the “Yes, it’s still visible” or “No, not visible”


#9

The artifacts went away when I disabled hardware transcoding. The squirrels in my NAS sure got tired turning their wheels without the hardware support. :slight_smile:


#10

LOL. Synology squirrels aren’t as good as they used to be. I don’t know who the breeder is but the definitely need a new one :smiley:

Is there a way I may have a couple minutes of that video? I will like to see if I can replicate.

dd is the perfect tool if you are familiar with it. If not, ffmpeg or the Plex transcoder will work.

Also, what can you tell of me the playback client(s) ?


#11

I’ll see if I can mux out a 2 minute piece of the video. Do you have a preference where I upload the video? The clients I’ve tested with include a current generation Macbook Pro running the Plex client, a Google Chrome Book running plex in a web browser, an Android Samsung Galaxy 5 running the Plex App. They all show the same artifacts.


#12

I’m uploading a different package binary for you to try unless you already have it. Do you have 1.13.0 ?


#13

Where you upload it is your choice. Send me the link in PM, reference this thread please for my sanity sake, what little is left :slight_smile:


#14

I’m currently running 1.13.2.5154. I don’t have anything from the 1.13.0 train on tap.


#15

PMS v1.13.0 still has the artifacts so no changes there. I’ll PM you the link to the video sample.


#16

I have discussed this with @ChuckPA . There is an upstream error in the Intel Linux Video Acceleration Library. This is further discussed in the following thread which also provides a workaround. The root issue has to be fixed by Intel :frowning:


#17

Interesting. Was just about to paste this comparison of the hardware vs software transcoders:



#18

I used the script provided by @jaB00M in forums.plex.tv/discussion/305999/color-corruption-on-resize-when-hw-transcoding-hevc-content-to-h264-4k-subs-synology-ds918-nas which worked perfectly and was a super easy fix.

@ChuckPA , thanks for all of you help! You definitely went above and beyond. Do you have any recommendations to address the SLOW QUERYs? Would you recommend doing the DB repair procedure? Thanks!


#19

DB repair has a few issues to be worked out. The procedure and the recent schema change are not 100% compatible unless you follow it perfectly (which is to DROP a specific record from the DB)

The safest source is to Optimize Database. If this doesn’t provide the relief needed then manual intervention (the export / import sequence is needed)