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

Short videos don't get uploaded properly #6

Open
ijameelkhan opened this issue Nov 4, 2014 · 8 comments
Open

Short videos don't get uploaded properly #6

ijameelkhan opened this issue Nov 4, 2014 · 8 comments

Comments

@ijameelkhan
Copy link
Contributor

HI ,

I am using the test app and when i start broadcasting , i get the link and it shows up on live kickflip.io page , like https://kickflip.io/56425291-a8b8-4943-88b6-24175e577ba4/ , but it never plays , nor it plays in the app self on other device running parallel , am i missing something ?

@ijameelkhan
Copy link
Contributor Author

anything here ?

@chrisballinger
Copy link
Member

What hardware and OS version are you using?

@ijameelkhan
Copy link
Contributor Author

I am using iPad Air 2 , with iOS 8.1.

On 20-Nov-2014, at 11:55 pm, Chris Ballinger [email protected] wrote:

What hardware and OS version are you using?


Reply to this email directly or view it on GitHub #6 (comment).

@rsippl
Copy link

rsippl commented Nov 25, 2014

The stream doesn't play because .ts files the .m3u8 manifest is pointing to are missing.

To debug this, set a breakpoint in KFHLSUploader.m, method request:didCompleteWithResponse:, more precisely, where you get back the URL of an uploaded .ts (in commit e71287b, this is at line 310, search for "didUploadSegmentAtURL"). If you record a short video, you'll never reach this part of code.

I believe the reason is a race condition between the methods uploadNextSegment and finishedRecording. uploadNextSegment checks for self.isFinishedRecording, which is set in finishedRecording. Unfortunately, finishedRecording is called after uploadNextSegment. For a short video, you'll get "Skipping upload of ts file currently being recorded" in the console and no .ts file will be uploaded.

@rsippl
Copy link

rsippl commented Nov 25, 2014

Adding a
[self uploadNextSegment];
to finishedRecording, after isFinishedRecording is set, seems to fix the issue (this is a quick hack!).

@ijameelkhan
Copy link
Contributor Author

You can submit a pull request ?

On 25-Nov-2014, at 7:15 pm, rsippl [email protected] wrote:

Adding a
[self uploadNextSegment];
to finishedRecording, after isFinishedRecording is set, seems to fix the issue (this is a quick hack!).


Reply to this email directly or view it on GitHub #6 (comment).

@rsippl
Copy link

rsippl commented Nov 25, 2014

Best if Chris takes a look instead, not sure if my hack is a proper fix.

@chrisballinger
Copy link
Member

@rsippl Thank you for your investigation! We never tested KF with very short videos because it was designed for longer live broadcasts. This is indeed a bug, but for sending short videos it would maybe make more sense to just send a full .mp4 file anyway. I'm curious, what kind of application are you considering for Kickflip? (feel free to email directly btw)

@chrisballinger chrisballinger changed the title Stream not playable Short videos don't get uploaded properly Dec 16, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants