RenderHeads / UnityPlugin-AVProVideo

AVPro Video is a multi-platform Unity plugin for advanced video playback
https://www.renderheads.com/products/avpro-video/
224 stars 27 forks source link

[iOS] Sometimes the video doesn't play #1858

Closed dw8869 closed 2 weeks ago

dw8869 commented 1 month ago

Describe the issue Sometimes the video doesn't play on iOS.

Unity version: 2020.3.32f1 AVPro Video version (number and edition (trial/core/ultra/enterprise)): 2.9.1 Ultra Operating system version: 15.1 Device model: iPhone XR Video specs (resolution, frame-rate, codec, file size):

To Reproduce

  1. Just play video.
  2. Sometimes the video doesn't play.

Logs 234.txt

\uc0\u44592 \u48376     22:02:08.077405+0900    ifland  [AVProVideo] Opening https://mediapoccdndev2-standard-ms-ams2.azureedge.net/ce398453-06e0-46ce-8c58-18a5194207d6/2f681ba2-d8db.ism/manifest(audio-only=false,format=m3u8-aapl-v3).m3u8 (offset 0) with API \
RenderHeads.Media.AVProVideo.MediaPlayer:InternalOpenMedia()\
ifland.UCF.Media.Module.<LoadAsync>d__36:MoveNext()\
System.Runtime.CompilerServices.AsyncVoidMethodBuilder:Start(TStateMachine&)\
ifland.UCF.Media.Module.VideoPlayer:LoadAsync(String, Boolean)\
ifland.UCF.Media.Service.<Load>d__23:MoveNext()\
System.Threading.ContextCallback:Invoke(Object)\
System.Threading.ExecutionContext:RunInternal(ExecutionContext, ContextCallback, Object, Boolean)\
System.Runtime.CompilerServices.MoveNextRunner:Run()\
System.Action:Invoke()\
System.Threading.ContextCallback:Invoke(Object)\
System.Threading.Tasks.AwaitTaskContinuation:RunCallback(ContextCallback, Object, Task&)\
System.Threading.Tasks.Task:FinishContinuations()\
System.Threading.Tasks.Task`1:TrySetResult(TResult)\
System.Runtime.CompilerServices.AsyncTaskMethodBu<\'85>\
\uc0\u44592 \u48376     22:02:08.080028+0900    ifland  <<<< FigCustomURLHandling >>>> FigCustomURLHandlerCreate: newHandler: com.apple.avfoundation.customurl.cfurlconnection.0x28a878cc0 options: (null)\
\uc0\u44592 \u48376     22:02:08.080507+0900    ifland  <<<< FigCustomURLHandling >>>> FigCustomURLHandlerCreate: newHandler: com.apple.avfoundation.authkeychain.0x28a878d80 options: (null)\
\uc0\u44592 \u48376     22:02:08.081038+0900    ifland  <<<< FigCustomURLHandling >>>> FigCustomURLHandlerCreate: newHandler: AVAssetResourceLoader.0x28a878e40 options: \{\
\}\
\uc0\u44592 \u48376     22:02:08.081486+0900    ifland  <<<< FigCustomURLHandling >>>> FigCustomURLHandlerCreate: newHandler: AVAssetResourceLoader-authentication.0x28a878f00 options: (null)\
\uc0\u44592 \u48376     22:02:08.082109+0900    ifland  <<<< FigCustomURLHandling >>>> FigCustomURLHandlerCreate: newHandler: com.apple.avfoundation.customurl.nsurlsession.0x28a878fc0 options: \{\
    "CURLHOption_ClientRequestsRepresentAccurateNetworkStatistics" = 1;\
\}\
\uc0\u44592 \u48376     22:02:08.082844+0900    ifland  <<<< AVAssetInspectorLoader >>>> -[AVFigAssetInspectorLoader loadValuesAsynchronouslyForKeys:keysForCollectionKeys:completionHandler:]: called (self: 0x28bb347e0, keys: (\
    playable,\
    availableMediaCharacteristicsWithMediaSelectionOptions,\
    tracks,\
    duration,\
    metadata\
), keysForCollectionKeys: (null), handler: non-nil)\
\uc0\u44592 \u48376     22:02:08.082951+0900    ifland  <<<< AVAssetInspectorLoader >>>> -[AVFigAssetInspectorLoader loadValuesAsynchronouslyForKeys:keysForCollectionKeys:completionHandler:]: Calling FigAssetLoadValuesAsyncForProperties for properties (\
    "assetProperty_QuickTimeUserData",\
    "assetProperty_HLSMetadata",\
    "assetProperty_ID3Metadata",\
    "assetProperty_ISOUserData",\
    "assetProperty_AVCHDMetadata",\
    "assetProperty_FormatSpecificMetadata",\
    "assetProperty_MediaPlaybackValidation",\
    "assetProperty_Tracks",\
    "assetProperty_FormatReader",\
    "assetProperty_AssetType",\
    "assetProperty_QuickTimeMetadata",\
    Duration,\
    "assetProperty_iTunesMetadata",\
    "assetProperty_AvailableMetadataFormats",\
    availableMediaCharacteristicsWithMediaSelectionOptions\
)\
\uc0\u44592 \u48376     22:02:08.083374+0900    ifland  <<<< AVAssetInspectorLoader >>>> -[AVFigAssetInspectorLoader loadValuesAsynchronouslyForKeys:keysForCollectionKeys:completionHandler:]: Batch 0x281880520: asset batch ID = 1 (err=0, alreadyLoaded=0)\
\uc0\u44592 \u48376     22:02:08.083404+0900    ifland  <<<< AVAssetInspectorLoader >>>> -[AVFigAssetInspectorLoader loadValuesAsynchronouslyForKeys:keysForCollectionKeys:completionHandler:]: Calling FigAssetLoadValuesAsyncForTrackProperties for properties (\
    MediaCharacteristicArray\
)\
\uc0\u44592 \u48376     22:02:08.084348+0900    ifland  <<<< AVAssetInspectorLoader >>>> -[AVFigAssetInspectorLoader loadValuesAsynchronouslyForKeys:keysForCollectionKeys:completionHandler:]: Batch 0x281880520: track batch ID = 2 (err=0, alreadyLoaded=0)\
\uc0\u44592 \u48376     22:02:08.107361+0900    ifland  Request Send(GET):https://jumpvrapi-dev-fd.treal.xyz//avt/avatar/secured/motion/list?motionGroup=ALL&motionType=NEW_MTN_ROOM\
THTTPRequest:Request()\
ifland.UCF.Core.Helper.JumpVRAPI:Update()\
\uc0\u44592 \u48376     22:02:08.109821+0900    ifland  <<<< AVAssetInspectorLoader >>>> handleFigAssetLoadingNotification: Received kFigAssetNotification_BatchPropertyLoadComplete (payload: \{\
    "assetPayload_BatchID" = 2;\
\})\
\uc0\u44592 \u48376     22:02:08.110315+0900    ifland  <<<< AVAssetInspectorLoader >>>> handleFigAssetLoadingNotification_block_invoke: Batch 0x281880520: Marking track batch ID 2 as complete\
\uc0\u44592 \u48376     22:02:08.110366+0900    ifland  <<<< AVAssetInspectorLoader >>>> -[AVFigAssetInspectorLoader _invokeCompletionHandlerForLoadingBatches:]: No completed batches\
\uc0\u44592 \u48376     22:02:08.110461+0900    ifland  <<<< AVAssetInspectorLoader >>>> handleFigAssetLoadingNotification: Received kFigAssetNotification_BatchPropertyLoadComplete (payload: \{\
    "assetPayload_BatchID" = 1;\
\})\
\uc0\u44592 \u48376     22:02:08.110544+0900    ifland  <<<< AVAssetInspectorLoader >>>> handleFigAssetLoadingNotification_block_invoke: Batch 0x281880520: Marking asset batch ID 1 as complete\
\uc0\u44592 \u48376     22:02:08.110603+0900    ifland  <<<< AVAssetInspectorLoader >>>> -[AVFigAssetInspectorLoader _invokeCompletionHandlerForLoadingBatches:]: Batch 0x281880520: dispatching completion handler\
\uc0\u50724 \u47448     22:02:08.110814+0900    ifland  failed to load key availableMediaCharacteristicsWithMediaSelectionOptions, error: \u47532 \u49548 \u49828  \u49324 \u50857  \u48520 \u44032 \
\uc0\u44592 \u48376     22:02:08.140471+0900    ifland  [AVProVideo] Error: Loading failed.  File not found, codec not supported, video resolution too high or insufficient system resources.\
RenderHeads.Media.AVProVideo.MediaPlayer:UpdateErrors()\
RenderHeads.Media.AVProVideo.MediaPlayer:Update()\

Videos https://mediapoccdndev2-standard-ms-ams2.azureedge.net/ce398453-06e0-46ce-8c58-18a5194207d6/2f681ba2-d8db.ism/manifest(audio-only=false,format=m3u8-aapl-v3).m3u8

Please DO NOT LINK / ATTACH YOUR PROJECT FILES HERE

Instead email the link to us unitysupport@renderheads.com

dw8869 commented 1 month ago

What mean failed to load key availableMediaCharacteristicsWithMediaSelectionOptions?

Chris-RH commented 1 month ago

Can you make sure you have upgraded to the latest version, AVPro Video version 2.9.3 please Is this reproducible in a fresh project, using only AVPro Video mediaplayer demo scene to play your URL? Does the issue only occur with this URL or are there any others that cause the issue to occur?

dw8869 commented 1 month ago

@Chris-RH It is not reproduced in the demo scene. URL: https://cph-p2p-msl.akamaized.net/hls/live/2000341/test/master.m3u8

I think it only happens at a specific URL, what should I look at?

Does it take a long time to load the video? If so, can I set a timeout time?

MorrisRH commented 3 weeks ago

What mean failed to load key availableMediaCharacteristicsWithMediaSelectionOptions?

This basically means that the manifest failed to load for the asset, availableMediaCharacteristicsWithMediaSelectionOptions is just the first item where the failure was discovered.

The original URL you posted responds with an xml chunk containing a server error so obviously won't play. The second URL works fine.