Hi,
I am trying the same except for Android. Here is what works for me from command line:
/usr/bin/HandBrakeCLI -Z "Android High" --no-dvdnav -O -s 1 -i input_file.ts -o output_file.mp4
You can replace "Android High" with your preset ("AppleTV 3"). I used --no-dvdnav to avoid DVD analysis, -O to enhance for streaming, -s 1 to make usre the first subtitle (CC captioning) is kept.
I've made sure "Replace whitespace in title with '-'" is checked in the digital recorder preferences too.
The above in the post-processing command field becomes this:
/usr/bin/HandBrakeCLI -Z "Android High" --no-dvdnav -O -s 1 -i %f -o /home/hts/Android/%b.mp4
Unfortunately this results in .ts.mp4 extensions (%b includes the extension, I could strip this on a script but I am not there yet). I don't mind that for now.
My problem is .mp4 files generated from the post-processing command are not valid! They are also suspiciously small (<~20K). When I run the same manually, it works.
I tried going via a script, the same happens.
Hopefully other people can clarify this, I must be missing a tiny detail.