Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upAutomatic codec detection #222
Comments
This comment has been minimized.
This comment has been minimized.
|
WebTorrent is making an assumption about the codec used. You can see this auto-detection code here: https://github.com/feross/webtorrent/blob/master/lib/file-stream.js#L106 In the coming months, @jhiesey is going to implement automatic codec detection so lots more .mp4 files should work. |
This comment has been minimized.
This comment has been minimized.
|
Related issue: webtorrent/instant.io#10 (Repackage video files on the fly to support streaming to tag) |
This comment has been minimized.
This comment has been minimized.
|
If anyone finds it helpful, this is how I encoded the mp4 files before converting them to MPEG-DASH. Set the bitrate to what you want depending on the video resolution, or you can use -crf 18 (visually lossless) instead of -b:v 8000k. ./ffmpeg -i video.mp4 -c:v h264 -preset slow -c:a aac -strict -2 -b:v 8000k -b:a 384k fcvideos/yosemite.mp4 |
This comment has been minimized.
This comment has been minimized.
|
@jakefb Thanks for sharing the command. |
This comment has been minimized.
This comment has been minimized.
|
Good news! @jhiesey has gotten automatic MP4 repackaging working! He's published it as a module: It's currently being used on https://instant.io, which you'll be able to test when I get the site working again (sorry, broke it then went on a three-day sailing adventure with @dominictarr). Will try to get https://instant.io working again sometime today so you all can test it out! |
This comment has been minimized.
This comment has been minimized.
|
https://instant.io is working again. |
This comment has been minimized.
This comment has been minimized.
|
Automatic MP4 and M4A repackaging for playback in the Take a look at https://instant.io to see it in action, and the source code is here. |
Hi, I'm having a few issues streaming video in the browser with WebTorrent.
I encoded a MP4 video to MPEG-Dash with the command: MP4Box -dash 5000 -frag 5000 -rap video.mp4. I uploaded the video_dashinit.mp4 file to instant.io in Chrome. The torrent was created and an HTML5 element appeared, but the video doesn't buffer.
It would be great to have a wiki page with instructions for streaming video with WebTorrent in the browser, as well as how to seed the video while it buffers if it's possible.