Video (Frames) of Mediaplayer gets lost outside viewport
Summary
In our company Xamarin.Forms App, we are using the MediaPlayerElement inside of a CarouselView. Not all, but some items in this CarouselView contains a video which should be playing correctly. At first, the video is playing without problems, but after the video is started, and the user swipes the CarouselView item with the video away, the Videoframes get lost. There is still audio, so the user is able to hear the video, but cannot see it. I added a Sample Xamarin.Forms application where the issue is reproduced.
Minimal project and steps to reproduce
Sample app hosted on github: gueneylib/MediaPlayerElementSample
Steps to reproduce:
- swipe to the right until you are in a CarouselView item with a video
- start the video
- swipe the video away so you are in another CarouselView item
- swipe back to the item where you started the video
What is the current bug behavior?
the Videoframes get lost and there is no visual, but audio
What is the expected correct behavior?
the video should play normally with audio and video visuals
Relevant logs and/or screenshots
Logs:
LibVLC log: Copyright © 1996-2019 the VideoLAN team
LibVLC log: revision 3.0.8-262-g497f4d6f1c
LibVLC log: VLC media player - 3.0.9 Vetinari
LibVLC log: option marq-opacity does not exist
LibVLC log: option marq-refresh does not exist
LibVLC log: option marq-color does not exist
LibVLC log: option marq-position does not exist
LibVLC log: option marq-size does not exist
LibVLC log: option marq-timeout does not exist
LibVLC log: option marq-x does not exist
LibVLC log: option marq-y does not exist
LibVLC log: creating audio output
LibVLC log: looking for audio output module matching "any": 4 candidates
LibVLC log: option audiounit_ios-gain does not exist
LibVLC log: using audio output module "audiounit_ios"
LibVLC log: keeping audio output
LibVLC log: removing module "audiounit_ios"
LibVLC log: option marq-color does not exist
LibVLC log: option marq-opacity does not exist
LibVLC log: option marq-timeout does not exist
LibVLC log: option marq-x does not exist
LibVLC log: option marq-y does not exist
LibVLC log: looking for audio output module matching "any": 4 candidates
LibVLC log: option marq-position does not exist
LibVLC log: option marq-refresh does not exist
LibVLC log: option marq-size does not exist
LibVLC log: creating audio output
LibVLC log: option audiounit_ios-gain does not exist
LibVLC log: using audio output module "audiounit_ios"
LibVLC log: keeping audio output
LibVLC log: removing module "audiounit_ios"
LibVLC log: looking for renderer_discovery module matching "Bonjour_renderer": 2 candidates
LibVLC log: starting discovery
LibVLC log: ftp does not match current discovery mode, skipping
LibVLC log: smb does not match current discovery mode, skipping
LibVLC log: nfs does not match current discovery mode, skipping
LibVLC log: sftp does not match current discovery mode, skipping
LibVLC log: starting discovery for type _googlecast._tcp.
LibVLC log: using renderer_discovery module "bonjour"
LibVLC log: looking for renderer_discovery module matching "Bonjour_renderer": 2 candidates
LibVLC log: ftp does not match current discovery mode, skipping
LibVLC log: smb does not match current discovery mode, skipping
LibVLC log: starting discovery
LibVLC log: nfs does not match current discovery mode, skipping
LibVLC log: sftp does not match current discovery mode, skipping
LibVLC log: starting discovery for type _googlecast._tcp.
LibVLC log: using renderer_discovery module "bonjour"
LibVLC log: Creating an input for 'BigBuckBunny.mp4'
LibVLC log: using timeshift granularity of 50 MiB
LibVLC log: using default timeshift path
LibVLC log: `http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4'
LibVLC log: creating demux: access='http' demux='any' location='commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4' file='(null)'
LibVLC log: looking for access_demux module matching "http": 4 candidates
LibVLC log: no access_demux modules matched
LibVLC log: creating access: http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4
LibVLC log: looking for access module matching "http": 20 candidates
LibVLC log: resolving commondatastorage.googleapis.com ...
LibVLC log: outgoing request:
GET /gtv-videos-bucket/sample/BigBuckBunny.mp4 HTTP/1.1
Host: commondatastorage.googleapis.com
Accept: */*
Accept-Language: en_US
User-Agent: VLC/3.0.9 LibVLC/3.0.9
Range: bytes=0-
LibVLC log: incoming response:
HTTP/1.1 206 Partial Content
X-GUploader-UploadID: ABg5-UzwCu8NrXL2ag_8clCpvx4AVNrdM-VDdWuq1dVWPpfnG5wrXlFTGDMoA3PG3cC-ftKSJA_Vai1FKMFbgX-374WY_eKUgw
Expires: Mon, 19 Apr 2021 23:14:36 GMT
Date: Mon, 19 Apr 2021 22:14:36 GMT
Cache-Control: public, max-age=3600
Last-Modified: Thu, 05 Dec 2013 18:43:53 GMT
ETag: "cab08b36195edb1a1231d2d09fa450e0"
x-goog-generation: 1386269033518000
x-goog-metageneration: 2
x-goog-stored-content-encoding: identity
x-goog-stored-content-length: 158008374
Content-Type: video/mp4
x-goog-hash: crc32c=x4GOmQ==
x-goog-hash: md5=yrCLNhle2xoSMdLQn6RQ4A==
x-goog-storage-class: STANDARD
Accept-Ranges: bytes
Content-Range: bytes 0-158008373/158008374
Content-Length: 158008374
Access-Control-Allow-Origin: *
Access-Control-Expose-Headers: origin, range
Server: UploadServer
LibVLC log: using access module "access"
LibVLC log: looking for stream_filter module matching "prefetch,cache_block": 25 candidates
LibVLC log: using 16777216 bytes buffer, 16777216 bytes read
LibVLC log: using stream_filter module "prefetch"
LibVLC log: looking for stream_filter module matching "any": 25 candidates
LibVLC log: no stream_filter modules matched
LibVLC log: attachment of directory-extractor failed for http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4
LibVLC log: looking for stream_filter module matching "record": 25 candidates
LibVLC log: using stream_filter module "record"
LibVLC log: looking for stream_directory module matching "any": 1 candidates
LibVLC log: no stream_directory modules matched
LibVLC log: creating demux: access='http' demux='any' location='commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4' file='(null)'
LibVLC log: looking for demux module matching "any": 46 candidates
LibVLC log: dumping root Box "root"
Thread started: #30
LibVLC log: | | | | + minf size 107683 offset 371
LibVLC log: | | | | | + dinf size 36 offset 395
LibVLC log: | | + mvhd size 108 offset 36
LibVLC log: | | + iods size 21 offset 144
LibVLC log: | | + trak size 107889 offset 165
LibVLC log: | | | | + hdlr size 66 offset 305
LibVLC log: | | | + mdia size 107789 offset 265
LibVLC log: | | | | | | + stsz size 102772 offset 594
LibVLC log: | | | | | + smhd size 16 offset 379
LibVLC log: | | | + tkhd size 92 offset 173
LibVLC log: | + ftyp size 28 offset 0
LibVLC log: | + moov size 179627 offset 28
LibVLC log: | | | + mdia size 70745 offset 108154
LibVLC log: | | | | | + stbl size 107623 offset 431
LibVLC log: | | | | | | + dref size 28 offset 403
LibVLC log: | | | | | | + stsd size 91 offset 439
LibVLC log: | | | | | | | + mp4a size 75 offset 455
LibVLC log: | | | | | | + stts size 24 offset 530
LibVLC log: | | | | | | | | + esds size 39 offset 491
LibVLC log: | | | | | | + stsc size 40 offset 554
LibVLC log: resolving commondatastorage.googleapis.com ...
LibVLC log: | | | | + mdhd size 32 offset 273
LibVLC log: | | | | | | + stco size 4688 offset 103366
LibVLC log: | | | | | | | + avc1 size 155 offset 108348
LibVLC log: outgoing request:
GET /gtv-videos-bucket/sample/BigBuckBunny.mp4 HTTP/1.1
Host: commondatastorage.googleapis.com
Accept: */*
Accept-Language: en_US
User-Agent: VLC/3.0.9 LibVLC/3.0.9
If-Match: "cab08b36195edb1a1231d2d09fa450e0"
Range: bytes=158008374-
LibVLC log: | | | | | | + stss size 1080 offset 108527
LibVLC log: | | | | | | + stsc size 7324 offset 109607
LibVLC log: | | | | + mdhd size 32 offset 108162
LibVLC log: | | | | + hdlr size 66 offset 108194
LibVLC log: | | | | + minf size 70639 offset 108260
LibVLC log: | | | | | + vmhd size 20 offset 108268
LibVLC log: | | | | | + dinf size 36 offset 108288
LibVLC log: | | | | | | | + url size 12 offset 108312
LibVLC log: | | | | | | + dref size 28 offset 108296
LibVLC log: | | | | | + stbl size 70575 offset 108324
LibVLC log: | | | | | | + stsd size 171 offset 108332
LibVLC log: | | + trak size 70845 offset 108054
LibVLC log: | | | | | | | | + avcC size 49 offset 108434
LibVLC log: | | | | | | | | + btrt size 20 offset 108483
LibVLC log: | | | | | | + stts size 24 offset 108503
LibVLC log: | | | + tkhd size 92 offset 108062
LibVLC log: | | | | | | | + url size 12 offset 419
LibVLC log: | | | | | | + stsz size 57280 offset 116931
LibVLC log: | | | | | | + stco size 4688 offset 174211
LibVLC log: | | + udta size 756 offset 178899
LibVLC log: | | | | | + gshh size 280 offset 179375
LibVLC log: | | | | | | + data size 272 offset 179383
LibVLC log: | | | | + ilst size 703 offset 178952
LibVLC log: | | | | | + gsst size 25 offset 178960
LibVLC log: | | | | | | + data size 17 offset 178968
LibVLC log: | | | | | | + data size 22 offset 178993
LibVLC log: | | | | | + gstd size 30 offset 178985
LibVLC log: selecting program id=0
LibVLC log: | | | | | | + data size 48 offset 179023
LibVLC log: | | | | | + gspu size 152 offset 179071
LibVLC log: | | | | | | + data size 144 offset 179079
LibVLC log: | | | | | + gspm size 152 offset 179223
LibVLC log: | | | | | | + data size 144 offset 179231
LibVLC log: | | | + meta size 748 offset 178907
LibVLC log: | | | | + hdlr size 33 offset 178919
LibVLC log: | + mdat size 157828719 offset 179655
LibVLC log: track[Id 0x1] read 1168 chunk
LibVLC log: unrecognized major media specification (mp42).
LibVLC log: found 2 tracks
LibVLC log: STTS table of 1 entries
LibVLC log: track[Id 0x1] read 25688 samples length:596s
LibVLC log: | | | | | + gssd size 56 offset 179015
LibVLC log: adding track[Id 0x1] audio (enable) language undef
LibVLC log: STTS table of 1 entries
LibVLC log: track[Id 0x2] read 1168 chunk
LibVLC log: adding track[Id 0x2] video (enable) language undef
LibVLC log: track[Id 0x2] read 14315 samples length:596s
LibVLC log: using demux module "mp4"
LibVLC log: looking for audio decoder module matching "any": 16 candidates
LibVLC log: option quiet does not exist
LibVLC log: using ffmpeg Lavc58.6.103
LibVLC log: CPU flags: 0x000fd3db
LibVLC log: codec (aac) started
LibVLC log: using audio decoder module "avcodec"
LibVLC log: looking for video decoder module matching "any": 12 candidates
LibVLC log: new SPS parsed: 0
LibVLC log: new PPS parsed: 0
LibVLC log: forcing CVPX format: 420v
LibVLC log: vt session error: 'kVTCouldNotFindVideoDecoderErr'
LibVLC log: using ffmpeg Lavc58.6.103
LibVLC log: allowing 6 thread(s) for decoding
LibVLC log: CPU flags: 0x000fd3db
LibVLC log: option quiet does not exist
LibVLC log: codec (h264) started
LibVLC log: using video decoder module "avcodec"
LibVLC log: using frame thread mode with 6 threads
LibVLC log: looking for meta reader module matching "any": 1 candidates
LibVLC log: no meta reader modules matched
LibVLC log: `http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4' successfully opened
LibVLC log: track[Id 0x2] using Sync Sample Box (stss)
LibVLC log: stss gives 0 --> 0 (sample number)
LibVLC log: Buffering 0%
LibVLC log: creating audio output
LibVLC log: looking for audio output module matching "any": 4 candidates
LibVLC log: using audio output module "audiounit_ios"
LibVLC log: option audiounit_ios-gain does not exist
LibVLC log: VLC is looking for: 'f32l' 44100 Hz Stereo frame=1 samples/8 bytes
LibVLC log: Output on Default, channel count: 2
LibVLC log: incoming response:
HTTP/1.1 416 Requested range not satisfiable
X-GUploader-UploadID: ABg5-UzYjwsdBh7HysyzayBbmO1wvnI5S5yx3pLg8jnrdiUvA5rcbryqdrKsZnSe--7-L8ZMwv1tCs5BRYOBiar_22-rN-pvLA
Expires: Mon, 19 Apr 2021 23:14:36 GMT
Date: Mon, 19 Apr 2021 22:14:36 GMT
Cache-Control: public, max-age=3600
Last-Modified: Thu, 05 Dec 2013 18:43:53 GMT
ETag: "cab08b36195edb1a1231d2d09fa450e0"
x-goog-generation: 1386269033518000
x-goog-metageneration: 2
x-goog-stored-content-encoding: identity
x-goog-stored-content-length: 158008374
x-goog-hash: crc32c=x4GOmQ==
x-goog-hash: md5=yrCLNhle2xoSMdLQn6RQ4A==
x-goog-storage-class: STANDARD
Accept-Ranges: bytes
Content-Type: application/xml; charset=UTF-8
Content-Length: 172
Access-Control-Allow-Origin: *
Access-Control-Expose-Headers: origin, range
Server: UploadServer
LibVLC log: resolving commondatastorage.googleapis.com ...
LibVLC log: outgoing request:
GET /gtv-videos-bucket/sample/BigBuckBunny.mp4 HTTP/1.1
Host: commondatastorage.googleapis.com
Accept: */*
Accept-Language: en_US
User-Agent: VLC/3.0.9 LibVLC/3.0.9
If-Match: "cab08b36195edb1a1231d2d09fa450e0"
Range: bytes=188831-
2021-04-20 00:14:36.537460+0200 MediaPlayerElementSample.iOS[47215:12134507] SecTaskLoadEntitlements failed error=22 cs_flags=200, pid=47215
2021-04-20 00:14:36.537742+0200 MediaPlayerElementSample.iOS[47215:12134507] SecTaskCopyDebugDescription: MediaPlayerEleme[47215]/0#-1 LF=0
2021-04-20 00:14:36.556116+0200 MediaPlayerElementSample.iOS[47215:12134388] SecTaskLoadEntitlements failed error=22 cs_flags=200, pid=47215
2021-04-20 00:14:36.556369+0200 MediaPlayerElementSample.iOS[47215:12134388] SecTaskCopyDebugDescription: MediaPlayerEleme[47215]/0#-1 LF=0
LibVLC log: Current device has a latency of 9999 us
LibVLC log: selected 2 physical channels for device output
LibVLC log: VLC will output: Stereo
LibVLC log: not output layout, default to Stereo
LibVLC log: Current AU format: [44100.000000][mcpl][9][8][1][8][2][32]
2021-04-20 00:14:36.709587+0200 MediaPlayerElementSample.iOS[47215:12134641] [aurioc] AURemoteIO.h:323:entry: Unable to join I/O thread to workgroup ((null)): 2
LibVLC log: analog AudioUnit output successfully opened for f32l Stereo
LibVLC log: looking for audio volume module matching "any": 2 candidates
LibVLC log: using audio volume module "float_mixer"
LibVLC log: looking for audio filter module matching "scaletempo": 13 candidates
LibVLC log: output 'f32l' 44100 Hz Stereo frame=1 samples/8 bytes
LibVLC log: input 'f32l' 44100 Hz Stereo frame=1 samples/8 bytes
LibVLC log: format: 44100 rate, 2 nch, 4 bps, fl32
LibVLC log: params: 30 stride, 0.200 overlap, 14 search
LibVLC log: using audio filter module "scaletempo"
LibVLC log: 1.000 scale, 1323.000 stride_in, 1323 stride_out, 1059 standing, 264 overlap, 617 search, 2204 queue, fl32 mode
LibVLC log: conversion pipeline complete
LibVLC log: conversion: 'f32l'->'f32l' 44100 Hz->44100 Hz Stereo->Stereo
LibVLC log: conversion: 'f32l'->'f32l' 44100 Hz->44100 Hz Stereo->Stereo
LibVLC log: conversion pipeline complete
LibVLC log: looking for audio resampler module matching "any": 2 candidates
LibVLC log: using audio resampler module "ugly"
LibVLC log: incoming response:
HTTP/1.1 206 Partial Content
X-GUploader-UploadID: ABg5-Uw9LI52Jgzlnus_904yk-OuPx0d1CS_lvtqipiP00VyjbpiXitiKPQUlTC-AjC83uy9zICKLtJxcfxtak01k_6LY5QeWg
Expires: Mon, 19 Apr 2021 23:14:36 GMT
Date: Mon, 19 Apr 2021 22:14:36 GMT
Cache-Control: public, max-age=3600
Last-Modified: Thu, 05 Dec 2013 18:43:53 GMT
ETag: "cab08b36195edb1a1231d2d09fa450e0"
x-goog-generation: 1386269033518000
x-goog-metageneration: 2
x-goog-stored-content-encoding: identity
x-goog-stored-content-length: 158008374
Content-Type: video/mp4
x-goog-hash: crc32c=x4GOmQ==
x-goog-hash: md5=yrCLNhle2xoSMdLQn6RQ4A==
x-goog-storage-class: STANDARD
Accept-Ranges: bytes
Content-Range: bytes 188831-158008373/158008374
Content-Length: 157819543
Access-Control-Allow-Origin: *
Access-Control-Expose-Headers: origin, range
Server: UploadServer
LibVLC log: available hardware decoder output format 160 (videotoolbox_vld)
LibVLC log: available software decoder output format 0 (yuv420p)
LibVLC log: looking for text renderer module matching "any": 2 candidates
LibVLC log: looking for video converter module matching "any": 15 candidates
LibVLC log: using text renderer module "freetype"
LibVLC log: 32x32 (32x32) chroma: YUVA -> 16x16 (16x16) chroma: RGBA with scaling using Bicubic (good quality)
LibVLC log: Buffering 25%
LibVLC log: looking for video converter module matching "any": 15 candidates
LibVLC log: using video converter module "swscale"
LibVLC log: YUVP to YUVA converter
LibVLC log: using video converter module "yuvp"
LibVLC log: Deinterlacing available
LibVLC log: deinterlace -1, mode auto, is_needed 0
LibVLC log: looking for vout window module matching "any": 0 candidates
LibVLC log: no vout window modules
LibVLC log: looking for vout display module matching "any": 6 candidates
LibVLC log: Opening vout display wrapper
LibVLC log: Buffering 50%
LibVLC log: Buffering 75%
LibVLC log: Buffering 100%
LibVLC log: Stream buffering done (1250 ms in 759 ms)
LibVLC log: VoutDisplayEvent 'resize' 335x500
LibVLC log: VoutDisplayEvent 'resize' 1005x1500
LibVLC log: VoutDisplayEvent 'resize' 1005x1500
LibVLC log: using vout display module "ios"
LibVLC log: original format sz 1280x738, of (0,0), vsz 1280x720, 4cc I420, sar 1:1, msk r0x0 g0x0 b0x0
LibVLC log: removing module "freetype"
LibVLC log: VoutDisplayEvent 'resize' 1005x1500
LibVLC log: looking for text renderer module matching "any": 2 candidates
LibVLC log: VoutDisplayEvent 'resize' 1280x720
LibVLC log: VoutDisplayEvent 'resize' 1005x1500
LibVLC log: using text renderer module "freetype"
LibVLC log: Received first picture
LibVLC log: Decoder wait done in 79 ms
LibVLC log: picture is too late to be displayed (missing 354 ms)
LibVLC log: VoutDisplayEvent 'resize' 1005x1500
LibVLC log: picture is too late to be displayed (missing 312 ms)
LibVLC log: picture is too late to be displayed (missing 189 ms)
LibVLC log: picture is too late to be displayed (missing 230 ms)
LibVLC log: picture is too late to be displayed (missing 272 ms)
LibVLC log: picture is too late to be displayed (missing 148 ms)
LibVLC log: picture is too late to be displayed (missing 91 ms)
LibVLC log: picture is too late to be displayed (missing 49 ms)
LibVLC log: picture might be displayed late (missing 7 ms)
LibVLC log: picture is too late to be displayed (missing 132 ms)
LibVLC log: auto hiding mouse cursor
LibVLC log: removing module "bonjour"
LibVLC log: stopped discovery
LibVLC log: removing module "bonjour"
LibVLC log: stopped discovery
LibVLC log: looking for renderer_discovery module matching "Bonjour_renderer": 2 candidates
LibVLC log: starting discovery
LibVLC log: ftp does not match current discovery mode, skipping
LibVLC log: sftp does not match current discovery mode, skipping
LibVLC log: nfs does not match current discovery mode, skipping
LibVLC log: smb does not match current discovery mode, skipping
LibVLC log: starting discovery for type _googlecast._tcp.
LibVLC log: using renderer_discovery module "bonjour"
LibVLC log: looking for renderer_discovery module matching "Bonjour_renderer": 2 candidates
LibVLC log: starting discovery
LibVLC log: ftp does not match current discovery mode, skipping
LibVLC log: nfs does not match current discovery mode, skipping
LibVLC log: smb does not match current discovery mode, skipping
LibVLC log: sftp does not match current discovery mode, skipping
LibVLC log: starting discovery for type _googlecast._tcp.
LibVLC log: using renderer_discovery module "bonjour"
LibVLC log: VoutDisplayEvent 'resize' 2666x1500
LibVLC log: looking for renderer_discovery module matching "Bonjour_renderer": 2 candidates
LibVLC log: starting discovery
LibVLC log: nfs does not match current discovery mode, skipping
LibVLC log: ftp does not match current discovery mode, skipping
LibVLC log: starting discovery for type _googlecast._tcp.
LibVLC log: sftp does not match current discovery mode, skipping
LibVLC log: smb does not match current discovery mode, skipping
LibVLC log: using renderer_discovery module "bonjour"
LibVLC log: removing module "bonjour"
LibVLC log: stopped discovery
LibVLC log: VoutDisplayEvent 'resize' 2666x1500
LibVLC log: starting discovery
LibVLC log: looking for renderer_discovery module matching "Bonjour_renderer": 2 candidates
LibVLC log: smb does not match current discovery mode, skipping
LibVLC log: sftp does not match current discovery mode, skipping
LibVLC log: using renderer_discovery module "bonjour"
LibVLC log: ftp does not match current discovery mode, skipping
LibVLC log: starting discovery for type _googlecast._tcp.
LibVLC log: nfs does not match current discovery mode, skipping
LibVLC log: removing module "bonjour"
LibVLC log: stopped discovery
LibVLC log: pausing
LibVLC log: toggling resume
LibVLC log: toggling resume
LibVLC log: resuming
LibVLC log: toggling pause
LibVLC log: toggling pause
LibVLC log: pausing
LibVLC log: toggling resume
LibVLC log: toggling resume
Environment
- OS: ios and android
- Version android 10, ios 14
- Device: all common android and ios devices
- LibVLCSharp version: LibVLCSharp.Forms 3.5.0