Batch Optimize

Would love to see expansion on the optimize feature. Be nice to tag a library and let it re encode all movies to consistent format and quality for local as well as a secondary for remote clients. Perhaps even a third for Mobil devices. This would allow more seamless playback being in the same format, optimized storage, and better remote experience via reduced transcoding and wasted bandwidth.

You can do that already.
Go into your movie library, select the ‘All’ view mode

It’d probably be sensible to open the ‘left action bar’ and sort the movies so that the newest are placed at the top.

then click on the ellipsis ( . . . ) on the left side and choose ‘Optimize’
clear the checkbox before the ‘Limit to…’
name your optimization like ‘Movies optimize for TV’
pick e.g. the ‘TV’ preset
click on ‘Optimize’

The optimize run for all items in your library to TV quality is now in the queue.
Dismiss the window and go back into your library.

Repate the steps but this time name the optimization ‘Movies optimize for mobile’
pick the corresponding ‘Mobile’ preset
click ‘Optimize’ again

repeat if needed with a 3rd or even 4th quality

if you now go Status - Conversion
you’ll see all optimizations neatly enqueued.

Your server will have a lot to do now :wink:

In the drop down under custom I see names such as Universal TV, Android, IOS, Windows, etc… Does this mean anything or is it only a name? Next drop down I see speed. Do we know what the format will be? Such as avi, mkv, mpg, etc… If the settings are more then the original will it be modified thus causing extreme pixelation? My experience say you can go down with good results but never up. Also what about audio and other embed data? Can we drop support for any extra languages in audio as well as closed caption which would further help optimize storage? Some audio on stuff from sickbeard/Sabnzd comes in as unknown. Any fix for that? I think the term is remux?

I am not exactly an expert for this feature.

the transcode profiles are predefined sets of transcoding parameters tailored to some commonly requested parameters for those client platforms.
‘Universal TV’ is special, as it supports soft subtitles. (if the source movie has text-based [srt, ass, tx3g] subtitles available, that is. Image based subtitles will be “burned in” just like with the mobile profiles)

AFAIK, all other profiles just use the default/currently selected audio stream and the currently selected subtitle (which is “burned in”).

AFAIK the result is always an mp4 file with h.264 as video codec. The audio codec might be different for the various profiles.
Please experiment with the optimize feature. Maybe create a test encode for every profile and inspect the results.

Not sure about burned in subtitles. In my setup I’ve configured I think subtitle.org? None of my library displays subtitles unless turned in. I’ve seen some come in for sickbeard that are always there which annoy me. Those I get new copies off. Is that what you mean by burned in?

opensubtitles.org is only involved in getting the subtitles onto the server and into the library.
This has nothing to do with thew optimize feature.

The result of the optimize process will have burned-in subtitles, if subtitles were ‘selected’ on the Preplay page of this particular movie. (so they must already be there to get selected)
This ‘selection’ in turn is either made by you manually or by the automatic Language track selection (for new/untouched items).

The optimize feature will not replace any of the files in your library. The optimized files will be added as ‘versions’. (their presence indicated by a little number in a blue circle on top of the poster).

I let it run on a small library. Very slow process. Some movies got bigger and some smaller. Need to compare them and see how quality was affected if at all. Ideally having everything the same should be a benefit in terms of storage and playback between devices. I’ve found roku for instance doesn’t always agree with mkv but seems to be ok with mp4.

@DJ-BrianC said:
I let it run on a small library. Very slow process. Some movies got bigger and some smaller. Need to compare them and see how quality was affected if at all.

Quality will always be worse. Video transcoding is always a ‘lossy’ process. And the plex transcoder by default prefers speed over quality. I you look for a solution to make your existing files more compatible with minimum loss, take a look at @cayarsconversion scripts.

You can change the transcoder settings for the OM feature to a slower setting which should produce a higher quality, smaller converted file. Go to Settings → Server → Transcoder (Advanced) : Background transcoding x264 preset and select a slower setting there.

This should make a smaller file, and have higher quality than the “default” settings with the RT transcoder. Quality should be at least a little better. I’ve tested this with the setting at “Slower” and “Very Slow” and the quality on my tests were hard to detect differences from an original redone outside of Plex.

There were some reductions in quality, but you have to look at really high action scenes, real dark scenes and know that you are running a reduced quality to see the differences. Unless you are a pixel peeper or trying to play it on a super large TV, the odds are most people likely wouldn’t notice it. Even then, if your users are like mine, they are fat dumb and happy just to be able to watch my media most times, so they don’t seem to care… :slight_smile:

Early 2021 clean-up: implemented