From f2f72f6f2f623076ac14f2fb8d83c8f3913dfe30 Mon Sep 17 00:00:00 2001 From: Laurent DEFERT Date: Sun, 8 Jan 2023 11:45:19 +0100 Subject: [PATCH] set default codecs that work on all platform --- .../sync/migrations/0016_default_codecs.py | 23 +++++++++++++++++++ tubesync/sync/models.py | 4 ++-- 2 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 tubesync/sync/migrations/0016_default_codecs.py diff --git a/tubesync/sync/migrations/0016_default_codecs.py b/tubesync/sync/migrations/0016_default_codecs.py new file mode 100644 index 00000000..a2f93d6f --- /dev/null +++ b/tubesync/sync/migrations/0016_default_codecs.py @@ -0,0 +1,23 @@ +# Generated by Django 3.2.15 on 2023-01-08 10:52 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('sync', '0015_twitch'), + ] + + operations = [ + migrations.AlterField( + model_name='source', + name='source_acodec', + field=models.CharField(choices=[('MP4A', 'MP4A'), ('OPUS', 'OPUS')], db_index=True, default='MP4A', help_text='Source audio codec, desired audio encoding format to download', max_length=8, verbose_name='source audio codec'), + ), + migrations.AlterField( + model_name='source', + name='source_vcodec', + field=models.CharField(choices=[('AVC1', 'AVC1 (H.264)'), ('VP9', 'VP9')], db_index=True, default='AVC1', help_text='Source video codec, desired video encoding format to download (ignored if "resolution" is audio only)', max_length=8, verbose_name='source video codec'), + ), + ] diff --git a/tubesync/sync/models.py b/tubesync/sync/models.py index e2623b37..ae06e5a4 100644 --- a/tubesync/sync/models.py +++ b/tubesync/sync/models.py @@ -267,7 +267,7 @@ class IndexSchedule(models.IntegerChoices): max_length=8, db_index=True, choices=SOURCE_VCODEC_CHOICES, - default=SOURCE_VCODEC_VP9, + default=SOURCE_VCODEC_AVC1, help_text=_('Source video codec, desired video encoding format to download (ignored if "resolution" is audio only)') ) source_acodec = models.CharField( @@ -275,7 +275,7 @@ class IndexSchedule(models.IntegerChoices): max_length=8, db_index=True, choices=SOURCE_ACODEC_CHOICES, - default=SOURCE_ACODEC_OPUS, + default=SOURCE_ACODEC_MP4A, help_text=_('Source audio codec, desired audio encoding format to download') ) prefer_60fps = models.BooleanField(