Plex DVR PostProcessing script... Occasionally HandBrakeCLI crashes with error 139... No clue why...
When my Plex DVR records a show, it's saved in .ts format. I have a post-processing script that takes that .ts format and converts it (using HandBrakeCLI) to a compressed .mkv file.
This is the precise command being used:
/usr/bin/HandBrakeCLI -i "$FILENAME" -o $TEMPFILENAME -f av_mkv -e x265 -q 26.0 --all-audio -E av_aac -B 320 --mixdown 5point1 --deinterlace mode=3 --decomb mode=7 --all-subtitles
(Don't worry about $FILENAME and $TEMPFILENAME -- I know 100% that they're correct)
Why would that command work about 80% of the time, but fail on about 1 in 5 recordings? After several minutes of processing, I get ERROR # 139 : Failed to convert using Handbrake and nothing else. No explanation of what error #139 is. No hint as to why this failed... Nothing... Just whatever portion of the temp file that it was able to create before it failed, and that's it.
I can't even figure out what Error 139 is exactly... The only thing I get from a search is "memory segmentation fault" which I know is b.s. because Linux would kernel panic and the whole machine would shut down. It's not shutting down, so clearly 139 does not mean memory segmentation fault on a Linux machine.
So... Does anyone have any ideas?
BTW, the version of Handbrake I'm using is the one that was available to me via the Fedora dnf package-manager.
$> HandBrakeCLI --versionHandBrake 20240621000000-e9ff2bd-unknown.
I'm running it on Fedora 43 Server Version, so I have no GUI -- terminal only.