5 ms·
Looks nice! I've been using https://github.com/googlecast/CastHelloVideo-chrome https://github.com/googlecast/CastHelloVideo-chrome plus some custom Java code t
by mumrah 12y ago
Looks nice! I've been using https://github.com/googlecast/CastHelloVideo-chrome https://github.com/googlecast/CastHelloVideo-chrome plus some custom Java code to stream video content for a few months now. I'd love to have something like this as a UI instead of my cobbled mess. Drop me a PM or email @gmail if you want to compare notes. Cheers!
- fomojola 12y agoThanks. Will reach out once I get a chance: the video transcoding/streaming will be the real heavy lifting. This was mostly just a node-webkit exercise, but not sure how cleanly it will merge with the Chrome code you linked to.
- thefreeman 12y agoThe transcoding isn't actually too bad. You basically just need ffmpeg compiled from source on your box, and you can use https://github.com/fluent-ffmpeg/node-fluent-ffmpeg https://github.com/fluent-ffmpeg/node-fluent-ffmpeg . You just need to transcode everything go h264 / AAC (so make sure you compile with libfdk_aac ). The thing I have been unable to figure out so far is how to start streaming to chromecast before the transcoding is complete. It will play to the point it was transcoded when I started playing, regardless of how far it has gotten since then. I have tried transcoding to HLS which chromecast supports, but have not been able to figure it out. Are you planning on develping this open source? I didn't see a github for the actual project on first glance.
- fomojola 12y agoThanks for the transcoding tips: will look into that. Wasn't actually thinking about github for this: if I develop a lot of free time I might tidy it up for public consumption, but by default its not particularly well commented or documented.
- maherbeg 12y agoYou can actually stream the file directly to the chromecast as it's transcoding. I've got this working in my own chromecast app mkvcast: https://github.com/maherbeg/mkvcast https://github.com/maherbeg/mkvcast See https://github.com/maherbeg/mkvcast/blob/master/lib/controllers/stream-file.js https://github.com/maherbeg/mkvcast/blob/master/lib/controll... for the parameters to use.
- mumrah 12y agoI got something similar working in Java by simply exec'ing ffmpeg and getting a handle on the stream. Not being able to seek kind of sucks, and Chromecast does not like infinite streams. However, I've seen that he Chromecast will actually stream some MKVs just fine (so long as the underlying codecs are supported).
- thefreeman 12y agoThanks for the reference! This looks like just what I need.
- mumrah 12y agoIt's a better experience when you're dealing with a complete file and not an in-progress transcode anyways. With a file you can seek and pause/resume. That's much, much harder with a stream (if at all possible). The other trick is that the Chromecast does some poking around in the stream to figure out the total time. This requires that you support Range requests and return correct Content-Length headers.
- thefreeman 12y agoThanks for the tips. I will look into the headers and see if I can't implement the range quests and content-length headers correctly, it doesn't seem like it should be that difficult.