Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Large videos larger than 10 minutes will error and will require a network to play #17

Closed
nxnam opened this issue Aug 5, 2020 · 22 comments · Fixed by #18 or #21
Closed

Large videos larger than 10 minutes will error and will require a network to play #17

nxnam opened this issue Aug 5, 2020 · 22 comments · Fixed by #18 or #21
Assignees
Labels
bug Something isn't working

Comments

@nxnam
Copy link

nxnam commented Aug 5, 2020

I have problems like this. Hope you help

@Cyklet
Copy link
Owner

Cyklet commented Aug 5, 2020

Hi @nxnam can you provide a link that is failing, so I will be able to check what is happening, it can be other bug, I have already downloaded wwdc videos bigger then 10 min

@Cyklet Cyklet self-assigned this Aug 5, 2020
@Cyklet Cyklet added the bug Something isn't working label Aug 5, 2020
@nxnam
Copy link
Author

nxnam commented Aug 5, 2020

After downloading -> Turn off the network -> Play video -> The video will be repeated a bit and then continue to play. But it is also not possible to play the entire video

@Cyklet
Copy link
Owner

Cyklet commented Aug 5, 2020

I will take a look, btw I can't open the first link, I will use the second one and I will try to reproduce the bug with steps that you have described

@nxnam
Copy link
Author

nxnam commented Aug 5, 2020

video I recorded when an error occurred :

https://drive.google.com/file/d/1LshpWLRwJLzpDLryOil99nAvhfFJkLLq/view?usp=sharing

@Cyklet
Copy link
Owner

Cyklet commented Aug 5, 2020

Hi @nxnam the links expired and I wasn't able to reproduce the bug yet (links worked in video loader example with/without internet connection), can you generate them one more time?
In your video looks like that chunks were corrupted (the video starts from the beginning but time is not resetting), I am trying to understand was it on framework side/AVFoundation side or maybe it was because of internet connection

@Cyklet
Copy link
Owner

Cyklet commented Aug 5, 2020

Video requires a network to play - is this issue reproducible each time for all videos when playing without an internet connection?

@nxnam
Copy link
Author

nxnam commented Aug 6, 2020

all videos about 10 minutes long are affected. Short videos are not. When the network is turned on, it plays completely normally.

@Cyklet
Copy link
Owner

Cyklet commented Aug 6, 2020

Can you paste the code where you prepare AVPlayer to play? (configuration and url/asset setup)
Without internet connection did u try to exit the application and enter again and play short videos? Are these videos still playable?

@nxnam
Copy link
Author

nxnam commented Aug 6, 2020

right. Short videos play back normally. A long video only plays 600 seconds and will need network to be able to continue. Otherwise it will stop and cannot be played. I have tried playing with an unencrypted video and played for a long time without having the same problem.

@Cyklet
Copy link
Owner

Cyklet commented Aug 6, 2020

I have downloaded video from yours links through VidLoaderExample that is in this framework and it is playable entirely without internet connection, are you using asset(location: URL) -> AVURLAsset? function to feed AVPlayer with asset?
https://github.com/Cyklet/VidLoader/blob/master/VidLoaderExample/VidLoaderExample/VideoList/VideoListController.swift -> line 48
AVURLAsset in this function is coming from framework, each time when player requests encryption key in the offline mode, asset will take care to provide this key to him

@nxnam
Copy link
Author

nxnam commented Aug 6, 2020

How can I contact separately? Some information I'm not comfortable sharing here.

@Cyklet
Copy link
Owner

Cyklet commented Aug 6, 2020

messenger -> m.me/petre.plotnic skype -> plotnic_petrea

@nxnam
Copy link
Author

nxnam commented Aug 6, 2020

I use VidLoaderExample and got the same error.
https://drive.google.com/file/d/10FhNwXQZDtDwLv6rH0APjBaBJDlJRVPY/view?usp=sharing

@Cyklet
Copy link
Owner

Cyklet commented Aug 6, 2020

Strange :( I will try one more time, If I will be able to reproduce will be very easy to understand what is going on. Shouldn't be any differences with/without internet connection, if video is downloaded it will play from the same file with the same chunks and with the same key with/without internet connection, this behaviour is really strange.

@Cyklet
Copy link
Owner

Cyklet commented Aug 6, 2020

I have tried with all bandwidths from your links and all looks good, can you please write here what iOS version you are using and what devices

@nxnam
Copy link
Author

nxnam commented Aug 6, 2020

I tested on iphone 6s and 11 pro max and they all use OS 13.5

and it seems that I let the video download quality be the highest. maybe about 2700000 bitrate

@Cyklet
Copy link
Owner

Cyklet commented Aug 7, 2020

No luck to reproduce it on my side, I even tried the biggest bitrate with the package lost from settings developer console and same output everything works in offline, I will try more times this evening hope that I will be able to reproduce, btw video that you have sent is not bigger then 10 min maybe that's why I can't reproduce?
P.S From your videos looks like several seconds of the video(chunks) haven't been downloaded so what is happening is player uses previous chunks and that's why it's replaying the same visual output, the problem can be packages lost from AVFoundation I will check it more times with different setup for wifi

@nxnam
Copy link
Author

nxnam commented Aug 7, 2020

Last week, you have free time? I want to talk to you via skype. So I think it would be better.

@Cyklet
Copy link
Owner

Cyklet commented Aug 10, 2020

Yes, send a request in the skype and we will discuss when is the best date to have a conversation

@Cyklet
Copy link
Owner

Cyklet commented Aug 11, 2020

@nxnam I have updated the framework to 1.0.3, I hope bug was fixed

@Cyklet Cyklet reopened this Aug 20, 2020
@Cyklet
Copy link
Owner

Cyklet commented Aug 20, 2020

@nxnam I have released 1.0.4 version where the encryption key is loaded after a delay, thank you again for pointing out how to fix the bug 💪

@Cyklet Cyklet closed this as completed Sep 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants