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

WebTorrent does not play back some MP4 files #685

Closed
Wasser-Eis opened this issue Mar 21, 2016 · 7 comments
Closed

WebTorrent does not play back some MP4 files #685

Wasser-Eis opened this issue Mar 21, 2016 · 7 comments

Comments

@Wasser-Eis
Copy link

@Wasser-Eis Wasser-Eis commented Mar 21, 2016

  • WebTorrent version: 0.86.1
  • Node.js version: -
  • Browser name/version (if using WebTorrent in the browser): Chrome 49.0.2623.87 m

The quick example of the WebTorrent Documentation on webtorrent.io does not work with some .mp4 files. I have tried it with three different mp4 files. I always got an "Uncaught Error: Unsupported file type "": Cannot append to DOM" error.
For example the following mp4 file does not get played back:
http://peach.themazzone.com/durian/movies/sintel-2048-surround.mp4
My desktop VLC player can play this mp4 file back without problems.
Please explain.

Additionally:
Where can I download a mp4 file that definitively works with WebTorrent?

@rom1504

This comment has been minimized.

Copy link
Member

@rom1504 rom1504 commented Mar 21, 2016

have a look at #405

@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Mar 28, 2016

@Wasser-Eis This mp4 file definitely works: https://webtorrent.io/torrents/sintel-1024-surround.mp4

But the file that you linked to also should work. If I download it, then drop it onto https://instant.io it works just fine. The error message you're getting is weird because it normally shows up for file extension types that cannot be added to the DOM, for example ".exe" or ".avi". But it's an empty string for you.

Are you adding the sintel-2048-surround.mp4 file directly? Or adding a .torrent file?

@Wasser-Eis

This comment has been minimized.

Copy link
Author

@Wasser-Eis Wasser-Eis commented Mar 31, 2016

It also does not work with your posted mp4 file.
These are the most relevant parts of my code:

document.getElementById('fileinput').addEventListener('change', function(){
file2 = this.files[0];
}, false);

client.seed(file2, {name: "Test42"}, function(torrent){});

client.add(magnetURI, function(torrent){
file = torrent.files[0];
file.appendTo('body', function (err, elem) {
if (err) throw err // file failed to download or display in the DOM
});
}

"Are you adding the sintel-2048-surround.mp4 file directly? Or adding a .torrent file?"
I added it directly.

@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Apr 1, 2016

@Wasser-Eis Both adding the video directly or the .torrent file should work.

What browser are you using?

@Wasser-Eis

This comment has been minimized.

Copy link
Author

@Wasser-Eis Wasser-Eis commented Apr 1, 2016

I use Google Chrome in the most current version.

@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Apr 2, 2016

I don't know what to tell you – there's clearly a mistake somewhere in your code. If you send a link to your full code, I can take a quick look.

I recommend using the Instant.io code as a guide.

@feross feross closed this Apr 2, 2016
@lock

This comment has been minimized.

Copy link

@lock lock bot commented May 4, 2018

This thread has been automatically locked because it has not had recent activity. To discuss futher, please open a new issue.

@lock lock bot locked as resolved and limited conversation to collaborators May 4, 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
3 participants
You can’t perform that action at this time.