Optimized Version naming issue

I like to record all the NFL games and watch them. However, my tuner generates .ts files that are rather large. I’d prefer smaller files so it works smoothly across multiple clients. I decided to set my Recordings directory (where the tuner puts all recordings) to optimize to a smaller file. However, all of the optimizations have the same name (the air date of the game). This means that all of the games are optimized and then deleted until one final game is left standing. This poor file naming happens whether I do the entire library, or an individual game or anything in between. It seems so much cleaner to just use the original file name or something way more unique. Maybe this works for TV shows with traditional S##E## naming, but it fails hard for other types of things that may air on TV.

Example:
The original file name is something like NFL Football (2019) - 2020-11-22 06 00 00 - Green Bay Packers at Indianapolis Colts.ts but the optimization is named like 2020-11-22.mp4.

It looks like a duplicate of a few issues:
https://forums.plex.tv/t/optimized-versions-naming-problem-multiple-per-day-olympics
https://forums.plex.tv/t/optimised-versions-file-names-not-same-as-orginal
https://forums.plex.tv/t/optimized-version-file-names
https://forums.plex.tv/t/plex-optimize-naming-issues
https://forums.plex.tv/t/plex-version-optimised-file-names-are-truncated-showing-only-episode-and-season-rest-of-file-name-is-removed

Why can’t we just use the original file name?

Edit - this probably fits best on an issue with the optimization feature.

Platform: synology/ds918+
Server Version#: 1.20.5.3600
Player Version#: not sure
Tuner Make/Model: HDHomeRun CONNECT DUO
Guide/Lineup name: not sure
Using XMLTV?: not sure
Channel number/Name: cbs/fox/nbc (nfl games)

1 Like

Plex is not designed to handle multiple airings on the same day, so yes this will happen.

How are you organizing these files? As a TV Show? Wouldn’t the original files show up as versions of each other?

@stmty9 thought I would add this to the thread. You could use a Post Processing script to utilize ffmpeg to transcode the audio and video to a format more acceptable and remux the ts container to another container such as mp4. Here is another forum thread where another user on a Synology device setup a similar post processing script. This will take some time for the transcode but could possibly be a better solution as the filename of the original file can be maintained. I use a similar command to what was discussed in the linked forum thread except I use:

ffmpeg -i %1 -map 0 -c copy -c:v h264_nvenc -c:a aac %~dp1%~n1.mp4

I am running on Windows not Synology so my ffmpeg options are slightly different than discussed in the other forum thread. I am also using my Nvidia card for the video transcode with the “-c:v h264_nvenc” command. The basics of this command are:

-c copy - copy all tracks in file, so all audio, video, and subtitles
-c:v h264_nvenc - transcode video tracks to h264 using the Nvidia GPU instead of my older CPU
-c:a aac - transcode audio tracks to aac, audio from my recordings are in AC3

Thank you both for your input, here are my replies!

@anon18523487
Yes, I have it organized as a TV Show Library. It is where I generically dump everything I record. If you have suggestions on how to maybe make it work, I can try them.

Currently, they all get saved under Recordings/NFL Football (2019)/Season 2020
The 3 I currently have are:

  • NFL Football (2019) - 2020-11-26 06 00 00 - Baltimore Ravens at Pittsburgh Steelers.ts
  • NFL Football (2019) - 2020-11-29 06 00 00 - Chicago Bears at Green Bay Packers.ts
  • NFL Football (2019) - 2020-11-29 06 00 00 - Las Vegas Raiders at Atlanta Falcons.ts

I am not sure why they are under ‘NFL Football (2019)’ instead of ‘NFL Football’ (the DVR has actually created both directories). That might be a tuner or guide issue, so I’m not concerned atm.

Their optimized versions are as follows (respectively):

  • N/A - I haven’t optimized this one yet
  • Recordings/NFL Football (2019)/Season 2020/Plex Versions/gbcb 11249/NFL Football/2020-11-29.mp4
  • Recordings/NFL Football (2019)/Season 2020/Plex Versions/43242 11238/NFL Football/2020-11-29.mp4

As you can see, the last two here would collide if they were optimized with the same settings.

@johnm_ColaSC
Do you know if the post-processing script blocks a tuner? I’ve noticed that many of the DVR settings that process the file block a tuner while they’re working, so I’ve had to turn them all off. Otherwise, consecutive recordings have chunks missing (I only have 2 tuners).

At one point I had the ‘CONVERT VIDEO WHILE RECORDING’ enabled, and had 2 games finish at the same time. It took 8 hours for them both to finish, blocking both tuners the entire time. Since it kept it at the original quality, it didn’t do much for me anyway.

There are ways to do the file conversion with ffmpeg using the hw transcoding chip that some of the synologys have, but it is rather annoying. Plex uses this chip in the syno distribution which is why I was delegating to it.
In a perfect world, I’d prefer that Plex be able to replace the original (which is what the post processing script can get me). I know they are against that for their own reasons.

I’ve been considering writing my own script to take care of this (using ffmpeg w/vaapi), but we have a 2 week old at home, so my time is limited!

Yup. PMS will treat all 3 of those games as 3 versions of the same episode, so when it optimizes, it’s just adding more versions so it doesn’t care about the naming.

These isn’t a good solution for sporting events like this. You’ll need to split them up somehow so that you get 1 episode per day, just like a regular show.

Or stop having them as a show. If you use “other video” PMS will keep the filename. Then maybe using collections to group them together.

First congrats on the little one. Completely understand the little time on your hands. Mine is now 28 so been a while since I had those days but still remember them well, late night changing/feedings.

As far as I know the tuner count still shows as active but am pretty sure Plex has released the tuner. You should see a line in the logs where it shows the stopping of the session. For example, below are 3 log lines. One line shows the stopping of a recording scheduled from 6:30 pm - 7:00 pm and the other 2 show new recordings starting at 6:59 pm and 7:00 pm using 2 tuners on the same device. This device is a HDHR Extend which only has 2 tuners. So obviously the tuner could not be used for a different channel.

Dec 03, 2020 18:59:00.421 [9880] DEBUG - [Grabber/99d4fb90d8769ea1c3ecb16e125641b5062235c5] Grabber: Going to record for 1860 seconds, final URL is http://10.0.1.24:5004/auto/v57.1?transcode=heavy
Dec 03, 2020 19:00:00.442 [16332] DEBUG - [Grabber/3dd2bfe5ed1f2da42b45c63235389a3301977e0d] Grabber: Going to record for 1800 seconds, final URL is http://10.0.1.24:5004/auto/v63.1?transcode=heavy
Dec 03, 2020 19:00:04.369 [14344] DEBUG - DVR:Segmenter: Stopping idle session: http://10.0.1.24:5004/auto/v19.1?transcode=heavy.

Notice that the show ending was pm channel 19.1 and the 2 new recordings were on channels 57.1 and 63.1 so not a case where the tuner for the show ending at 7:00 pm was on the same channel as a 7:00 pm recording in which the HDHR might have shared the channel. If the tuner had not been released then the HDHR would have refused the new tuner request and the recording may have aborted.

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