popcorn-official / popcorn-desktop

Popcorn Time is a multi-platform, free software BitTorrent client that includes an integrated media player ( Windows / Mac / Linux ) A Butter-Project Fork
https://popcorn-time.site
Other
9.46k stars 625 forks source link

chromecast doesn't work most of the times #1296

Closed 081099 closed 3 years ago

081099 commented 4 years ago

Operating System Version:

OS X 10.15.2 Popcorn Time Version:

0.4.3 Download date:

11.11.2016

Expected Behaviour

...Connect to my chromecast

Actual Behaviour

...it connects and then it crashes

Steps to reproduce the behaviour

  1. Open any movie
  2. Instead of playing it on popcorn time, play it on chromecast
  3. it will connect for a few seconds and then it will crash
gabrielgradinaru commented 4 years ago

Try 720p instead of 1080p.

marcprovencher commented 4 years ago

I'm having the same problem irrespective of what version (480, 720, 1080) I try to play. The following error shows in the console log:

app.js:36 [ERROR] chromecast.play error: Error: Load failed at chrome-extension://hecfofbbdfadifpemejbbdcjmfmboohj/Applications/Popcorn-Time.app/Contents/Resources/app.nw/node_modules/castv2-client/lib/controllers/media.js:75 at fn.onmessage (chrome-extension://hecfofbbdfadifpemejbbdcjmfmboohj/Applications/Popcorn-Time.app/Contents/Resources/app.nw/node_modules/castv2-client/lib/controllers/request-response.js:27) at fn.emit (events.js:328) at Channel.onmessage (chrome-extension://hecfofbbdfadifpemejbbdcjmfmboohj/Applications/Popcorn-Time.app/Contents/Resources/app.nw/node_modules/castv2-client/lib/controllers/controller.js:16) at Channel.emit (events.js:316) at Client.onmessage (chrome-extension://hecfofbbdfadifpemejbbdcjmfmboohj/Applications/Popcorn-Time.app/Contents/Resources/app.nw/node_modules/castv2/lib/channel.js:23) at Client.emit (events.js:328) at PacketStreamWrapper.onpacket (chrome-extension://hecfofbbdfadifpemejbbdcjmfmboohj/Applications/Popcorn-Time.app/Contents/Resources/app.nw/node_modules/castv2/lib/client.js:81) at PacketStreamWrapper.emit (events.js:316) at TLSSocket. (chrome-extension://hecfofbbdfadifpemejbbdcjmfmboohj/Applications/Popcorn-Time.app/Contents/Resources/app.nw/nodemodules/castv2/lib/packet-stream-wrapper.js:28) at TLSSocket.emit (events.js:316) at emitReadable (_stream_readable.js:558) at processTicksAndRejections (internal/process/task_queues.js:83)

Edward-Bakker commented 4 years ago

Can confirm, neither 720p or 1080p works. Got the latest chromecast v3, it shows the controls and all. Just doesn't connect as nothing changes on the tv.

081099 commented 4 years ago

Sometimes it works on 720p, but not always. Instead, 1080p never works

dno89 commented 4 years ago

Same problem on Linux latest release.

Persei08 commented 4 years ago

Doesn't this still happen ? If yes what do you mean by it crash, Does PCT crash exit, or the chromecast stream ?

Any console log (F12 or Cmd+0 > 'Console' tab) ?

Can you also provides the titles with which you enconter this issue ?.. and eventually open the video file with mediainfo to tell us with which video and audio codec the video file was encoded ?

Thx

Persei08 commented 3 years ago

Re-reading it, and I think it's related to video encoding codec not supported by chromecast and which is different and depending of the quality, episodes and releases.

There is not specific code in popcorntime to detect chromecast supported codecs or video encoding codecs.

Will really help to have a little list of content which have this issue.

Persei08 commented 3 years ago

@everyone. can you eventually please provide content titles or episodes numbers ? Because I have some difficulties to find incompatible ones without testing dozens.

at the moment I found 'Trolls World Tour' in 1080p, but I need few others.

Thx

gabrielgradinaru commented 3 years ago

@Persei08. Some examples of incompatible movies in 1080p:

The actual issue does not seem to be the video, but the 6 channel audio of the mp4 files. I don't think there is something that popcorn-time can do to actually fix this.

Possible solutions that I see:

Persei08 commented 3 years ago

@gabrielgradinaru thx for the examples they all fail with my chromecast gen2 but not the mi box 3 chromecast feature, so it's good for test

The thing is it really rely on the chromecast device itself and which format and codecs it support. There is a way to request if a chromecast device support some format but i'm not sure if it's in chromecast-api module... Could have being way better if the chromecast itself could just respond "Can't read, incompatible format"

Actually with current dev branch, PCT start to cast the video but then if it don't works, it stop casting and go back to movie detail page.

So I was thinking an easy thing to do could be to just display an informative message so users can have an idea.

But for detecting the audio/video encoding and knowing if the chromecast device support it, I'm not sure. need to dig into a bit more.

Thx

Persei08 commented 3 years ago

So, for now I've added (PR #1800) a notification warning when device reply with error

Will look like this

Peek 2020-11-09 02-13

So, it should put some order and split the users between the ones having issue because the chromecast dont support the video format/codecs and the users with other issues.

There is no plan to transcode the videos on the fly to make them playable by all devices. VLC do that if necessary.

I invites all of you to try the dev build 441 and see if your device trigger the warning or if something else happens

gabrielgradinaru commented 3 years ago

I can confirm I receive the warning from the gif.

Persei08 commented 3 years ago

seem this notif was enough. :)