Transcoding failing on some videos

Server Version#: 1.15.3.835
Player Version#: web 3.93.1 / IOS 5.12.1

I’m running PMS on Ubuntu 18.04.2 LTS. Never really had problems until recently some video seemed to fail when transcoding. This is happening when syncing content to my iPad (tested with 2 seperate devices) as well when optimizing versions on the web player.

I’m not seeing any consistency why one show is transcoding perfectly and another is not. Original files are in H264 - MPEG-4 AVC (part 10) avc1, as well the files that transcode fine as the ones that are failing. Files that are now failing used to transcode fine in the past. Direct Play is also working fine.

Turning hardware transcoding on/off has no effect, problems persist.

Server CPU is Intel Core i7-2600 CPU @ 3.40GHz, 4 cores and GPU Nvidia GeForce GTX460. Nvidia drivers are up to date.

When looking into the logs I find the following errors:

Mar 30, 2019 12:55:52.002 [0x7ff26c9c5700] WARN - Failed to find encoder 'h264_qsv'
Mar 30, 2019 12:55:52.002 [0x7ff26c9c5700] DEBUG - Codecs: testing h264_vaapi (encoder)
Mar 30, 2019 12:55:52.003 [0x7ff26c9c5700] DEBUG - Codecs: hardware transcoding: testing API vaapi
Mar 30, 2019 12:55:52.004 [0x7ff26c9c5700] ERROR - [FFMPEG] - libva: va_getDriverName() failed with unknown libva error,driver_name=(null)
Mar 30, 2019 12:55:52.004 [0x7ff26c9c5700] ERROR - [FFMPEG] - Failed to initialise VAAPI connection: -1 (unknown libva error).
Mar 30, 2019 12:55:52.004 [0x7ff26c9c5700] DEBUG - Codecs: hardware transcoding: opening hw device failed - probably not supported by this system, error: Input/output error
Mar 30, 2019 12:55:52.203 [0x7ff26c9c5700] ERROR - [FFMPEG] - No NVENC capable devices found
Mar 30, 2019 12:55:52.203 [0x7ff26c9c5700] WARN - avcodec_open2 returned -542398533 for encoder 'h264_nvenc'
Mar 30, 2019 12:55:52.203 [0x7ff26c9c5700] DEBUG - Codecs: hardware transcoding: testing API vaapi
Mar 30, 2019 12:55:52.203 [0x7ff26c9c5700] ERROR - [FFMPEG] - libva: va_getDriverName() failed with unknown libva error,driver_name=(null)
Mar 30, 2019 12:55:52.203 [0x7ff26c9c5700] ERROR - [FFMPEG] - Failed to initialise VAAPI connection: -1 (unknown libva error).
Mar 30, 2019 12:55:52.203 [0x7ff26c9c5700] DEBUG - Codecs: hardware transcoding: opening hw device failed - probably not supported by this system, error: Input/output error

Something else I found in the logs is a subtitle error on the ones that fail to transcode. Deleting the .srt doesn’t seem to fix it though, and I’m sure that certain failures used to transcode in the past, with the same .srt files.

Mar 30, 2019 12:55:52.665 [0x7ff26dffb700] ERROR - Couldn't find the file to stream: /volume1/video/Series/DC's Legends of Tomorrow/S03/DCs.Legends.of.Tomorrow.S03E02.HDTV.x264-LOL[rarbg].nl.srt

Any help or ideas are appreciated…
Thanks!

Moving the files to a new folder (e.g. The X-Files were failing to transcode, I then moved some episodes from the folder ‘The X Files’ to a new folder called ‘The X-Files’), library refresh and the files in the new folder are now transcoding… This works with or without the srt files that gave an error.

Tried the same with another series that wouldn’t transcode anymore: new folder, moved the files and yessir, transcoding works.

So I found a workaround, but this will be some effort to check which video’s give problems, create a new folder and move them. Hopefully there’s an easier solution?

Any ideas what is causing this? Maybe some cache I can reset (without throwing away all my metadata preferably :slight_smile: )?

Would you please recreate the errors and successes , succinctly (30 seconds run time) of each, DEBUG logging only (no VERBOSE).

Then collect the ZIP file and attach?

It’s impossible to deduce anything from a snippet which excludes the MDE and FFMPEG invocation command line.

I’m having the same issue with iOS devices. PMS v1.15.3.858

Plex Media Server Logs_2019-04-01_12-36-21.zip (4.1 MB)

Thanks for wanting to take a look at it. Attached you find the log files from today.

I did the test with ‘Disenchantment’:

  • tried to transcode file, it failed
  • created a new folder for the series (in this case ‘Disenchantment (2018)’)
  • moved the existing video and srt files to the new folder
  • let PMS auto refresh
  • transcode the same file again: works fine

Plex Media Server Logs_2019-04-02_17-53-40.zip (4.6 MB)

Apr 02, 2019 17:49:05.224 [0x7f5de57fa700] DEBUG - [Notify] New directory: "/volume2/video/Series/Plex Versions/Optimized for Mobile/Disenchantment", adding recursively.
Apr 02, 2019 17:49:05.224 [0x7f5de77fe700] DEBUG - TranscodeJobManager: initiating transcode of metadata item 71118
Apr 02, 2019 17:49:05.224 [0x7f5de57fa700] DEBUG - [Notify] Now watching "/volume2/video/Series/Plex Versions/Optimized for Mobile/Disenchantment"
Apr 02, 2019 17:49:05.224 [0x7f5e53fff700] DEBUG - BPQ: scheduled transcode for version metadata item 71118 
Apr 02, 2019 17:49:05.225 [0x7f5e53fff700] DEBUG - BPQ: 0 items removed from the queue
Apr 02, 2019 17:49:05.225 [0x7f5e53fff700] DEBUG - BPQ: [Processing] -> [Idle]
Apr 02, 2019 17:49:05.225 [0x7f5de77fe700] DEBUG - Cleaning directory for session 5a07586e-d9c5-43b3-9248-2af066e9e6f5 ()
Apr 02, 2019 17:49:05.225 [0x7f5de77fe700] DEBUG - Starting a transcode session 5a07586e-d9c5-43b3-9248-2af066e9e6f5 at offset -1.0 (state=3)
Apr 02, 2019 17:49:05.225 [0x7f5de77fe700] DEBUG - Streaming Resource: Added session 0x7f5dd80294f0:5a07586e-d9c5-43b3-9248-2af066e9e6f5
Apr 02, 2019 17:49:05.227 [0x7f5de77fe700] DEBUG - [Universal] Using local file path instead of URL: /volume2/video/Series/Disenchantment/S01/Disenchantment.s01e01.WEB-DL.720p.AlexFilm.mkv
Apr 02, 2019 17:49:05.227 [0x7f5de77fe700] DEBUG - HTTP requesting GET http://127.0.0.1:32400/library/streams/312163?X-Plex-Token=xxxxxxxxxxxxxxxxxxxx
Apr 02, 2019 17:49:05.227 [0x7f5e017fa700] DEBUG - Request: [127.0.0.1:34292 (Loopback)] GET /library/streams/312163 (8 live) GZIP Signed-in Token (Bugzke)
Apr 02, 2019 17:49:05.232 [0x7f5e017fa700] ERROR - Couldn't find the file to stream: /volume1/video/Series/Disenchantment/S01/Disenchantment.s01e01.WEB-DL.720p.AlexFilm.nl.srt
Apr 02, 2019 17:49:05.232 [0x7f5de77fe700] DEBUG - HTTP 404 response from GET http://127.0.0.1:32400/library/streams/312163?X-Plex-Token=xxxxxxxxxxxxxxxxxxxx
Apr 02, 2019 17:49:05.232 [0x7f5e61f3c700] DEBUG - Completed: [127.0.0.1:34292] 404 GET /library/streams/312163 (8 live) GZIP 4ms 331 bytes
Apr 02, 2019 17:49:05.233 [0x7f5de77fe700] DEBUG - Downloaded stream from [http://127.0.0.1:32400/library/streams/312163?X-Plex-Token=xxxxxxxxxxxxxxxxxxxx] (codec: srt) to temporary file [/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Cache/Transcode/Sessions/plex-transcode-5a07586e-d9c5-43b3-9248-2af066e9e6f5-cc575aed-e1ac-4c87-90f7-92bc547c3427/temp-0.srt]
Apr 02, 2019 17:49:05.233 [0x7f5de77fe700] DEBUG - HTTP requesting GET http://127.0.0.1:32400/library/streams/312164?X-Plex-Token=xxxxxxxxxxxxxxxxxxxx
Apr 02, 2019 17:49:05.233 [0x7f5e457fa700] DEBUG - Request: [127.0.0.1:34294 (Loopback)] GET /library/streams/312164 (9 live) GZIP Signed-in Token (Bugzke)
Apr 02, 2019 17:49:05.235 [0x7f5e457fa700] DEBUG - Content-Length of /volume2/video/Series/Disenchantment/S01/Disenchantment.s01e01.WEB-DL.720p.AlexFilm.nl.srt is 29211.
Apr 02, 2019 17:49:05.252 [0x7f5de77fe700] DEBUG - HTTP 200 response from GET http://127.0.0.1:32400/library/streams/312164?X-Plex-Token=xxxxxxxxxxxxxxxxxxxx
Apr 02, 2019 17:49:05.252 [0x7f5e6273d700] DEBUG - Completed: [127.0.0.1:34294] 200 GET /library/streams/312164 (8 live) GZIP 18ms 29211 bytes
Apr 02, 2019 17:49:05.252 [0x7f5de77fe700] DEBUG - Detected character set of UTF-8.
Apr 02, 2019 17:49:05.252 [0x7f5de77fe700] DEBUG - Downloaded stream from [http://127.0.0.1:32400/library/streams/312164?X-Plex-Token=xxxxxxxxxxxxxxxxxxxx] (codec: srt) to temporary file [/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Cache/Transcode/Sessions/plex-transcode-5a07586e-d9c5-43b3-9248-2af066e9e6f5-cc575aed-e1ac-4c87-90f7-92bc547c3427/temp-1.srt]
Apr 02, 2019 17:49:05.252 [0x7f5de77fe700] DEBUG - HTTP requesting GET http://127.0.0.1:32400/library/streams/312165?X-Plex-Token=xxxxxxxxxxxxxxxxxxxx
Apr 02, 2019 17:49:05.253 [0x7f5e017fa700] DEBUG - Request: [127.0.0.1:34296 (Loopback)] GET /library/streams/312165 (8 live) GZIP Signed-in Token (Bugzke)
Apr 02, 2019 17:49:05.256 [0x7f5e017fa700] DEBUG - Calculated media file path for path [media://d/5d22f861fd0c3d3d7c205edc9c9cebdd0ee16c2.bundle/Contents/Subtitles/nl/com.plexapp.agents.opensubtitles_01412d4485c7fa490d205dfdc7d4a66a4ad3a451.srt]: ["/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Media/localhost/d/5d22f861fd0c3d3d7c205edc9c9cebdd0ee16c2.bundle/Contents/Subtitles/nl/com.plexapp.agents.opensubtitles_01412d4485c7fa490d205dfdc7d4a66a4ad3a451.srt"]
Apr 02, 2019 17:49:05.260 [0x7f5e017fa700] DEBUG - Content-Length of /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Media/localhost/d/5d22f861fd0c3d3d7c205edc9c9cebdd0ee16c2.bundle/Contents/Subtitles/nl/com.plexapp.agents.opensubtitles_01412d4485c7fa490d205dfdc7d4a66a4ad3a451.srt is 31092.
Apr 02, 2019 17:49:05.260 [0x7f5e61f3c700] DEBUG - Completed: [127.0.0.1:34296] 200 GET /library/streams/312165 (8 live) GZIP 7ms 31092 bytes
Apr 02, 2019 17:49:05.260 [0x7f5de77fe700] DEBUG - HTTP 200 response from GET http://127.0.0.1:32400/library/streams/312165?X-Plex-Token=xxxxxxxxxxxxxxxxxxxx
Apr 02, 2019 17:49:05.260 [0x7f5de77fe700] DEBUG - Detected character set of UTF-8.
Apr 02, 2019 17:49:05.261 [0x7f5de77fe700] DEBUG - Downloaded stream from [http://127.0.0.1:32400/library/streams/312165?X-Plex-Token=xxxxxxxxxxxxxxxxxxxx] (codec: srt) to temporary file [/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Cache/Transcode/Sessions/plex-transcode-5a07586e-d9c5-43b3-9248-2af066e9e6f5-cc575aed-e1ac-4c87-90f7-92bc547c3427/temp-2.srt]
Apr 02, 2019 17:49:05.262 [0x7f5de77fe700] DEBUG - Job running: EAE_ROOT='/tmp/pms-c37a5319-5534-44b4-8577-a4324fcaf6c8/EasyAudioEncoder' FFMPEG_EXTERNAL_LIBS='/var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Codecs/a22632d-2132-linux-x86_64/' XDG_CACHE_HOME='/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Cache' XDG_DATA_HOME='/usr/lib/plexmediaserver/Resources' X_PLEX_TOKEN='xxxxxxxxxxxxxxxxxxxx' '/usr/lib/plexmediaserver/Plex Transcoder' '-codec:0' 'h264' '-codec:1' 'ac3' '-codec:2' 'ac3' '-noaccurate_seek' '-analyzeduration' '20000000' '-probesize' '20000000' '-i' '/volume2/video/Series/Disenchantment/S01/Disenchantment.s01e01.WEB-DL.720p.AlexFilm.mkv' '-noaccurate_seek' '-analyzeduration' '20000000' '-probesize' '20000000' '-i' '/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Cache/Transcode/Sessions/plex-transcode-5a07586e-d9c5-43b3-9248-2af066e9e6f5-cc575aed-e1ac-4c87-90f7-92bc547c3427/temp-0.srt' '-noaccurate_seek' '-analyzeduration' '20000000' '-probesize' '20000000' '-i' '/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Cache/Transcode/Sessions/plex-transcode-5a07586e-d9c5-43b3-9248-2af066e9e6f5-cc575aed-e1ac-4c87-90f7-92bc547c3427/temp-1.srt' '-noaccurate_seek' '-analyzeduration' '20000000' '-probesize' '20000000' '-i' '/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Cache/Transcode/Sessions/plex-transcode-5a07586e-d9c5-43b3-9248-2af066e9e6f5-cc575aed-e1ac-4c87-90f7-92bc547c3427/temp-2.srt' '-filter_complex' '[0:1] aresample=async=1:ocl='\''stereo'\'':osr=48000[0]' '-filter_complex' '[0:2] aresample=async=1:ocl='\''stereo'\'':osr=48000[1]' '-map' '0:0' '-codec:0' 'copy' '-map' '[0]' '-metadata:s:1' 'language=rus' '-codec:1' 'aac' '-b:1' '216k' '-map' '[1]' '-metadata:s:2' 'language=eng' '-codec:2' 'aac' '-b:2' '216k' '-f' 'mp4' '-map_metadata' '-1' '-map_chapters' '-1' '-movflags' '+faststart' '/volume2/video/Series/Plex Versions/Optimized for Mobile/Disenchantment/.inProgress/S01E01.mp4.6660' '-map' '0:3' '-metadata:s:0' 'language=rus' '-codec:0' 'copy' '-f' 'srt' '/volume2/video/Series/Plex Versions/Optimized for Mobile/Disenchantment/.inProgress/S01E01.mp4.6660.306322.sidecar' '-map' '0:4' '-metadata:s:0' 'language=eng' '-codec:0' 'copy' '-f' 'srt' '/volume2/video/Series/Plex Versions/Optimized for Mobile/Disenchantment/.inProgress/S01E01.mp4.6660.306323.sidecar' '-map' '1:s:0' '-metadata:s:0' 'language=dut' '-codec:0' 'copy' '-f' 'srt' '/volume2/video/Series/Plex Versions/Optimized for Mobile/Disenchantment/.inProgress/S01E01.mp4.6660.312163.sidecar' '-map' '2:s:0' '-metadata:s:0' 'language=dut' '-codec:0' 'copy' '-f' 'srt' '/volume2/video/Series/Plex Versions/Optimized for Mobile/Disenchantment/.inProgress/S01E01.mp4.6660.312164.sidecar' '-map' '3:s:0' '-metadata:s:0' 'language=dut' '-codec:0' 'copy' '-f' 'srt' '/volume2/video/Series/Plex Versions/Optimized for Mobile/Disenchantment/.inProgress/S01E01.mp4.6660.312165.sidecar' '-y' '-nostats' '-loglevel' 'quiet' '-loglevel_plex' 'error' '-progressurl' 'http://127.0.0.1:32400/video/:/transcode/session/5a07586e-d9c5-43b3-9248-2af066e9e6f5/cc575aed-e1ac-4c87-90f7-92bc547c3427/progress'
Apr 02, 2019 17:49:05.263 [0x7f5de77fe700] DEBUG - Jobs: Starting child process with pid 2295
Apr 02, 2019 17:49:05.314 [0x7f5e457fa700] DEBUG - Request: [127.0.0.1:34298 (Loopback)] PUT /video/:/transcode/session/5a07586e-d9c5-43b3-9248-2af066e9e6f5/cc575aed-e1ac-4c87-90f7-92bc547c3427/progress?status=startup (9 live) Signed-in Token (Bugzke)
Apr 02, 2019 17:49:05.314 [0x7f5e6273d700] DEBUG - Completed: [127.0.0.1:34298] 204 PUT /video/

PMS is in the process of optimizing (?) while attempting to play (notice the .inProgress directory).

This looks like all the library files need to be rescanned.

I suggest checking:

  1. Settings - Server - Library
  2. Show Advanced
  3. Enable auto detect
  4. Enable Partial.
  5. Save

Then force a manual rescan of all libraries given there are two volumes active here.

Thanks, I missed that it was searching in an old volume. Used to be on volume 1, though all is on volume2 now. Guess soms trash from the old locations is left behind… The library only has one location, namely “volume2”, so all references to volume1 should be purged.

  • auto detect is enabled
  • partial scanning is enabled
  • have tried “scan library files” multiple times

How can I force a rescan?

Or should I go for the “refresh metadata” option?

  1. Scan files (hover over the ellipsis for each library section and it will be available in the popup)
  2. Empty Trash
  3. Clean Bundles
  4. Refresh Metadata

Problem solved! Thanks for the assistance!

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