Cannot run several flimmakers in parallel when encoding from urls
fstark opened this issue · 1 comments
fstark commented
Description:
The youtube-dl subprocess uses the fixed name /tmp/out.mp4 for download. This creates a race condition when encoding two files a once. This is due to youtube-dl using /tmp/out.mp4.part for both downloads, and the second one will fail to rename it.
How To Reproduce:
In two separate windows:
./flimmaker https://www.youtube.com/watch?v=dQw4w9WgXcQ --mp4 out2.mp4 --duration 10
./flimmaker https://www.youtube.com/watch?v=dQw4w9WgXcQ --mp4 out1.mp4 --duration 10
Result:
ERROR: unable to rename file: [Errno 2] No such file or directory
youtube-dl failed with error 256
Expected Result:
No errors.
fstark commented
Note: the very same applies to gif generation (use of fixed filenames).