I don't know why it stops for you after 10 seconds.
I use that script pretty much every day to stream videos via smplayer. I made it due to laziness, in a non-lazy moment, so I don't have to remember the CLI options for video quality etc.
If it doesn't error out after 10 seconds when you use that script, instead of directly running mplayer with the content URL, you might be able to reproduce what the script does by checking which options are shipped over to mplayer.
I believe the --cookie option is kind of important also.