First of all, the payload you're giving is probably not what you intended.
In normal operation, subprocess is not giving your command to a shell, but instead starts the process which name is at args[0], and pass all the other arguments directly to it. What you're doing, is to pass the following arguments:
["-t", "360;", "nice", "-n", "15", "HandBrakeCLI", "-i", "someInput", "-e", "x264", "-q", "15", "-o", "someOutput.mp4"]
... to a very confused ulimit process. Instead, what you want is to use shell=True, and provide args as a string instead. This tells Popen to, instead of to actually start the process you're requesting, to start a shell and dump it all as a one-liner.
payload = "ulimit -t 360; nice -n 15 HandBrakeCLI -i %s -e x264 -q 15 -o %s.mp4" % (video, fileName)
pr = sp.Popen(payload, shell=True, stdout=sp.DEVNULL, stderr=sp.STDOUT)
print('Started handbrake')
pr.wait()
If you don't get the "Started handbrake" printed, expect that something went horribly wrong at the Popen. A good way to debug that, is to take the payload, import subprocess and try to open it with Popen at an interactive console. If you're locked up inside the Popen call, a ctrl-c should give you a trace to where inside it you're hanging, which might in turn provide you some assistance. Even if it makes no sense to you, it might help others tell what's going on.
I hope that this is helpful!