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

File smaller than 100MB doesn't autoplay/stream #1098

Closed
staltz opened this issue Apr 10, 2017 · 3 comments
Closed

File smaller than 100MB doesn't autoplay/stream #1098

staltz opened this issue Apr 10, 2017 · 3 comments

Comments

@staltz
Copy link

@staltz staltz commented Apr 10, 2017

What version of WebTorrent?

Whatever version is running in Instant.io. But I first experienced this with webtorrent-hybrid seeding the file.

What operating system and Node.js version?

macOS Sierra 10.12.4, in the browser

What browser and version? (if using WebTorrent in the browser)

Google Chrome 57.0.2987.133

What did you expect to happen?

Seed a file from instant.io smaller than 100MB. For instance this one https://instant.io/#f9ab2edf3187fe62758f20603179ab90007d211e is 91MB (90788515 bytes). Expect to see that video autoplay when opened from another tab.

What actually happened?

Does not autoplay while streaming. It waits until it downloads 100%, then plays.


I suspect this happens due to some export config of my MP4, but not sure what are the settings that WebTorrent appreciates.

@DiegoRBaquero

This comment has been minimized.

Copy link
Member

@DiegoRBaquero DiegoRBaquero commented Apr 10, 2017

Does it auto play when it has finished downloading it?

@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Apr 13, 2017

I don't think the file size is relevant. In order to stream MP4s, they must be fragmented and the videostream package must support streaming them. So if you're having an issue, I suspect it's due to the MP4 not being fragmented, or a bug/missing feature in videostream.

If you already have an MP4, but it's not properly fragmented, you can again use ffmpeg:

ffmpeg -i non_fragmented.mp4 -movflags frag_keyframe+empty_moov fragmented.mp4

More info: https://developer.mozilla.org/en-US/docs/Web/API/Media_Source_Extensions_API/Transcoding_assets_for_MSE

Also, @jhiesey might have more thoughts on how best to export your files.

@feross feross closed this Apr 13, 2017
@F-loat

This comment has been minimized.

Copy link

@F-loat F-loat commented Sep 21, 2017

Hi, I have some doubts with this paramfrag_keyframe+empty_moov, I know this param will generate a file that fragmented but the fragmented file only play when it has finished downloading.

ffmpeg -i non_fragmented.mp4 -movflags frag_keyframe+empty_moov fragmented.mp4

And this below work fine.

ffmpeg -i non_fragmented.mp4 -movflags faststart fragmented.mp4

Should I do something extra with fragmented.mp4?

@lock lock bot locked as resolved and limited conversation to collaborators May 9, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.