RenderHeads / UnityPlugin-AVProVideo

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

H265 m3u8 Streams not compatible? #131

Closed JohnPop1 closed 5 years ago

JohnPop1 commented 5 years ago

Hello RenderHeads, we have encountered the following problem

Version: [AVProVideo] Initialising AVPro Video (script v1.9.14 plugin v1.9.14) on Emulated GPU running Metal/Metal [emulated] (MT True) on OSXEditor

Problem: We're using an m3u8 stream encoded in H265.

Unfortunately only the audio in the stream is played and the video remains black.

Is there something we didn't consider?

MorrisRH commented 5 years ago

Hello!

To the best of our knowledge HEVC playback works fine both on device and in the editor. There is a couple of things that could be affecting playback though:

  1. Apple does not support HEVC in MPEG-2 transport segments (.ts files), you have to use fragmented mp4.
  2. macOS High Sierra (10.13)or better is required.

We use the following stream for our tests: https://bitmovin-a.akamaihd.net/content/dataset/multi-codec/hevc/stream_fmp4.m3u8

If this example works for you then the problem is likely to be with your stream. If it doesn't work, could you provide the following information:

If possible it would be really useful to have access to the stream you are using as well. You can send this to unitysupport@renderheads.com if you want to keep it private.

We always recommend that you upgrade to the latest version of AVPro Video, which is currently 1.10.0.

JohnPop1 commented 5 years ago

Thank you very much for your answer!

I apologize for the delayed reply. We have now resumed the tasks.

The test stream from you works on the iOS device. I have a question regarding this:

In which format (codec) does the video have to be available?

Our current stream is as follows, but unfortunately it doesn't work on the iOS device

Program 4 Metadata: variant_bitrate : 2340495 Stream #0:8: Video: hevc (Main) (hev1 / 0x31766568), yuv420p(tv), 854x854, 147 kb/s, 29.97 tbr, 30k tbn, 29.97 tbc Metadata: variant_bitrate : 2340495 major_brand : iso5 minor_version : 512 compatible_brands: iso6mp41 encoder : Lavf58.30.100 Stream #0:9: Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 2 kb/s Metadata: variant_bitrate : 2340495

Do we have to pay attention to the MIME types and subcodec?

Best regards John

AndrewRH commented 5 years ago

The issue could be the stream tag. It's tagged as "hev1" in your example, but on Apple platform it will not play unless it is "hvc1". This is usually something you can set in the encoder.

Does that help?

JohnPop1 commented 5 years ago

We have now tried it with "hvc1" it works so far with the HD resolution (1280x1280).

Unfortunately it doesn't work if we want to play a higher resolution (1920x1920, 2560x2560, 3840x3840).

Error: [AVProVideo] Error: Loading failed. File not found, codec not supported, video resolution too high or insufficient system resources.

Is it possible to support their resolution, can this be the problem?

video resolution too high or insufficient system resources.

MorrisRH commented 5 years ago

I have successfully tested 4096x4096 HLS HEVC stream on both iOS and macOS so I am unsure as to why this is not working for you.

It would be really helpful if you could let us know what hardware, OS and Unity versions you are using.

If you could provide links to the the video files/streams then that would also aid in diagnosing the issue, you can send these to unitysupport@renderheads.com.

AndrewRH commented 5 years ago

We will close this thread soon due to inactivity. Thanks,

AndrewRH commented 5 years ago

Closing thread due to inactivity. If you're still having problems please recreate a new thread.