Various playlist editor developments and fixes.
[dcpomatic.git] / hacks / stress.py
1 #!/usr/bin/python3
2
3 import random
4
5 def make(dcp, output, seeks):
6         with open(output, 'w') as f:
7                 # Open the DCP and start it playing
8                 print("O %s" % dcp, file=f)
9                 print("P", file=f)
10                 for i in range(seeks):
11                         # Wait a bit
12                         print("W %d" % random.randint(500, 60000), file=f)
13                         # Seek
14                         print("K %d" % random.randint(0, 4095), file=f)
15                         # Make sure we're still playing
16                         print("P", file=f)
17                 print("S", file=f)
18
19
20 make("/home/carl/DCP/Examples/BohemianRhapsody_TLR-7_S_DE-XX_DE_51_2K_TCFG_20180514_TM_IOP_OV/", "boho", 64)
21
22