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

General_playback_error #12

Open
chrisboer opened this issue Mar 24, 2017 · 15 comments
Open

General_playback_error #12

chrisboer opened this issue Mar 24, 2017 · 15 comments

Comments

@chrisboer
Copy link

chrisboer commented Mar 24, 2017

b7ebd414-0f3f-11e7-920b-25c4faa49b0e

https://github.com/athombv/homey/issues/1393

@TheMSB
Copy link
Contributor

TheMSB commented Mar 24, 2017

@matjaz If it helps here is a track that will reproduce the error without fail:

Search for 'naturally'

{ track_id: 'rMcKvp_Glb8',
  title: 'Animal Adventure Park Giraffe Cam',
  artist: [ { name: 'Animal Adventure Park', type: 'artist' } ],
  album: false,
  duration: false,
  artwork: 
   { small: 'https://i.ytimg.com/vi/rMcKvp_Glb8/default_live.jpg',
     medium: 'https://i.ytimg.com/vi/rMcKvp_Glb8/mqdefault_live.jpg',
     large: 'https://i.ytimg.com/vi/rMcKvp_Glb8/hqdefault_live.jpg' },
  genre: false,
  release_date: false,
  bitrate: false,
  codecs: [ 'homey:codec:mp3' ],
  bpm: false,
  options: false,
  player_uri: 'homey:app:com.youtube',
  app_icon: '/app/com.youtube/assets/icon.svg',
  playCount: 0,
  skipCount: 0,
  lastPlayed: false,
  lastSkipped: false,
  regCount: 0 }

The Youtube app returns an error when Homey asks for a stream_url:
{ [Error: Unexpected token R] message: 'Unexpected token R' } undefined

@matjaz
Copy link
Owner

matjaz commented Mar 25, 2017

@MarvinSchenkel can you please take a look?

@MarvinSchenkel
Copy link

Looks like you have to setup your own api key. Go to settings to register one. I am looking into implementing logging in to YouTube so we won't encounter this error anymore

@chrisboer
Copy link
Author

chrisboer commented Mar 26, 2017

@MarvinSchenkel I have a own api key so with this link it works with https://www.youtube.com/watch?v=f4Mc-NYPHaQ&ytbChannel=Queen%20Official

but it does not work with the first one if you type in queen in the search of "Muziek" and try to play it you get generic_playback_issue which is this one
https://www.youtube.com/watch?v=_Uu12zY01ts&ytbChannel=Queen%20Official

@MarvinSchenkel
Copy link

@chrisboer Hm, starting to look like it has to do with long videos (> 1h). Can you confirm you get the error with relative long videos?

@MarvinSchenkel
Copy link

Yeah figured it out. It has to do with the youtube>mp3 library we use to create the stream url. I get the following error if I manually try to convery the video on their website:

There was an Error caused by YouTube, we cannot deliver this Video!
This error is mostly caused by copyright issues or the length of the video.
We only support videos with maximum of 20 minutes.

@matjaz Any idea for a better youtube>mp3 converter?

@chrisboer
Copy link
Author

chrisboer commented Mar 26, 2017

Yes with long videos but also with commercial video's (short) like if you want to play "naturally" from the artist Ronde you also get a generic_playback_error
https://www.youtube.com/watch?v=WMaq2-w5EAw

@matjaz
Copy link
Owner

matjaz commented Mar 26, 2017

This one looks good http://www.youtubeinmp3.com/api/

@MarvinSchenkel
Copy link

MarvinSchenkel commented Mar 27, 2017

@matjaz Implemented this one. Looks like this one has a 120 minutes limit, should be alright for most videos. I have look for other ones, but could not find one that converts videos that are longer than 120 minutes. Looks like Homey does not pick up any errors thrown by the app, but it always displays 'generic_playback_error'.

@TheMSB
Copy link
Contributor

TheMSB commented Mar 27, 2017

@MarvinSchenkel A user friendly approach would be to filter any tracks that exceed this limit when responding to media search queries.

@MarvinSchenkel
Copy link

@TheMSB Thanks, really good idea. Fixed it and implemented the filter. The duration is now also shown in the search results :). Will be committed as part of the next release. I am still working on the login so I can fetch personal playlists.

@matjaz
Copy link
Owner

matjaz commented Mar 27, 2017

filter is necessary only for local mp3 playback (requiring converting service). chromecast and others which stream video directly can handle longer videos.

@TheMSB
Copy link
Contributor

TheMSB commented Mar 27, 2017

filter is necessary only for local mp3 playback (requiring converting service). chromecast and others which stream video directly can handle longer videos.

Exactly, it would make sense to implement this filter only when responding to search/play requests made by Homey media.

@MarvinSchenkel
Copy link

Of course I only applied the filter for homey media playback ;)

@matjaz
Copy link
Owner

matjaz commented Apr 17, 2017

version ff345b7 should fix this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants