Skip to content

Commit

Permalink
Add transcoding to AV1 to default set
Browse files Browse the repository at this point in the history
For this to work in production, a new fileformat 'av1' must be
added.

Fixes #127
  • Loading branch information
petterreinholdtsen committed Jan 19, 2019
1 parent dcb37a0 commit 2b9dbab
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
7 changes: 7 additions & 0 deletions fkbeta/fk/fixtures/frikanalen.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,13 @@
"fsname": "mp4"
}
},
{
"model": "fk.fileformat",
"pk": 9,
"fields": {
"fsname": "av1"
}
},
{
"model": "fk.category",
"pk": 119,
Expand Down
6 changes: 6 additions & 0 deletions utils/move_and_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
'original': 6,
'theora': 7,
'srt': 8,
'av1': 9,
}
for k, v in list(VF_FORMATS.items()):
VF_FORMATS[v] = k
Expand All @@ -56,6 +57,10 @@ class Converter(object):
'-qscale:v 7 -qscale:a 2 -vf scale=720:-1'),
'ext': 'ogv',
},
'av1': {
'ffmpeg': '-c:v libaom-av1 -strict -2',
'ext': 'avi',
},
'broadcast': {
'ffmpeg': '-target pal-dv',
'ext': 'dv',
Expand Down Expand Up @@ -95,6 +100,7 @@ def get_formats(cls, filepath):
else:
assert 'broadcast' in path
formats.append('theora')
formats.append('av1')
return formats


Expand Down
6 changes: 4 additions & 2 deletions utils/test_move_and_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,12 @@ def test_generate(self):
('/tmp/original/test.ogv', [
'/tmp/large_thumb/test.jpg',
'/tmp/broadcast/test.dv',
'/tmp/theora/test.ogv']),
'/tmp/theora/test.ogv',
'/tmp/av1/test.avi']),
('/tmp/broadcast/test.ogv', [
'/tmp/large_thumb/test.jpg',
'/tmp/theora/test.ogv']),
'/tmp/theora/test.ogv',
'/tmp/av1/test.avi']),
)
nop = lambda *_, **__: None
for t in tests:
Expand Down

0 comments on commit 2b9dbab

Please sign in to comment.