cds-videos
cds-videos copied to clipboard
No slaves for old videos with a non-supported aspect ratio
Expected behavior
Old videos with an aspect ratio different from the ones that are available should anyway have slaves (generated by Sorenson) with the closest available aspect ratio.
Actual behavior
Such old videos do not have any slave and in consequence, the video does not play. See for example https://videos.cern.ch/record/1951286
The code getting the closest aspect ratio to the ones available is here: https://github.com/CERNDocumentServer/cds-videos/blob/ea86a0d3b296088e3de21945091e4f6cf0cd58f9/cds/modules/migrator/records.py#L781
But it is useless because later, just before sending the request to Sorenson there is another check:
https://github.com/CERNDocumentServer/cds-sorenson/blob/95375b39bf0bb73be27ce98db07fd7d6fde9d240/cds_sorenson/api.py#L205
Information about the Issue
I suggest to move the code to get the closest aspect ratio from: https://github.com/CERNDocumentServer/cds-videos/blob/ea86a0d3b296088e3de21945091e4f6cf0cd58f9/cds/modules/migrator/records.py#L781
to:
https://github.com/CERNDocumentServer/cds-sorenson/blob/95375b39bf0bb73be27ce98db07fd7d6fde9d240/cds_sorenson/api.py#L205
Steps to reproduce the behavior
- go to ipython
- run:
from cds.modules.deposit.api import Video
from cds.modules.migrator.records import CDSRecordDumpLoader
deposit = Video.get_record(pid.object_uuid) # e.g. use a4ddec9a-10c0-4479-bf07-b0646b625edb instead of pid.object_uuid
CDSRecordDumpLoader._create_missing_subformats(None, deposit)
@egabancho this should be fixed here https://github.com/CERNDocumentServer/cds-sorenson/pull/38 right?
I think that https://github.com/CERNDocumentServer/cds-sorenson/pull/38 can be closed, fixed by https://github.com/CERNDocumentServer/cds-sorenson/pull/40
- [ ] CONFIG NOTES:
- update config
CELERY_ROUTES
by adding:'cds.modules.maintenance.tasks.MaintenanceTranscodeVideoTask': 'transcode_maintenance',
- adjust Celery worker machine to run just a few concurrent maintenance task, as for
transcode_quiet
- bulk update all records to rename subformats
key
and removeslave_
.
QA
- https://gitlab.cern.ch/ai/it-puppet-hostgroup-cds/blob/labs_qa/code/templates/cds/invenio.cdslabs_qa.cfg#L73
PROD
- https://gitlab.cern.ch/ai/it-puppet-hostgroup-cds/blob/labs_qa/code/templates/cds/invenio.cdslabs.cfg#L73
- https://gitlab.cern.ch/ai/it-puppet-hostgroup-cds/blob/labs_qa/data/fqdns/videos-cds-task3.cern.ch.yaml#L4
- update config CELERY_ROUTES by adding: 'cds.modules.maintenance.tasks.MaintenanceTranscodeVideoTask': 'transcode_maintenance',
- adjust Celery worker machine to run just a few concurrent maintenance task, as for transcode_quiet
https://gitlab.cern.ch/ai/it-puppet-hostgroup-cds/commit/d47d03af0960e43e4d618541b148e4efd7aedf06
I think this is still opened due to the fact that the re-generation has not run for all the records that are having dubious aspect ratios.
As part of the renaming script, https://gist.github.com/egabancho/e66e2bf6a26780e4d1cf02bd7b90455f, there are ~350 videos that are being processed.
These records have a really low resolution and we don't have a preset small enough for them
43745
43755
726429
726428
43761
43686
1221574
43756
823571
42532
615894
1455914
43752
43681
43685
43700
43769
1540296
https://github.com/CERNDocumentServer/cds-sorenson/pull/42