RaspberryCast icon indicating copy to clipboard operation
RaspberryCast copied to clipboard

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

Open jishnub opened this issue 7 years ago • 1 comments

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.

jishnub avatar Jun 27 '18 13:06 jishnub

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 avatar Jul 02 '18 17:07 mheine