From 1cad133fc34e5073c4bc008b1aaf50ec4f7478ca Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Thu, 19 Apr 2012 18:06:38 +0200 Subject: [PATCH] add more video modes --- etc/apache2/vhost.conf.in | 4 ++++ pandora/archive/extract.py | 21 +++++++++++++++++++++ pandora/urls.py | 1 + 3 files changed, 26 insertions(+) diff --git a/etc/apache2/vhost.conf.in b/etc/apache2/vhost.conf.in index ecc38d75..59dd098e 100644 --- a/etc/apache2/vhost.conf.in +++ b/etc/apache2/vhost.conf.in @@ -38,6 +38,10 @@ ProxyPass / http://127.0.0.1:2620/ ProxyPassReverse / http://127.0.0.1:2620/ + LogLevel warn + ErrorLog /var/log/apache2/pandora_error.log + CustomLog /var/log/apache2/pandora_access.log combined + ServerSignature Off diff --git a/pandora/archive/extract.py b/pandora/archive/extract.py index 3903b795..49cb5a72 100644 --- a/pandora/archive/extract.py +++ b/pandora/archive/extract.py @@ -85,6 +85,13 @@ def stream(video, target, profile, info): audioquality = 2 audiobitrate = None audiochannels = 2 + elif profile == '432p': + height = 432 + audiorate = 44100 + audioquality = 2 + audiobitrate = None + audiochannels = 2 + elif profile == '360p': height = 360 @@ -92,6 +99,13 @@ def stream(video, target, profile, info): audioquality = 1 audiobitrate = None audiochannels = 1 + elif profile == '288p': + height = 288 + + audiorate = 44100 + audioquality = 0 + audiobitrate = None + audiochannels = 1 elif profile == '240p': height = 240 @@ -99,6 +113,13 @@ def stream(video, target, profile, info): audioquality = 0 audiobitrate = None audiochannels = 1 + elif profile == '144p': + height = 144 + + audiorate = 22050 + audioquality = -1 + audiobitrate = '22k' + audiochannels = 1 else: height = 96 diff --git a/pandora/urls.py b/pandora/urls.py index db4d0b74..a831e30e 100644 --- a/pandora/urls.py +++ b/pandora/urls.py @@ -4,6 +4,7 @@ import os from django.conf.urls.defaults import * from ox.django.http import HttpFileResponse +from django.views.generic.simple import redirect_to from django.conf import settings