[Django]-Create new files from upload

2๐Ÿ‘

โœ…

I found it!

It was not a permission-problem but something strange in error handling: If the code is run from the webserver the resulting image-file is dismissed when the error occurs. If it is run from command line the resulting file remains in the folder.

So basically I changed my command that no error message appears any more by using -vframes instead of -dframes (which only worked fine in windows):

command = ("ffmpeg -ss 00:00:10 -i %s -vframes 1 %s -y" % (video_path, image_path)).split()
๐Ÿ‘คMarius

2๐Ÿ‘

Try specifying -vframes 1 as described here

However, for ffmpeg 0.9 and later both dframes and vframes are aliases for frames, so if you use newer version of ffmpeg, problem is somewhere in other place.

๐Ÿ‘คalko

1๐Ÿ‘

You could run conversion process asynchronously with Celery. Your worker process might be invoked with required permissions, and apache just needs permissions to access communication channel, such as RabbitMQ for example

๐Ÿ‘คlatheiere

Leave a comment