Example #1
0
 def test_encoding(self):
     remi = User.objects.get(username="******")
     pod = Pod.objects.get(id=1)
     print "\n ---> lancement Encodage"
     encode_video(pod)
     print "\n ---> Fin Encodage"
     self.assertTrue(
         u'video_1_240.mp4' in pod.get_encoding_240()[0].encodingFile.url)
     self.assertTrue(
         u'video_1_240.webm' in pod.get_encoding_240()[1].encodingFile.url)
Example #2
0
	def handle(self, *args, **options):
		for pod_id in args:
			try:
				pod = Pod.objects.get(pk=int(pod_id))
			except Pod.DoesNotExist:
				raise CommandError('Pod "%s" does not exist' % pod_id)

			encode_video(pod)

			self.stdout.write('Successfully encode video "%s"' % pod_id)
Example #3
0
    def handle(self, *args, **options):
        for pod_id in args:
            try:
                pod = Pod.objects.get(pk=int(pod_id))
            except Pod.DoesNotExist:
                raise CommandError('Pod "%s" does not exist' % pod_id)

            encode_video(pod)

            self.stdout.write('Successfully encode video "%s"' % pod_id)
Example #4
0
    def test_encoding(self):
        remi = User.objects.get(username="******")
        pod = Pod.objects.get(id=1)
        print "\n ---> lancement Encodage"
        encode_video(pod)
        print "\n ---> Fin Encodage"
        self.assertTrue(
            u'video_1_240.mp4' in pod.get_encoding_240()[0].encodingFile.url)

        ENCODE_WEBM = getattr(settings, 'ENCODE_WEBM', True)
        if ENCODE_WEBM:
            self.assertTrue(u'video_1_240.webm' in pod.get_encoding_240()
                            [1].encodingFile.url)
Example #5
0
    def test_encoding(self):
        remi = User.objects.get(username="******")
        pod = Pod.objects.get(id=1)
        print "\n ---> lancement Encodage"
        encode_video(pod)
        print "\n ---> Fin Encodage"
        self.assertTrue(
            u'video_1_360.mp4' in pod.get_min_encoding().encodingFile.url)
        self.assertTrue(
            u'audio_1_360.mp3' in pod.encodingpods_set.filter(encodingFormat='audio/mp3').first().encodingFile.url)

        ENCODE_WEBM = getattr(settings, 'ENCODE_WEBM', True)
        if ENCODE_WEBM:
            self.assertTrue(
                u'video_1_360.webm' in pod.get_min_encoding().encodingFile.url)
Example #6
0
File: tasks.py Project: ntsoaua/pod
def task_start_encode(self, video):
    print "START ENCODE VIDEO ID %s" % video.id
    from core.utils import encode_video
    encode_video(video)