86 Commits

Author SHA1 Message Date
c2bf1c8aaa Merge branch 'codec-prio-from-cookie'
Addresses the desire to prefer codecs from the client.
Some clients perform better with particular codecs put above, for
instance the device has hardware decoding capabilities for it.
Unfortunately there is no reliable way to query this in the frontend.

Now we can set a cookie 'video_codecs_prio' with strings of codecs
we want the order of importance. The cookie can contain codecs
separated by a space. For instance 'vp8 h.264' to get those
codecs first for an old 2014 laptop that has only hw support for
these codecs.

Supported codecs are the distinct ones in short_name in
models.transcoding_types:

vp9
vp8
h.264

After this works well in production, I can deside to build a user-
friendly settings page.
2022-04-07 21:04:35 +02:00
14be7ef6b4 Refactor to slighly better readable code 2022-04-07 21:03:59 +02:00
6885feb980 Add tests for codec orders 2022-04-07 20:50:15 +02:00
4cdbffe718 Add ability to override codec prio from client cookie 2022-04-07 20:32:30 +02:00
f9fadf7f08 Merge branch transcoding-order
Apparantly the order of <source> tags in the <video> element
determines what transcoding a browser chooses. Until now this
was quite random.

Now show transcodings (<source> elements) in the order:
vp9, vp8, h264
2022-04-06 20:11:09 +02:00
8351e6983c Add view test for correct transcoding order 2022-04-06 20:10:37 +02:00
93843fdcad Fix tests for transcoding type order 2022-04-06 20:10:37 +02:00
aa8f4195c7 Order source tags by transcoding type prio 2022-04-06 20:10:37 +02:00
60accdc618 Add get_transcoding_type_by_name() 2022-04-06 20:10:37 +02:00
48473b2a90 Give priorities to transcoding types 2022-04-06 20:10:37 +02:00
926224a6e1 Merge branch subtitles
Implement subtitles support through the <track> tag
2022-04-06 17:24:27 +02:00
1966bcc371 Add validation to the track admin 2022-04-05 22:40:24 +02:00
768def6630 Move variable mapping details from template to view function 2022-04-05 22:40:24 +02:00
9585eb7416 Added view tests for tracks 2022-04-05 22:40:24 +02:00
aaea5f4674 Add tracks to video view 2022-04-05 22:40:14 +02:00
8e376319b0 Admin for tracks in video 2022-04-05 22:40:03 +02:00
5a87ba6d64 Added Track model 2022-04-05 09:06:03 +02:00
7e7671b6d7 Django to latest 3.1 2022-04-05 00:16:10 +02:00
ab0148a039 Merge branch add-transcoding-types
Add several AVC1 profile/levels that are necessary now.

Also fix the video source type attribute.
2022-04-03 16:08:16 +02:00
ef29d4415a Add detailed AVC1 TranscodingTypes
- profile High level 3.0
- profile High level 4.0
- profile High level 5.0
2022-04-03 16:05:46 +02:00
d3e071c93d Add TranscodingType.description and set correct short_name 2022-04-03 15:59:57 +02:00
46c6272213 Render quotes in video source type attr 2022-04-03 15:53:26 +02:00
1b480b8ddb Merge branch 'tests'
Added basic test suite for this application
2020-05-21 20:17:02 +02:00
7d8eef8387 Merge branch 'improve-factories' into tests 2020-05-21 20:13:30 +02:00
9f0b6881dd Asure not too many queries are run 2020-05-21 20:09:03 +02:00
c17b558d14 Ability to generate unique fields in factories 2020-05-21 20:09:03 +02:00
c6f2bacf0f Useful conditions can be put in lambdas
and an extra test to asure transcoding with upload is possible
2020-05-21 19:41:57 +02:00
2e1c7e7165 Raise NotImplementedError when unknown model is passed 2020-05-21 19:41:57 +02:00
019adcba56 Uploads are already 'lazily' executed 2020-05-21 19:41:57 +02:00
8c4ec83993 Use lambda for dependencies
so they won't be created when dependency is already provided
2020-05-21 19:41:57 +02:00
29fb109b6f Helper function to improve code 2020-05-21 19:41:57 +02:00
8e6a36212d Use SimpleTestCase for unit tests 2020-05-21 17:42:41 +02:00
61c178d222 Clean temporary files by default 2020-05-21 17:42:41 +02:00
40490d6086 Better upload handling in temporary dirs 2020-05-21 17:42:41 +02:00
e1aff0c7a1 Test get_short_name_of_transcoding_type() 2020-05-21 17:42:41 +02:00
63ce1078e4 test models.get_quality_by_name() 2020-05-21 17:42:41 +02:00
2cbd8bf49d Added unit module 2020-05-21 17:42:41 +02:00
1141f6d4a6 CreateTranscodingTestCase
test constraints on model
2020-05-21 17:42:41 +02:00
8ace8d3312 test_video_uploads_shows_correctly 2020-05-21 17:42:41 +02:00
f8a3151672 Better video tag test 2020-05-21 17:42:41 +02:00
9b732c55d7 test_video_show_correct_default_quality quality selectors 2020-05-21 17:42:41 +02:00
a58618c920 test_video_shows_correct_quality_for_parameter 2020-05-21 17:42:41 +02:00
046dc94c77 test_video_show_correct_default_quality 2020-05-21 17:42:41 +02:00
56c7e24969 Usefull basic view test for video 2020-05-21 17:42:41 +02:00
b54ef76881 Stub video page view test 2020-05-21 17:42:41 +02:00
9492e8445b Stub index view test 2020-05-21 17:42:41 +02:00
aa4025d138 Names for url components
so they can be used with reverse()
2020-05-21 17:42:41 +02:00
de2d58356b Do not generate uneccessary objects 2020-05-21 17:42:41 +02:00
146df2d3b1 test_can_overwrite_kwargs 2020-05-21 17:42:37 +02:00
eb90bca467 Atempt to create model factories 2020-05-21 17:42:24 +02:00