What is wrong with this external subtitle (srt)?

Server Version#: 1.25.2.5319
Player Version#: 3.4.0 (webOS app)

I’m getting an error on webos player when I tried a movie with an external srt file. You can find that errror as “Invalid data found when processing input” on the logs below.

When I tried to upload (an external srt) a different srt file to test, it’s playing well. I couldn’t undertstand what is wrong with this srt file? How can I fix it if it is broken. Is it broken? or plex server or webos client can’t handle it somehow? Could you please help me?

I attached related srt file.

btw I’ve used many srt files on many videos before and never got an issue like this before.

Thanks.

Apr 08, 2022 12:29:41.047 [0xb0e17d48] DEBUG - [Transcode/JobRunner] Jobs: Starting child process with pid 4254
Apr 08, 2022 12:29:41.056 [0xb0e4fd48] DEBUG - Play progress on 3870 'A Hero' - got played 741269 ms by account 1!
Apr 08, 2022 12:29:41.064 [0xb0da0d48] DEBUG - Request: [127.0.0.1:33018 (Loopback)] PUT /video/:/transcode/session/h7ocjuxhu102j4i01npr440i/41d174f8-70a7-4126-a7f6-a40b817ac12c/progress?status=startup (11 live) Signed-in Token (tlgcntn) (range: bytes=0-) 
Apr 08, 2022 12:29:41.065 [0xb21b8d48] DEBUG - Completed: [127.0.0.1:33018] 204 PUT /video/:/transcode/session/h7ocjuxhu102j4i01npr440i/41d174f8-70a7-4126-a7f6-a40b817ac12c/progress?status=startup (11 live) 0ms 203 bytes (pipelined: 1) (range: bytes=0-) 
Apr 08, 2022 12:29:41.071 [0xb0da0d48] DEBUG - Request: [127.0.0.1:33018 (Loopback)] PUT /video/:/transcode/session/h7ocjuxhu102j4i01npr440i/41d174f8-70a7-4126-a7f6-a40b817ac12c/progress?status=startup (11 live) Signed-in Token (tlgcntn) (range: bytes=0-) 
Apr 08, 2022 12:29:41.072 [0xb21b8d48] DEBUG - Completed: [127.0.0.1:33018] 204 PUT /video/:/transcode/session/h7ocjuxhu102j4i01npr440i/41d174f8-70a7-4126-a7f6-a40b817ac12c/progress?status=startup (11 live) 0ms 203 bytes (pipelined: 2) (range: bytes=0-) 
Apr 08, 2022 12:29:41.072 [0xb0da0d48] DEBUG - Request: [127.0.0.1:33018 (Loopback)] PUT /video/:/transcode/session/h7ocjuxhu102j4i01npr440i/41d174f8-70a7-4126-a7f6-a40b817ac12c/progress?status=opening (11 live) Signed-in Token (tlgcntn) (range: bytes=0-) 
Apr 08, 2022 12:29:41.074 [0xb21b8d48] DEBUG - Completed: [127.0.0.1:33018] 204 PUT /video/:/transcode/session/h7ocjuxhu102j4i01npr440i/41d174f8-70a7-4126-a7f6-a40b817ac12c/progress?status=opening (11 live) 1ms 203 bytes (pipelined: 3) (range: bytes=0-) 
Apr 08, 2022 12:29:41.105 [0xb0e4fd48] DEBUG - We're going to try to auto-select an audio stream for account 1.
Apr 08, 2022 12:29:41.105 [0xb0e4fd48] DEBUG - Selecting best audio stream for part ID 4533 (autoselect: 1 language: en)
Apr 08, 2022 12:29:41.105 [0xb0e4fd48] DEBUG - Audio Stream: 9689, Subtitle Stream: 9750
Apr 08, 2022 12:29:41.109 [0xb0e4fd48] DEBUG - [Now] User is tlgcntn (ID: 1)
Apr 08, 2022 12:29:41.110 [0xb0e4fd48] DEBUG - [Now] Device is webOS (LG 43UH650V-ZB).
Apr 08, 2022 12:29:41.110 [0xb0e4fd48] DEBUG - [Now] Profile is Generic
Apr 08, 2022 12:29:41.110 [0xb0e4fd48] DEBUG - [Now] Updated play state for /library/metadata/3870.
Apr 08, 2022 12:29:41.111 [0xb0e4fd48] DEBUG - Statistics: (tp2vqfpfjb2csorp1zp1xoyk) Reporting active playback in state 2 of type 1 (scrobble: 0) for account 1
Apr 08, 2022 12:29:41.119 [0xb2195d48] DEBUG - Completed: [192.168.50.95:49449] 200 GET /:/timeline?key=%2Flibrary%2Fmetadata%2F3870&ratingKey=3870&state=buffering&time=741269&duration=7682944&playbackTime=0&playQueueItemID=1009&context=source%3Acontent.library (11 live) GZIP 97ms 763 bytes (pipelined: 1)
Apr 08, 2022 12:29:41.127 [0xb0da0d48] DEBUG - Request: [192.168.50.121:53126 (Subnet)] GET /status/sessions (11 live) TLS GZIP Signed-in Token (tlgcntn)
Apr 08, 2022 12:29:41.127 [0xb0da0d48] DEBUG - [Now] Adding 2 sessions.
Apr 08, 2022 12:29:41.138 [0xb2195d48] DEBUG - Completed: [192.168.50.121:53126] 200 GET /status/sessions (11 live) TLS GZIP 11ms 3413 bytes (pipelined: 187)
Apr 08, 2022 12:29:41.196 [0xb0e4fd48] ERROR - [Transcoder] /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Cache/Transcode/Sessions/plex-transcode-h7ocjuxhu102j4i01npr440i-41d174f8-70a7-4126-a7f6-a40b817ac12c/temp-0.srt: Invalid data found when processing input
Apr 08, 2022 12:29:41.197 [0xb0da0d48] DEBUG - Request: [192.168.50.95:49450 (Subnet)] GET /library/parts/4533/1649394861/file.mkv?Accept=application%2Fjson&Accept-Language=tr (12 live) Signed-in Token (tlgcntn)
Apr 08, 2022 12:29:41.205 [0xb304bd48] DEBUG - Jobs: '/usr/lib/plexmediaserver/Plex Transcoder' exit code for process 4254 is 1 (failure)
Apr 08, 2022 12:29:41.206 [0xb0da0d48] DEBUG - Content-Length of /mnt/ironwolf/media/Movies/A.Hero.2021.2160p.AMZN.WEB-DL.DDP5.1.HDR.HEVC-ViLLAiN.mkv is 14897893352 (of total: 14897893352).
Apr 08, 2022 12:29:41.207 [0xb0e17d48] DEBUG - [Transcode] Using default transcode duration of 120 minutes
Apr 08, 2022 12:29:41.207 [0xb0ae0d48] DEBUG - Streaming Resource: Terminated session 0xb1de5d50:tp2vqfpfjb2csorp1zp1xoyk with reason Conversion failed. The transcoder exited due to an error.
Apr 08, 2022 12:29:41.207 [0xb0e17d48] DEBUG - [Transcode] Started session successfully: h7ocjuxhu102j4i01npr440i
Apr 08, 2022 12:29:41.207 [0xb0de6d48] DEBUG - Killing job.
Apr 08, 2022 12:29:41.207 [0xb0de6d48] DEBUG - Signalling job ID 4254 with 9
Apr 08, 2022 12:29:41.207 [0xb0de6d48] DEBUG - Job was already killed, not killing again.
Apr 08, 2022 12:29:41.207 [0xb0de6d48] DEBUG - Stopping transcode session h7ocjuxhu102j4i01npr440i
Apr 08, 2022 12:29:41.207 [0xb0e17d48] DEBUG - Content-Length is -1 (of total: -1).

subtitle.zip (44.7 KB)

Apart from the “byte order marker” there is nothing unusual in this file.
I’ve removed it anyway. You can test my version:
subtitle.zip (42.7 KB)

btw. I recommend you to not use the “upload” feature.
Instead, store the subtitle file(s) beside the video file. Instructions here Adding Local Subtitles to Your Media | Plex Support

btw when I tried to add same .srt file into the media directory with the movie name like this:

movie.mkv
movie.tr.srt

I’m getting these logs after ‘media refresh’:

Apr 08, 2022 13:16:29.758 [0xb3eaed50] INFO - Plex Media Scanner v1.25.2.5319-c43dc0277 - Raspbian GNU/Linux PC armv7l - build: linux-armv7neon - GMT 01:00
Apr 08, 2022 13:16:29.759 [0xb3eaed50] INFO - Linux version: 11 (bullseye), language: en-US
Apr 08, 2022 13:16:29.759 [0xb3eaed50] INFO - Processor Arm
Apr 08, 2022 13:16:29.759 [0xb3eaed50] INFO - /usr/lib/plexmediaserver/Plex Media Scanner --match --type 1 --log-file-suffix  Matcher --item 3870
Apr 08, 2022 13:16:29.768 [0xb6d2ddcc] DEBUG - Opening 20 database sessions to library (com.plexapp.plugins.library), SQLite 3.35.5, threadsafe=1
Apr 08, 2022 13:16:30.024 [0xb6d2ddcc] DEBUG - Matcher: found 4 auxiliary files in "/mnt/ironwolf/media/Movies" (single media: no)
Apr 08, 2022 13:16:30.024 [0xb6d2ddcc] DEBUG - Matcher: no sidecar subtitle files found for "/mnt/ironwolf/media/Movies/A.Hero.2021.2160p.AMZN.WEB-DL.DDP5.1.HDR.HEVC-ViLLAiN.mkv"
Apr 08, 2022 13:16:30.025 [0xb6d2ddcc] DEBUG - Matcher: no valid subtitles found, removing any existing media bundle file

Why is that .srt not valid?

Considering this is Linux, I’d look first at access permissions.
Plus, you should create a subfolder for every movie.

The file name of this subtitle doesn’t match that of the video file, so Plex cannot create a connection between video and subtitle file.

You mean does not match with video file ‘name’? They has same names like above.

This srt file not working on both following ways:

  1. Putting it into library like movie.tr.srt manually
  2. Uploading it on plex web client with Plex UI

First one is saying “no valid subtitles found” (on the logs) after refreshing metadata
Second one is saying “Invalid data found when processing input” (on the logs) when I tried to play movie on client side.

Thank you but I’ve got same error. :confused:

Your log excerpt above says the file name of the video is
A.Hero.2021.2160p.AMZN.WEB-DL.DDP5.1.HDR.HEVC-ViLLAiN.mkv
while the name of the subtitle file is
A.Hero.2021.PERSIAN.2160p.4K.WEB.x265.10bit.AAC5.1-[YTS.MX].tur.srt
Even if you omit the language code from the end, the two file names don’t match.

Thanks but I got same result when I upload that .srt file with same name as mkv.

Apr 08, 2022 13:33:48.687 [0xb0e7bd48] DEBUG - Request: [192.168.50.95:36093 (Subnet)] GET /library/parts/4533/1649394861/file.mkv?Accept=application%2Fjson&Accept-Language=tr (13 live) Signed-in Token (tlgcntn) / Connection => close / Cookie =>  / Host => 192.168.50.14:32400 / icy-metadata => 1 / Referer =>  / User-Agent => Mozilla/5.0 (Web0S; Linux/SmartTV) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.122 Safari/537.36 WebAppManager / X-Plex-Client-Identifier => tp2vqfpfjb2csorp1zp1xoyk / X-Plex-Device => webOS 3.4.0 / X-Plex-Device-Name => LG 43UH650V-ZB / X-Plex-Device-Screen-Resolution => 1920x1080 / X-Plex-Device-Vendor => LG / X-Plex-Drm => widevine:video / X-Plex-Features => external-media,indirect-media / X-Plex-Language => tr / X-Plex-Model => 43UH650V-ZB / X-Plex-Platform => webOS / X-Plex-Platform-Version => 3.4.0 / X-Plex-Product => Plex for LG / X-Plex-Token => xxxxxxxxxxxxxxxxxxxx / X-Plex-Version => 5.35.1
Apr 08, 2022 13:33:48.694 [0xb0e7bd48] DEBUG - Content-Length of /mnt/ironwolf/media/Movies/A.Hero.2021.2160p.AMZN.WEB-DL.DDP5.1.HDR.HEVC-ViLLAiN.mkv is 14897893352 (of total: 14897893352).
Apr 08, 2022 13:33:48.726 [0xb0fa9d48] ERROR - [Transcoder] /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Cache/Transcode/Sessions/plex-transcode-gvp4023zzho205296qgnhpbx-22de5292-383f-4730-849e-1167f97dfbaa/temp-0.srt: Invalid data found when processing input
Apr 08, 2022 13:33:48.729 [0xb304bd48] DEBUG - Jobs: '/usr/lib/plexmediaserver/Plex Transcoder' exit code for process 5987 is 1 (failure)
Apr 08, 2022 13:33:48.729 [0xb10d1d48] DEBUG - [Transcode] Using default transcode duration of 120 minutes
Apr 08, 2022 13:33:48.729 [0xb10d1d48] DEBUG - [Transcode] Started session successfully: gvp4023zzho205296qgnhpbx
Apr 08, 2022 13:33:48.730 [0xb21b8d48] ERROR - Session 0xb19ab8b0 terminated

@ChuckPa would you say this is a sample file for the transcoder developers?
Or are there other things to be checked first?

SRT is not valid!
First line must start with a 1 marker

00:01:10,988 --> 00:01:12,364
Rahim Soltani.

3
00:01:17,828 --> 00:01:18,913
Merhaba.

Should be:

1
00:01:10,988 --> 00:01:12,364
Rahim Soltani.

2
00:01:17,828 --> 00:01:18,913
Merhaba.

3
00:04:45,411 --> 00:04:51,375
Kahraman

The version that @OttoKerner uploaded was auto corrected by Subtitle Edit without letting him know about it, I would guess :wink:

Ok. I tried to fix that .srt file with one of the online generator web sites.

I just choosed ‘convert to srt file’ option even if my file’s extension is already srt. And then I just downloaded the generated .srt file and tried it with that. And it worked!

I attached the correct srt file if you wish to review it to see differencies for some development purpose.

[SubtitleTools.com] A.Hero.2021.PERSIAN.2160p.4K.WEB.x265.10bit.AAC5.1-[YTS.MX].tr.zip (44.7 KB)

I also attached a screenshot that I captured from vim editor to show some differencies on the top of those files.

Thanks for help :slight_smile:

Exactly! I was posting a new reply for this issue.

Thanks for quick support guys!

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