R
R
rusrich2021-08-06 08:52:23
Django
rusrich, 2021-08-06 08:52:23

Why doesn't the FFMPEG video conversion process work in Django?

Good afternoon.

Command not working:

subprocess.call(f'ffmpeg -i /home/rusrich/code/Stream/media/media/example.avi ./home/rusrich/code/Stream/media/media/example.mp4')


I am getting an error:
FileNotFoundError at /admin/stream/video/1/change/
[Errno 2] No such file or directory: 'ffmpeg -i /home/rusrich/code/Stream/media/media/example.avi /home/rusrich/code/Stream/media/media/example.mp4'


I try and run through the controller and using signals.
Checking for the existence of the file is correct.
The same command from the console starts the conversion.

It turns out that Django himself does not see the file.

FFMPEG and libv-tool installed.
OS Fedora

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
rusrich, 2021-08-06
@rusrich

Understood:

import os
os.system(f'ffmpeg -i /home/rusrich/code/Stream/media/media/example.avi ./home/rusrich/code/Stream/media/media/example.mp4')

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question