-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathget_video_from_videolecturesnet.sh
More file actions
executable file
·40 lines (35 loc) · 1.02 KB
/
Copy pathget_video_from_videolecturesnet.sh
File metadata and controls
executable file
·40 lines (35 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash
#
# Script for sucking down videos from videolectures.net. Tested Oct 2009.
#
# Contact: Matt Tierney (tierney@cs.nyu.edu)
#
# Requires two arguments.
#
# ./thisfile.sh [VIDEOLECTURES.NET URL]
#
# Note: Run this script in screen or somewhere where you can just
# 'leave it alone' for a while, especially if a video lecture is long.
#
FILE=`echo $1 | cut -d'/' -f4`
WMVFILE=`echo $1 | cut -d'/' -f4`.wmv
AVIFILE=$FILE.avi
TEMPFILE="tierneymyvid"
wget -O $TEMPFILE $1
MMSADDR=`cat $TEMPFILE | grep "wmv" | gawk '{ print $10 }' | cut -d'"' -f2 | sed 's/http/mms/g'`
rm $TEMPFILE
# Take MMS stream addr and convert to WMV
#
mplayer -dumpfile $WMVFILE -dumpstream $MMSADDR
# convert WMV to AVI
#
# mencoder $WMVFILE -ovc copy -oac copy -o $AVIFILE
mencoder $WMVFILE -ofps 23.976 -ovc lavc -oac copy -o $AVIFILE
# Input: AVI file
# Output: mp4 (mpeg4) file
#
ffmpeg -i $AVIFILE -vcodec mpeg4 -acodec libfaac -ab 44100 -b 934000 -r 1000 $FILE.mp4
# Convert from video to tga (for motion tracking)
#
ffmpeg -i $FILE.mp4 $FILE_%09d.tga
#EOF