why this thread doesnt run parelally?

23 views Asked by At

Hi I have the following code:

def record_video(task_id):    

    (
        ffmpeg
        .input('a.mp4', t=t)
        .output(f'{task_id}.mp4')
        .run()
    )


thread = Thread(target=record_video, args=(f'{uuid.uuid1()}.mp4'))

thread.start()

print('end job')

The idea is that print('end job') runs first, but anyway this waits until record_video thread ends, how can I solve this?

Thanks

0

There are 0 answers