Decode uploaded footage in order with WebCodecs
This commit is contained in:
parent
131b39bff0
commit
65ad67c129
12 changed files with 454 additions and 364 deletions
|
|
@ -240,6 +240,8 @@ def _footage_json(footage: Footage, urls=True):
|
|||
# existed, which the loader reports as "re-extract this" rather than
|
||||
# failing somewhere inside MediaPipe.
|
||||
"video": f"/blob/{footage.video.digest}" if footage.video_id else None,
|
||||
# What the page actually decodes: one access unit per frame, no container.
|
||||
"stream": f"/blob/{footage.stream.digest}" if footage.stream_id else None,
|
||||
"feature-absence": footage.feature_absence or {},
|
||||
}
|
||||
if urls:
|
||||
|
|
@ -257,7 +259,7 @@ def footage_list(request):
|
|||
@require_http_methods(["GET"])
|
||||
def footage_detail(request, footage_id):
|
||||
try:
|
||||
footage = Footage.objects.select_related("audio", "video").get(id=footage_id)
|
||||
footage = Footage.objects.select_related("audio", "video", "stream").get(id=footage_id)
|
||||
except Footage.DoesNotExist:
|
||||
return JsonResponse({"error": "no such footage"}, status=404)
|
||||
return JsonResponse(_footage_json(footage))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue