x264 with multiple passes specify location of temporary file?
-
26-06-2021 - |
Question
So, my situation is like this. I have three x264 commands with 3 passes I want to run in parallel:
x264 -p 1 ...
x264 -p 1 ...
x264 -p 1 ...
Then I want to run the second pass in parallel:
x264 -p 2 ...
x264 -p 2 ...
x264 -p 2 ...
And the third pass as well.
The problem is, because I am running three x264 commands with -p option at the same time (using multiprocessing), they are all trying to use the same temporary files to save the results of the first/second pass.
Is there a way to specify for each x264 command to use a different temporary file?
Solution 2
I have figured this out. I have used --stats option:
x264 -p 1 --stats file1.log ...
x264 -p 1 --stats file2.log ...
x264 -p 1 --stats file2.log ...
OTHER TIPS
If the temporary files are created in the current directory, start the different instances from different directories. If they are all created in e.g. /tmp
, using the same name more than once would be a bug, I'd say.