I’m writing a postprocessing script to transcode my recorded shows with ffmpeg. Is there documentation that can tell me how plex handles these operations? More specifically, I’m trying to figure out how Plex calls the script, what Plex puts in the .grab folder it creates, and what it does with those contents when the postprocessing script returns.
Not much really needed in the form of documentation. Plex when it has finished the recording before it would move the recording from the grab folder calls your post processing script you have specified in the DVR configuration passing the path/filename of the recording to your post processing script, something like “G:\TV_DVR.grab\86bfd4dadef4363616b6fe337397712e61d2c59f\The Big Bang Theory (2007) - S11E24 - The Bow Tie Asymmetry.ts.” Your script can do whatever you would like such as remux the ts container to mkv or transcode the video and audio codecs inside the ts container. When your script is done it should leave the processed file in the same folder as the original recording, and of course remove the original recording. So if you remux the container from ts to mkv in the grab folder should be a file called “The Big Bang Theory (2007) - S11E24 - The Bow Tie Asymmetry.mkv” when your script ends. Plex will then move whatever file is in the grab folder to your library.
I was looking for documentation as well. I want a script to move what I record to somewhere that isn’t a plex library. I don’t need what I record to be in plex. However, how it structures stuff after it records is what I want to retain. Is plex able to pass the show and season folder names to the PP script?