'why this thread doesnt run parelally?

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



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source