Transcoder crashing, av_interleaved_write_frame(): Unknown error in logs

Server Version#: 1.19.4.2902
Player Version#: 1.12.0.1232-aacabe78
Running on Server 2019 1809

For the last few weeks I’ve been experiencing repeated crashes of the transcoder, found a few similar topics but figured I would open a new topic with logs in case the cause isn’t the same. Crash is being experience on all clients (Xbox, PS4, IOS, Roku, Windows, Web) local and remote when transcoding is used.

So far I’ve done a few things to troubleshoot:

  • Disabled Windows Defender
  • Disabled Windows Firewall
  • Manually check files with ffmpeg
  • Move transcode temp files to a faster disk (ssd)

I saw the post about port exhaustion so I checked the Windows event log and did EventID 4227 but the last occurrence was on May 31, as a quick attempt at a fix I’ve increased the TCP port count to 30k to see if it makes any difference. While watching a transcoded video I just kicked off all my library updates and got a crash not long after, did a TCP port count and saw this:

PS C:\Windows\system32> netstat -anobp TCP | measure-object -line

Lines Words Characters Property
----- ----- ---------- --------
29623

Grabbed the most recent crash with transcoder debug logs on and this seems to be the relevant lines:

Line 29986: Jun 05, 2020 14:04:06.321 [6728] INFO - [Transcoder] [segment @ 02d05140] Opening 'http://127.0.0.1:32400/video/:/transcode/session/l6x4jk9jhqjig4qgose81s7g/adca07ae-3bb7-41c1-b2db-9fd8d40e7084/seglist?X-Plex-Http-Pipeline=infinite' for writing
	Line 29987: Jun 05, 2020 14:04:06.323 [6728] DEBUG - [Transcoder] [tcp @ 00f10b80] Starting connection attempt to 127.0.0.1 port 32400
	Line 30468: Jun 05, 2020 14:04:11.354 [7148] DEBUG - [Transcoder] [tcp @ 00f10b80] Connection attempt to 127.0.0.1 port 32400 failed: Error number -138 occurred
	Line 30469: Jun 05, 2020 14:04:11.354 [7148] ERROR - [Transcoder] [tcp @ 00f10b80] Connection to tcp://127.0.0.1:32400 failed: Error number -138 occurred
	Line 30470: Jun 05, 2020 14:04:11.354 [7148] ERROR - [Transcoder] [segment @ 02d05140] Failed to open segment list 'http://127.0.0.1:32400/video/:/transcode/session/l6x4jk9jhqjig4qgose81s7g/adca07ae-3bb7-41c1-b2db-9fd8d40e7084/seglist?X-Plex-Http-Pipeline=infinite'
	Line 30471: Jun 05, 2020 14:04:11.355 [7148] DEBUG - [Transcoder] [AVIOContext @ 07dfb940] Statistics: 0 seeks, 12 writeouts
	Line 30472: Jun 05, 2020 14:04:11.355 [7148] ERROR - [Transcoder] av_interleaved_write_frame(): Unknown error
	Line 30473: Jun 05, 2020 14:04:11.355 [7148] DEBUG - [Transcoder] No more output streams to write to, finishing.

Plex Media Server Logs_2020-06-05_14-09-20.zip (4.7 MB)

Thanks

Pretty much confirmed that it’s the library scans causing the issue. I’ve only seen one crash since moving to daily scans and that looks like it was during a scan.

Any news from the plex team on a fix?

Do you happen to have over 4,000 movies in your library? I’ve been having the same problem for months. It’s apparently an issue with an update plex made to curl. Plex knows about it and it’s been going on for awhile now but… I’m not sure they’re doing anything to fix it. I know several people that have had this issue.

Right and that’s what I saw in the other thread with the same symptoms. I guess trying out the new scanner is the fix for now.

Strange thing is I don’t have anywhere near 4000 movies in any of my libraries. I was just hoping there would be some more details on a fix/update to the current version.

Thanks for pointing me to the new scanner.

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