cds-videos icon indicating copy to clipboard operation
cds-videos copied to clipboard

No slaves for old videos with a non-supported aspect ratio

Open jbenito3 opened this issue 7 years ago • 7 comments

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

  1. go to ipython
  2. 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)

jbenito3 avatar Jan 25 '18 20:01 jbenito3

@egabancho this should be fixed here https://github.com/CERNDocumentServer/cds-sorenson/pull/38 right?

zzacharo avatar Feb 21 '18 08:02 zzacharo

I think that https://github.com/CERNDocumentServer/cds-sorenson/pull/38 can be closed, fixed by https://github.com/CERNDocumentServer/cds-sorenson/pull/40

ntarocco avatar Mar 01 '18 17:03 ntarocco

  • [ ] 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 remove slave_.

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

ntarocco avatar Mar 01 '18 17:03 ntarocco

  • 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

egabancho avatar Mar 07 '18 11:03 egabancho

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.

ludmilamarian avatar Mar 29 '18 11:03 ludmilamarian

As part of the renaming script, https://gist.github.com/egabancho/e66e2bf6a26780e4d1cf02bd7b90455f, there are ~350 videos that are being processed.

egabancho avatar Apr 30 '18 14:04 egabancho

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

egabancho avatar Apr 30 '18 19:04 egabancho