Viblast / ios-player-sdk

Viblast Player iOS SDK - native video playback of MPEG-DASH and HLS for live streaming. Extendable with P2P delivery through Viblast PDN.
http://viblast.com/player/
Other
91 stars 17 forks source link

Issues with DASH streams (crashes / no playback) #5

Open defagos opened 8 years ago

defagos commented 8 years ago

Hi there,

I was having a look at your SDK. Playback of the demo DASH stream works, but several test streams I considered lead to crashes or won't play at all:

Single resolution Multi-Rate

URL: http://dash.edgesuite.net/dash264/TestCases/1a/netflix/exMPD_BIP_TC1.mpd

Crashes with the following exception and stack trace:

2016-03-17 09:06:24.292 VBPlayerDemo[36861:766218] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSSetM addObject:]: object cannot be nil'
*** First throw call stack:
(
    0   CoreFoundation                      0x00000001044bee65 __exceptionPreprocess + 165
    1   libobjc.A.dylib                     0x0000000103b16deb objc_exception_throw + 48
    2   CoreFoundation                      0x00000001043dde14 -[__NSSetM addObject:] + 788
    3   VBPlayerDemo                        0x0000000102570d35 EZAudioBufferListCopy + 15758
    4   VBPlayerDemo                        0x0000000102883a0c TimeSince + 3191924
    5   VBPlayerDemo                        0x0000000102880002 TimeSince + 3177066
    6   VBPlayerDemo                        0x000000010287ff5c TimeSince + 3176900
    7   VBPlayerDemo                        0x000000010287fcc2 TimeSince + 3176234
    8   VBPlayerDemo                        0x000000010287fcca TimeSince + 3176242
    9   VBPlayerDemo                        0x000000010287fcca TimeSince + 3176242
    10  VBPlayerDemo                        0x000000010287fa7d TimeSince + 3175653
    11  VBPlayerDemo                        0x0000000102571396 EZAudioBufferListCopy + 17391
    12  VBPlayerDemo                        0x0000000102575789 EZAudioBufferListCopy + 34786
    13  VBPlayerDemo                        0x000000010257733c EZAudioBufferListCopy + 41877
    14  VBPlayerDemo                        0x000000010256c4e6 -[PlayerView displayLayer] + 2166
    15  VBPlayerDemo                        0x00000001029a824a _ZN7viblast15ViblastDelegate14onMediaSegmentEPKcjNS_9MediaTypeEi + 66
    16  VBPlayerDemo                        0x0000000102a63e48 _ZN17Iso2CMMp4ConsumerD0Ev + 768634
    17  VBPlayerDemo                        0x00000001028845bb TimeSince + 3194915
    18  VBPlayerDemo                        0x0000000102a64f14 _ZN17Iso2CMMp4ConsumerD0Ev + 772934
    19  VBPlayerDemo                        0x0000000102884924 TimeSince + 3195788
    20  VBPlayerDemo                        0x0000000102884759 TimeSince + 3195329
    21  VBPlayerDemo                        0x00000001028846ef TimeSince + 3195223
    22  VBPlayerDemo                        0x00000001028453da TimeSince + 2936386
    23  VBPlayerDemo                        0x0000000102844afa TimeSince + 2934114
    24  VBPlayerDemo                        0x0000000102a52e4c _ZN17Iso2CMMp4ConsumerD0Ev + 699006
    25  VBPlayerDemo                        0x0000000102a40998 _ZN17Iso2CMMp4ConsumerD0Ev + 624074
    26  VBPlayerDemo                        0x0000000102835dcc TimeSince + 2873396
    27  VBPlayerDemo                        0x000000010285f390 TimeSince + 3042808
    28  VBPlayerDemo                        0x000000010285ef74 TimeSince + 3041756
    29  VBPlayerDemo                        0x000000010284f6e8 TimeSince + 2978128
    30  VBPlayerDemo                        0x0000000102a32324 _ZN17Iso2CMMp4ConsumerD0Ev + 565078
    31  VBPlayerDemo                        0x0000000102795e1a TimeSince + 2218114
    32  VBPlayerDemo                        0x00000001027a184f TimeSince + 2265783
    33  VBPlayerDemo                        0x00000001027a1683 TimeSince + 2265323
    34  libsystem_pthread.dylib             0x0000000106421c13 _pthread_body + 131
    35  libsystem_pthread.dylib             0x0000000106421b90 _pthread_body + 0
    36  libsystem_pthread.dylib             0x000000010641f375 thread_start + 13
)
libc++abi.dylib: terminating with uncaught exception of type NSException

Many more test streams are available under: http://dashif.org/test-vectors

BBC test stream

URL: http://rdmedia.bbc.co.uk/dash/ondemand/testcard/1/client_manifest-events.mpd

Crashes because of an assertion. Might work with release binaries, but the supplied debug binaries lead to a the following exception being thrown:

Assertion failed: (fragment.track.format), function -[Iso2CmConv readVideoData:fragment:], file /Users/ivan/work/projects/viblast/viblast/libviblast/ios/src/VBPlayer/VBPlayer/Iso2CmConv.mm, line 638.

Youtube

URL: http://www.youtube.com/api/manifest/dash/id/bf5bb2419360daf1/source/youtube?as=fmp4_audio_clear,fmp4_sd_hd_clear&sparams=ip,ipbits,expire,source,id,as&ip=0.0.0.0&ipbits=0&expire=19000000000&signature=51AF5F39AB0CEC3E5497CD9C900EBFEAECCCB5C7.8506521BFC350652163895D4C26DEE124209AA9E&key=ik0

Does not work. Apparently the player believes it is playing an HLS stream:

[09:22:36] [vb] Error(HlsPlaylistManager.cc:131): Getting the playlist will be retried in 2 s.
[09:22:38] [vb] Error(HlsPlaylistReader.cc:114): [HlsPlaylistReader] Format not supported
[09:22:38] [vb] Error(HlsPlaylistManager.cc:78): Invalide or empty playlist: <?xml version="1.0" encoding="UTF-8"?>

Hope this information could be helpful.

Best regards.

ivermolaev commented 8 years ago

Hey @defagos,

Thank you very much for the time you've spent trying the player! I can't stress how helpful this is and I'll do my best to look at the issues and provide a feedback ASAP.

Cheers

ivermolaev commented 8 years ago

Hey, I've reviewed the issues regarding the streams, so to summarize:

Single resolution Multi-Rate

This should be playable now although you'll see a lot of warning logs for now...

BBC test stream

This stream introduces an unexpected ISO format, namely the 'avc3' box. If there is no high demand on this issue I think we'll leave that way.

Youtube

The protocol resolution is fixed, but usually Youtube uses a fmp4 format we don't support yet. So our opinion here is the same as in the BBC test stream issue

Best

defagos commented 8 years ago

Hi,

Thanks for the update. Playback now works perfectly for the single-res multi-rate video.

I will have a thorough look at many more use cases in a near future, but this looks really promising.

Best regards.