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

Speed up video upload times #15

Open
adamsoffer opened this issue Nov 5, 2020 · 13 comments
Open

Speed up video upload times #15

adamsoffer opened this issue Nov 5, 2020 · 13 comments

Comments

@adamsoffer
Copy link
Contributor

As reported by user @geebotron a video only 6.5MB in size takes 2-3 mins to upload. As a user, file upload times should be on par with other video hosting solutions such as https://streamable.com and https://stream.new.

@adamsoffer
Copy link
Contributor Author

@rajdeepbharati any idea what's causing the slow upload time? Is the culprit therb-resumablejs package we're using?

@geebotron
Copy link

The upload stage seems to progress at a reasonable lick. The percentage completion readout progresses responsively.
It's always the "finishing up" stage that takes time.

(Or at least - that's how it appears to the front-end user.)

@rajgoesout
Copy link
Collaborator

Looking into it.

@rajgoesout
Copy link
Collaborator

rajgoesout commented Nov 5, 2020

I just changed the server region, the upload/processing has become fast at my end now. Could you try it out too?

@geebotron Actually in the "finishing up" stage, the video is being transcoded in the livepeer network, so it might take some time (though it shouldn't take 2 minutes).

@adamsoffer You can keep this issue open for now

@geebotron
Copy link

OK - when I successfully used firefox to upload the 6.5MB vid, I was on a Windows laptop.
Now I'm using a linux desktop, again firefox - and it's hanging at the "finishing up" stage again.
The vid clip is slightly larger - 14 MB.

I opened up the network debugging tools in FF to observe the network interactions on both machines.

On the Windows machine, I noticed a domain: demux.onrender.com This domain seemed to be used in both cases ... BUT ... There was a subdomain of onrender.com that appeared when the successful upload occurred ... something about revproxy ... which NEVER has appeared in the network transactions list when using the hung instance on FF on the Linux machine.

@rajgoesout
Copy link
Collaborator

rajgoesout commented Nov 5, 2020

and it's hanging at the "finishing up" stage again

Could you give an estimate of the time it is taking in "uploading x%" and "finishing up" stages, and whether it is still stuck?

@geebotron
Copy link

Uploading took under a min. Still stuck at "finishing up" now after 15+ mins.

@rajgoesout
Copy link
Collaborator

rajgoesout commented Nov 5, 2020

@geebotron could you share the file that you uploaded (the one which got stuck)?

@geebotron
Copy link

Ah. Sorry I have deleted it that specific file. It was just a minute long clip generated with FFMPEG from a longer movie file.

@rajgoesout
Copy link
Collaborator

It looks like there's some issue transcoding that file. Can you create another clip (using ffmpeg) from that movie file and share?

@geebotron
Copy link

The MP4 files I have used so far have been snippets of longer files recorded off British free-to-air TV. When I get chance I'll create a selection of new snippets of different lengths file sizes and use HD and SD etc.
Might be the weekend before I get time.

@geebotron
Copy link

Here are three video clips that I used to test the upload.

  • test 1A didn't work - and hung at the "finishing up" stage. The codec is the same as it was broadcast (mp4v, DivX?)
  • test 2 worked - it is an HD TV broadcast using the H264 codec, and required no conversion.
  • test 1B worked This is test 1A converted using FFMPEG to H264 video and AAC audio. The aspect ratio is wrong on the playback on file.video though. If you play the video input file that was uploaded in your browser, the aspect ratio is correct.

These are the switches I used to convert test 1A to test 1B:

-vcodec libx264
-aspect 16:9
-acodec aac 

I think the reason for the hang-ups I noticed before, were due to the codec of the video clips I attempted to upload being the same default codec that was broadcast via UK SD TV - mp4v.

So it seems file.video likes MP4 video, but specifically h264 encoded MP4 video!

Hope this helps.

@rajgoesout
Copy link
Collaborator

Yes, you're right. It currently just supports h264 encoded mp4. We should return a failure in this case. Thanks for reporting the issue.

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