Re: Transcode video using celery and ffmpeg in django

2015-02-20 Thread Vijay Khemlani
The task is just a function, you finished the tutorial, it's the same thing @app.task def trascode(video): subprocess.call('ffmpeg -i path/.../original path/.../mp4_720') # Change the path to the one given by video.original video.mp4_480 = # Something video.mp4_720 = # Something else

Re: Transcode video using celery and ffmpeg in django

2015-02-20 Thread Robin Lery
So mp4_480 and mp4_720 should be blank=True and null=True. And then pass the video instance object to the delay() ??? And also, could you please show me how to write the tasks.py, so that I can use ffmpeg code (subprocess.call('ffmpeg -i path/.../original path/.../mp4_720') to transcode. Thank

Re: Transcode video using celery and ffmpeg in django

2015-02-20 Thread Vijay Khemlani
Then in your task function you can get the file from the video model instance, trascode it, and store it in the corresponding fields of the object (mp4_480, mp4_720) On Fri, Feb 20, 2015 at 10:18 AM, Vijay Khemlani wrote: > I would do something like this > > video = Video()

Re: Transcode video using celery and ffmpeg in django

2015-02-20 Thread Vijay Khemlani
I would do something like this video = Video() video.original = form.cleaned_data['video'] # Assuming the form field is "video" video.user = user video.title = form.cleaned_data['title'] # Assuming the form field is "title" video.save() # You might need to make the mp4_480 and

Transcode video using celery and ffmpeg in django

2015-02-20 Thread Robin Lery
I would like to transcode user uploaded videos using celery. I think first I should upload the video, and spawn a celery task for transcoding. Maybe something like this in the tasks.py: subprocess.call('ffmpeg -i path/.../original path/.../output') > Just completed First steps with celery