Skip to content
This repository has been archived by the owner on Sep 12, 2022. It is now read-only.

Seeking while casting video from ubuntu using rcast.py results in broken pipe #70

Open
jishnub opened this issue Jun 27, 2018 · 1 comment
Labels

Comments

@jishnub
Copy link

jishnub commented Jun 27, 2018

I am casting a video from my laptop running Ubuntu using rcast.py and it works as expected. From the remote control panel I can use the play/pause, stop, volume buttons correctly. However seeking (either +-30s or +-10 mins) fails with a broken pipe. I am attaching the traceback

Exception happened during processing of request from ('192.168.1.10', 32828)
Traceback (most recent call last):
  File "/home/jishnu/anaconda3/lib/python3.6/socketserver.py", line 317, in _handle_request_noblock
    self.process_request(request, client_address)
  File "/home/jishnu/anaconda3/lib/python3.6/socketserver.py", line 348, in process_request
    self.finish_request(request, client_address)
  File "/home/jishnu/anaconda3/lib/python3.6/socketserver.py", line 361, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/home/jishnu/anaconda3/lib/python3.6/socketserver.py", line 696, in __init__
    self.handle()
  File "/home/jishnu/anaconda3/lib/python3.6/http/server.py", line 418, in handle
    self.handle_one_request()
  File "/home/jishnu/anaconda3/lib/python3.6/http/server.py", line 406, in handle_one_request
    method()
  File "/home/jishnu/anaconda3/lib/python3.6/http/server.py", line 639, in do_GET
    self.copyfile(f, self.wfile)
  File "/home/jishnu/anaconda3/lib/python3.6/http/server.py", line 800, in copyfile
    shutil.copyfileobj(source, outputfile)
  File "/home/jishnu/anaconda3/lib/python3.6/shutil.py", line 82, in copyfileobj
    fdst.write(buf)
  File "/home/jishnu/anaconda3/lib/python3.6/socketserver.py", line 775, in write
    self._sock.sendall(b)
BrokenPipeError: [Errno 32] Broken pipe
----------------------------------------

Seeking fails using both the android app and the remote website http://raspberrypi.local:2020/remote.

@mheine
Copy link
Collaborator

mheine commented Jul 2, 2018

I am unable to reproduce this specific error (I'm also getting a Errno 32, but it's appearing when trying to cast specific video files), but I my guess would be that it has something to do with how we send input to Omxplayer:
os.system("echo -n $'\x1b\x5b\x43' > /tmp/cmd &") [server.py:182]

However, since seeking works for non-local files, another possibility is that serving video content over HTTP, and then trying to seek in it is just not was HTTP was meant for (see this StackOverflow answer).

@mheine mheine added the bug label Jul 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants