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

'ascii' codec can't decode byte 0xef in position 86: ordinal not in range(128) #440

Closed
fromMars opened this issue Jul 11, 2014 · 3 comments

Comments

@fromMars
Copy link

I use built-in streaming protocols directly to fetch videos, here is my command:

C:\Users\MB>livestreamer hds://http://resource.ws.kukuplay.com/players/2014/07/0
4/60129/fengyun.swf?cid=gtv best
[cli][info] Found matching plugin stream for URL hds://http://resource.ws.kukupl
ay.com/players/2014/07/04/60129/fengyun.swf?cid=gtv
Traceback (most recent call last):
  File "C:\Python27\Scripts\livestreamer-script.py", line 9, in <module>
    load_entry_point('livestreamer==1.8.2', 'console_scripts', 'livestreamer')()

  File "C:\Python27\lib\site-packages\livestreamer-1.8.2-py2.7.egg\livestreamer_
cli\main.py", line 823, in main
    handle_url()
  File "C:\Python27\lib\site-packages\livestreamer-1.8.2-py2.7.egg\livestreamer_
cli\main.py", line 469, in handle_url
    console.exit(u"{0}", err)
  File "C:\Python27\lib\site-packages\livestreamer-1.8.2-py2.7.egg\livestreamer_
cli\console.py", line 73, in exit
    formatted = msg.format(*args, **kwargs)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xef in position 86: ordinal
 not in range(128)

If I copy "http://resource.ws.kukuplay.com/players/2014/07/04/60129/fengyun.swf?cid=gtv" and paste it into web browser, the browser can play video successfully.
I use python2.7.7 32bit on 64bit windows8.1, please help.

@vadmium
Copy link

vadmium commented Jul 11, 2014

I suspect the HDS URL that you are passing might not be right; it looks like a SWF file. Normally a HDS URL should point to a “manifest.f4m” file I think. On top of that, it looks like Livestreamer is having trouble reporting a sensible error.

@fromMars
Copy link
Author

Thanks for your quick reply!
I also tried "httpstream://" protocol like this:

livestreamer httpstream://http://resource.ws.kukuplay.com/players/2014/07/04/60129/fengyun.swf?cid=gtv best

and this time no error occurred, but the stream ended in no time(I tried it on Ubuntu12.04LTS this time, it works just like on Windows):

zmb@polo-ubt:~$ livestreamer httpstream://http://resource.ws.kukuplay.com/players/2014/07/04/60129/fengyun.swf?cid=gtv best
[cli][info] Found matching plugin stream for URL httpstream://http://resource.ws.kukuplay.com/players/2014/07/04/60129/fengyun.swf?cid=gtv
[cli][info] Available streams: live (worst, best)
[cli][info] Opening stream: live (http)
[cli][info] Starting player: /usr/bin/vlc
[cli][info] Stream ended

SO, how can I handle a stream from a SWF file, or maybe I need to create a plugin for my own? I have tried to understand the plugin syntax, but failed with my little mind.

@chrippa
Copy link
Owner

chrippa commented Jul 12, 2014

You won't be able to play the SWF in livestreamer. You can usually use wireshark to sniff your network traffic to figure out the actual stream used and if it's supported by livestreamer, play it.

In this case though, it looks like this player is using it's own streaming protocol which we do not support. So you would have to analyze the traffic to figure out how it works exactly and then write an implementation in a plugin.

cheah pushed a commit to cheah/livestreamer that referenced this issue Aug 17, 2014
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

3 participants