Lectopia rtsp stream capture II

A new semester, and some more hacking on the ‘dumpstream’ script. Now it is a little smarter because it can read the playlist file given by lectopia, and extract the rtsp stream URL from it:

#!/usr/bin/env bash

# Snip the URL from the playlist file
URL=`wget -q -O - $1 | grep rtsp | sed 's/.*src="\(.*\)".*/\1/'`

# Store the DATE from the file
DATE=`echo $URL | sed 's/.*iLectures.\{10\}\(.\{10\}\).*/\1/'`

# re-encode the file data, using the DATE as the name
`mencoder $URL -oac mp3lame -lameopts cbr:br=56 -ovc x264 -x264encopts bitrate=100 -rtsp-stream-over-tcp -o $DATE.avi`

Tags: , ,

2 Comments

  • jeremy says:

    Hi,

    I’m pretty frustrated with some of my lecturers’ “streaming-only” policies too, so I was happy to find your posts! However I’m having trouble with the scripts, so I was wondering if you’d be willing to give some advice?

    Firstly, are there any limitations on capturable formats? We get to choose between Flash and QuickTime video formats. I tried both, but got “Sorry, this file format is not recognized/supported” from mencoder. Also, is a URL like “http://lectopia.uwa.edu.au/lectopia/castermovie.lasso?fid=638198″ correct?

    Secondly, I couldn’t run the full script (I just used the last line, with URL and filename substituted). I’m not familiar with bash scripts — I pasted the code into a file called “lectget” but got the message “bash: ./lectget: Permission denied”. what am I doing wrong?

    Thanks!

  • admin says:

    Hi Jeremy.

    It appears that an update to the lectopia playlist format borked my script.. Have a look at my latest post which should work with your stream.

Leave a Reply

XHTML: You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>