Panel Video Cannot Load Longer Video

Hi all,

I was using pane.Video() to display videos for a jupyter notebook. However, when I started player longer videos (> 15 minutes), the kernel always crashed. It works perfectly fine with videos that are less 2 minutes, so I suppose it has to do with how data is being transferred.

To explain the set-up, I am working on a cluster and use port forwarding to use the display on my local computer for jupyter lab. I get the error that something is wrong with Tornado library etc.

The next time the kernel restarts and I try to run the same cell again, I get the error:
[I 2024-01-24 17:02:07.460 ServerApp] AsyncIOLoopKernelRestarter: restarting kernel (1/5), keep random ports

I also tried loading larger videos with IPython.Video which worked seamlessly. However, when loading videos with the panel library, it breaks. Does anyone have any idea about how to fix this? Any insight would be appreciated!

Not entirely sure; maybe related Max. upload size

@ahuang11 Thank you for the response!

Unfortunately, this doesn’t work still. I followed the steps outlined in this issue websocket message size limitation introduced in tornadoweb causes kernel crashes · Issue #3468 · jupyter/notebook · GitHub to change the jupyter config so that I can have a larger web socket size. The same issue still occurs when I try to load larger files.

Do you have any idea where else might be indicating the maximum message size? Or if maybe changing the config file might not be enough? For reference, I am using Jupyter Lab. The command:

jupyter lab --ip=$ip_address --port=8099 --no-browser config=""

Also, I did change the ServerApp.max_buffer_size etc too, since I am using the Jupyter Lab. I think I might also have to do with something else since I don’t get the error message that the message size is too large, but I have something with the TCP protocol not being supported (as shown previously).

Maybe you can share a minimal example so I can try reproducing?

Hello, sorry for the delayed response. There is really not much I am doing in fact, it is simply loading in a long video. e.g.

video = pn.pane.Video(marked_video, width=500, loop=True)

When I run this cell, my kernel just crashes because the video cannot be loaded. If the video is under 2 minutes, it works alright.