Hello,

I 'd like to process some file before saving it, let's say it's an
audio file that I want to be converted to ogg before it lands in the
database forever.

I tried to run ffmpeg2theora in the save method of the models but this
doesn't work verywell, the testserver hangup after the processing is
done.

## FILE : models.py, ##

class Song:
[...]

    def save(self):
        super(Song, self).save()
        path = self.file.path.split("/")
        path, file = path[1:-1], path[-1]
        joined_path = "/"
        for e in path:
            joined_path += e + "/"

        os.chdir(joined_path)

        res = os.popen("/usr/bin/ffmpeg2theora " + path)

any help ?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to