I’m catching up on some older shows and piling them up on my server. normally i dont have this volume of recordings added and every once in a while i go find the .TS files and run handbrake on them to convert them to .MP4 files to save space. However, I have so many TS files now that I’m struggling to keep up the conversion process. Any ideas on how to batch so many of these files for conversion? AND, is it possible to “Pause” the DVR from recording ALL shows. I don’t think there is an option for that but it would be nice add esp in a case like this because i do the conversions on the same machine where PMS is running and recording. So running Handbrake and the DVR maxes out my proc even with my stout hardware (and I’ve lower the priority and procs on handbrake) and it would be nice to be able to push a “PAUSE” button the dvr while i convert my TS files. Thoughts?
The DVR option to “covert while recording” does this as part of the process.
Yes but takes WAY more processor. and while i’m in this bulk record mode of older shows i have as many as 3 shows recording at the same time. If i had that option set it would crush my machine even with a stout processor.
Doesn’t that use the DVR’s processor to convert? I have an HDHOMERUN, and I thought that was a feature of the DVR.
Either way, I use a post-record script to run ffmpeg locally on the server to do my encoding. When I DID use the “convert while recording” option, it didn’t seem to change the file extension (still .ts) and didn’t seem to make the files any smaller.
To maccrory:
I don’t know if there is anything you can do. I built my Plex server to be a strong, beefy one. At first, I felt it was overkill, but once I had it doing a post-script conversion, I could often have all 4 receiver channels in use at once, for 4 encodes at once.
If you use a post-record script to automate the process, you could build into the script some logic that says to skip the encode if the file isn’t important (such as a game show that you delete after a day or after viewing), or you can set the script to only allow one encode at once.
Alternatively, you could have a script run every few minutes that scans your hard drive for .TS files and does one encode at a time and let it run automatically. I’d hope that one encode wouldn’t trash the CPU enough to matter. As long as you don’t record 24/7, it ought to fall behind during heavy record times, but be able to catch up during down-times.
I don’t record 24 hrs a day but some days it appear to be recording up to 18 hours. hoping that once i catch up on some of these older series it will record less. i also have the ability to have 10 tuners in play at once (see pic) which should never happen but i have seen 5 and looking at my dvr schedule looks like it could record up to 6 in use at once.
I’m not sure how to write a script to scan my folder and build a list to pass to Handbrake. Is there some way to automate that process? It would be great to automate and process the TS files into MP4 files and after each file is converted move the MP4 into the correct folder and delete the TS file. Is that possible ?

It’d take some scripting know-how, but it’s pretty basic to recursively trawl through a directory structure and all sub-folders. Then, in each folder, you would do a wildcard search for “*.ts” files, and feed the first one it finds (FILENAME.ts) into the handbrake/ffmpeg command line. Then, once that handbrake/ffmpeg completes, it places the newly created file (FILENAME.mp4) in the same folder, then delete the original file (FILENAME.ts).
Then, repeat. Look for .ts, handbrake into a new .mp4, delete old .ts. Repeat. Repeat. If there are no .ts files, then you converted all the files. Sond it runs, scans for no file, then shuts down. It’s common to have scripts that look for the existence of a file, does something, deletes the file. If there is nothing to do, it starts up and shuts down immediately, VERY little impact on the system.
I am not confident enough to write the script myself, but the basics on the logic are common enough that I can visualize it.
The problem is that the metadata of a recorded item are derived from the EPG. Because with tv shows, episode orderings which are on TV can deviate from what’s available in Plex.
If you replace all .TS files with compressed mp4 versions, you may lose the original Plex EPG metadata.
If you are lucky, you can rematch the shows to the Plex metadata agent. But his might not be possible in some cases, due to deviating episode orderings.
Does this info get lost using the Plex “PostProcessing script” option under the DVR tuner? I use a script to process my movies/shows, and I don’t know if I am losing the EPG data with that…
No, but this is not an option for the OP.
@Divideby0 yes I can also visualize it as well. It’s bascially taking what i do manually right now and automating it. I guess I have some googling to do to accomplish this. things like - i want to run this overnight with a time constraint window. so whatever it gets done in that window, thats all the gets done (if possible). i agree on the process - find TS/build MP4/delete TS. if i cant find a way to time constraint the process then i could estimate aprox time per conversion and then only do xx many overnight. i have to figure out something pretty fast because the files are piling up - in 2 days i already have 115gb (188 files) of TS shows.
This is another reason I wish Plex had a Pause function where i could pause the recordings and let me catch up then resume. looks like the only way to Pause (stop) recording a show would be to delete it and then add it again later. What I did yesterday was to Quit the PMS and run handbrake to process .TS files and stop additional files from piling up. that works except it locks out anyone that would want to use Plex during that time.
Just wondered, how much space does this typically save per .TS file, isn’t the .TS compressed a certain amount anyway?
@e10kstarfire it’s saves a good amount - i see from 40 to 60% smaller file size depending on the recording.
I saw about 50% as well. Looking at my files, I see some episodes of a show leftover from before I used the post-script. For one particular half-hour show, the files were anywhere from 1700 to 1900 MB in size. Any converted episode ended up ~800MB in size. Looking at the media in MediaInfo, they are encoded using MPEG2, while my script converts them to H264/AVC.