@@ -324,6 +324,7 @@ Resources:
324324 MaxChunkConcurrency.$ : " $.Payload.MaxChunkConcurrency"
325325 Format.$ : " $.Payload.Format"
326326 HasAudio.$ : " $.Payload.HasAudio"
327+ SeparateAudio.$ : " $.Payload.SeparateAudio"
327328 ResultPath : $.Plan
328329 Retry :
329330 - ErrorEquals :
@@ -395,7 +396,7 @@ Resources:
395396 Choices :
396397 - Variable : $.Plan.PlanProtocol
397398 StringEquals : v2
398- Next : RenderChunksV2
399+ Next : RenderV2
399400 Default : RenderChunks
400401
401402 RenderChunks :
@@ -511,74 +512,151 @@ Resources:
511512 MaxDelaySeconds : 60
512513 End : true
513514
514- RenderChunksV2 :
515- Type : Map
516- Label : RenderChunksV2
517- ItemsPath : $.Iterator.ChunkIndexes
518- ItemSelector :
519- ChunkIndex.$ : " $$.Map.Item.Value"
520- PlanV2ManifestS3Uri.$ : " $.Plan.PlanV2ManifestS3Uri"
521- PlanV2ArtifactS3Prefix.$ : " $.Plan.PlanV2ArtifactS3Prefix"
522- PlanHash.$ : " $.Plan.PlanHash"
523- ChunkOutputS3Prefix.$ : " $.PlanOutputS3Prefix"
524- Format.$ : " $.Plan.Format"
525- # Chunks past the plan's concurrency queue here instead of being throttled by Lambda.
526- MaxConcurrencyPath : $.Plan.MaxChunkConcurrency
527- ResultPath : $.Chunks
528- ItemProcessor :
529- ProcessorConfig :
530- Mode : DISTRIBUTED
531- ExecutionType : STANDARD
532- StartAt : RenderChunkV2
533- States :
534- RenderChunkV2 :
535- Type : Task
536- Resource : arn:aws:states:::lambda:invoke
537- Parameters :
538- FunctionName : !GetAtt RenderFunction.Arn
539- Payload :
540- Action : renderChunk
541- PlanProtocol : v2
542- ChunkIndex.$ : " $.ChunkIndex"
543- PlanV2ManifestS3Uri.$ : " $.PlanV2ManifestS3Uri"
544- PlanV2ArtifactS3Prefix.$ : " $.PlanV2ArtifactS3Prefix"
545- PlanHash.$ : " $.PlanHash"
546- ChunkOutputS3Prefix.$ : " $.ChunkOutputS3Prefix"
547- Format.$ : " $.Format"
548- ResultSelector :
549- ChunkS3Uri.$ : " $.Payload.ChunkS3Uri"
550- ChunkIndex.$ : " $.Payload.ChunkIndex"
551- Sha256.$ : " $.Payload.Sha256"
552- FramesEncoded.$ : " $.Payload.FramesEncoded"
553- DurationMs.$ : " $.Payload.DurationMs"
554- Retry :
555- - ErrorEquals :
556- - FFMPEG_VERSION_MISMATCH
557- - PLAN_HASH_MISMATCH
558- - S3_URI_NOT_ALLOWED
559- - BROWSER_GPU_NOT_SOFTWARE
560- - PLAN_TOO_LARGE
561- - PlanTooLargeError
562- - PLAN_PROTOCOL_UNSUPPORTED
563- - PlanProtocolUnsupportedError
564- - PLAN_V2_INTEGRITY_UNRECOVERABLE
565- - INVALID_VIDEO_METADATA
566- - PlanV2IntegrityError
567- - PLAN_ARTIFACT_DIGEST_MISMATCH
568- - ChromeBinaryUnavailableError
569- MaxAttempts : 0
570- - ErrorEquals : [Lambda.TooManyRequestsException]
571- IntervalSeconds : 5
572- MaxAttempts : 10
573- BackoffRate : 2
574- MaxDelaySeconds : 60
575- JitterStrategy : FULL
576- - ErrorEquals : [States.ALL]
577- IntervalSeconds : 2
578- MaxAttempts : 4
579- BackoffRate : 2
580- MaxDelaySeconds : 60
581- End : true
515+ RenderV2 :
516+ # Chunks render video only while the audio task mixes the track AssembleV2 stitches in.
517+ Type : Parallel
518+ Branches :
519+ - StartAt : RenderChunksV2
520+ States :
521+ RenderChunksV2 :
522+ Type : Map
523+ Label : RenderChunksV2
524+ ItemsPath : $.Iterator.ChunkIndexes
525+ ItemSelector :
526+ ChunkIndex.$ : " $$.Map.Item.Value"
527+ PlanV2ManifestS3Uri.$ : " $.Plan.PlanV2ManifestS3Uri"
528+ PlanV2ArtifactS3Prefix.$ : " $.Plan.PlanV2ArtifactS3Prefix"
529+ PlanHash.$ : " $.Plan.PlanHash"
530+ ChunkOutputS3Prefix.$ : " $.PlanOutputS3Prefix"
531+ Format.$ : " $.Plan.Format"
532+ # Chunks past the plan's concurrency queue here instead of being throttled by Lambda.
533+ MaxConcurrencyPath : $.Plan.MaxChunkConcurrency
534+ ResultPath : $.Chunks
535+ ItemProcessor :
536+ ProcessorConfig :
537+ Mode : DISTRIBUTED
538+ ExecutionType : STANDARD
539+ StartAt : RenderChunkV2
540+ States :
541+ RenderChunkV2 :
542+ Type : Task
543+ Resource : arn:aws:states:::lambda:invoke
544+ Parameters :
545+ FunctionName : !GetAtt RenderFunction.Arn
546+ Payload :
547+ Action : renderChunk
548+ PlanProtocol : v2
549+ ChunkIndex.$ : " $.ChunkIndex"
550+ PlanV2ManifestS3Uri.$ : " $.PlanV2ManifestS3Uri"
551+ PlanV2ArtifactS3Prefix.$ : " $.PlanV2ArtifactS3Prefix"
552+ PlanHash.$ : " $.PlanHash"
553+ ChunkOutputS3Prefix.$ : " $.ChunkOutputS3Prefix"
554+ Format.$ : " $.Format"
555+ ResultSelector :
556+ ChunkS3Uri.$ : " $.Payload.ChunkS3Uri"
557+ ChunkIndex.$ : " $.Payload.ChunkIndex"
558+ Sha256.$ : " $.Payload.Sha256"
559+ FramesEncoded.$ : " $.Payload.FramesEncoded"
560+ DurationMs.$ : " $.Payload.DurationMs"
561+ Retry :
562+ - ErrorEquals :
563+ - FFMPEG_VERSION_MISMATCH
564+ - PLAN_HASH_MISMATCH
565+ - S3_URI_NOT_ALLOWED
566+ - BROWSER_GPU_NOT_SOFTWARE
567+ - PLAN_TOO_LARGE
568+ - PlanTooLargeError
569+ - PLAN_PROTOCOL_UNSUPPORTED
570+ - PlanProtocolUnsupportedError
571+ - PLAN_V2_INTEGRITY_UNRECOVERABLE
572+ - INVALID_VIDEO_METADATA
573+ - PlanV2IntegrityError
574+ - PLAN_ARTIFACT_DIGEST_MISMATCH
575+ - ChromeBinaryUnavailableError
576+ MaxAttempts : 0
577+ - ErrorEquals : [Lambda.TooManyRequestsException]
578+ IntervalSeconds : 5
579+ MaxAttempts : 10
580+ BackoffRate : 2
581+ MaxDelaySeconds : 60
582+ JitterStrategy : FULL
583+ - ErrorEquals : [States.ALL]
584+ IntervalSeconds : 2
585+ MaxAttempts : 4
586+ BackoffRate : 2
587+ MaxDelaySeconds : 60
588+ End : true
589+ End : true
590+ - StartAt : AudioNeeded
591+ States :
592+ AudioNeeded :
593+ Type : Choice
594+ Choices :
595+ - Variable : $.Plan.SeparateAudio
596+ BooleanEquals : true
597+ Next : Audio
598+ Default : NoAudio
599+ NoAudio :
600+ Type : Pass
601+ Result :
602+ HasAudio : false
603+ AudioS3Uri : null
604+ ResultPath : $.Audio
605+ End : true
606+ Audio :
607+ # The plan left its audio out: mix it here while the chunks render.
608+ Type : Task
609+ Resource : arn:aws:states:::lambda:invoke
610+ Parameters :
611+ FunctionName : !GetAtt RenderFunction.Arn
612+ Payload :
613+ Action : audio
614+ ProjectS3Uri.$ : " $.ProjectS3Uri"
615+ PlanOutputS3Prefix.$ : " $.PlanOutputS3Prefix"
616+ Config.$ : " $.Config"
617+ ResultSelector :
618+ HasAudio.$ : " $.Payload.HasAudio"
619+ AudioS3Uri.$ : " $.Payload.AudioS3Uri"
620+ ResultPath : $.Audio
621+ Retry :
622+ - ErrorEquals :
623+ - FFMPEG_VERSION_MISMATCH
624+ - PLAN_HASH_MISMATCH
625+ - S3_URI_NOT_ALLOWED
626+ - BROWSER_GPU_NOT_SOFTWARE
627+ - FONT_FETCH_FAILED
628+ - PLAN_TOO_LARGE
629+ - PlanTooLargeError
630+ - PLAN_PROTOCOL_UNSUPPORTED
631+ - PlanProtocolUnsupportedError
632+ - PLAN_V2_INTEGRITY_UNRECOVERABLE
633+ - VIDEO_SOURCE_UNRENDERABLE
634+ - INVALID_VIDEO_METADATA
635+ - NOT_MEDIA_PAYLOAD
636+ - NotMediaPayloadError
637+ - PlanV2IntegrityError
638+ - PLAN_ARTIFACT_DIGEST_MISMATCH
639+ - FORMAT_NOT_SUPPORTED_IN_DISTRIBUTED
640+ - CHUNK_EXCEEDS_WORKER_TIMEOUT
641+ - ChromeBinaryUnavailableError
642+ - SITE_MANIFEST_INVALID
643+ MaxAttempts : 0
644+ - ErrorEquals : [Lambda.TooManyRequestsException]
645+ IntervalSeconds : 5
646+ MaxAttempts : 10
647+ BackoffRate : 2
648+ MaxDelaySeconds : 60
649+ JitterStrategy : FULL
650+ - ErrorEquals : [States.ALL]
651+ IntervalSeconds : 2
652+ MaxAttempts : 4
653+ BackoffRate : 2
654+ MaxDelaySeconds : 60
655+ End : true
656+ ResultSelector :
657+ Chunks.$ : " $[0].Chunks"
658+ Audio.$ : " $[1].Audio"
659+ ResultPath : $.Render
582660 Next : AssembleV2
583661
584662 AssembleV2 :
@@ -592,8 +670,8 @@ Resources:
592670 PlanV2ManifestS3Uri.$ : " $.Plan.PlanV2ManifestS3Uri"
593671 PlanV2ArtifactS3Prefix.$ : " $.Plan.PlanV2ArtifactS3Prefix"
594672 PlanHash.$ : " $.Plan.PlanHash"
595- ChunkS3Uris.$ : " $.Chunks[*].ChunkS3Uri"
596- AudioS3Uri : null
673+ ChunkS3Uris.$ : " $.Render. Chunks[*].ChunkS3Uri"
674+ AudioS3Uri.$ : " $.Render.Audio.AudioS3Uri "
597675 OutputS3Uri.$ : " $.OutputS3Uri"
598676 Format.$ : " $.Plan.Format"
599677 ResultSelector :
0 commit comments