diff --git a/server/viame_server/viame_detection.py b/server/viame_server/viame_detection.py index ceece63b1..28932b692 100644 --- a/server/viame_server/viame_detection.py +++ b/server/viame_server/viame_detection.py @@ -45,10 +45,11 @@ def _get_clip_meta(self, folder): videoUrl = None # Find a video tagged with an h264 codec left by the transcoder - video = Item().findOne({'folderId': folder['_id'], 'meta.codec': 'h264',}) - if video: + item = Item().findOne({'folderId': folder['_id'], 'meta.codec': 'h264',}) + if item: + video = Item().childFiles(item)[0] videoUrl = ( - f'/api/v1/item/{str(video["_id"])}/download?contentDisposition=inline' + f'/api/v1/file/{str(video["_id"])}/download?contentDisposition=inline' ) return {