Hi all,
I have a HandBrakeCLI job that I want to use to reduce the size of some recordings. The script runs perfectly when run manually, but fails when run as a post processing (Skip Commercials) script.
When run from tvheadend as the post-processing script, it runs - full paths, permissions etc are all fine, but when HandBrakeCLI runs it doesnt find any frames in the .mkv file. I run the exact script and path moments later it works fine.
I thought it might a memory buffer / filesystem sync, so I'm calling /usr/bin/sync (I've seen this in other scripts too) but doesnt seem to make any difference. I threw in some arbitary sleep time, up to 5 mins, but still getting the same problem.
The filesize and timestamp for the .mkv tvheadend recording looks fine, but I cannot seem to work around this issue.
Has anyone seen similar? It's as if tvheadend isnt closing the file handle and clearing buffers until after the post processing.
I'm running Ubuntu 12.04 with tvheadend 3.4.27, (disks are in a RAID stripe if that makes any difference).
I'd appreciate any thoughts or feedback.
Regards,
Tom