I tried in Plex post processing field, and failed… The logs show this:
Dec 27, 2018 21:30:01.047 [11868] DEBUG - Job running: e:\handbrakeCLI\PostPlex.bat “E:\RecordedTV.grab\d0c7488df06459e08178f0f99bb46d4665c70eb0\Coach (1989) - S01E01 - Kelly and the Professor.ts”
Dec 27, 2018 21:30:01.063 [11868] DEBUG - Jobs: Starting child process with pid 8256
Dec 27, 2018 21:30:01.352 [5368] DEBUG - EPG[onconnect]: Next thing to start/end is at 2018-12-28 03:50:00 GMT (in 1200 seconds)
Dec 27, 2018 21:30:01.697 [18728] DEBUG - DVR:Segmenter: Stopping idle session.
Dec 27, 2018 21:30:02.855 [20144] DEBUG - Jobs: ‘e:\handbrakeCLI\PostPlex.bat’ exit code for process 8256 is 3 (failure)
Dec 27, 2018 21:30:02.855 [11868] ERROR - DVR:Recorder: Postprocessing script ‘e:\handbrakeCLI\PostPlex.bat’ exited with error code 3.
So the file parameter sent the batch file is in quotes, and is this:
“E:\RecordedTV.grab\d0c7488df06459e08178f0f99bb46d4665c70eb0\Coach (1989) - S01E01 - Kelly and the Professor.ts”
Not clear to me why this would fail? Should be passed to the batch file as expected?
Looks like the output file was not getting the correct full path with only the %~n1.mp4, that would only clip the filename, not the drive letter nor path.
this
e:\handbrakecli\HandBrakeCLI.exe -i %1 -o “%~dpn1.mp4” --preset “Fast 720p30”
%~dpn1.mp4 generates the mp4 in the same grab directory that the original ts file is in. We’ll see if that makes this work.
Damn, all that to get to the same answer as what you originally wrote, which means it probably won’t work since I already tried it.
Hmm, maybe I didn’t try it exactly as you had it originally. It IS making the MP4 file right now after a recording! Not 100% done and transferred to the right directory, but it is doing something right.
And checking now, it did transcode to mp4, did move it to the right directory, but it also moved the .ts file to that directory as well, so now I have 2 of the same recordings in the final directory. But it did work, so maybe then all I need to do is add a delete in the batch file at the end.
@erwinfj