好多年之前做了一个播放西北工业大学网络课件的小程序,时不时有人问起这个,现在将其整理一下放在这里。

程序:点击下载 VGAPlayer-bin.zip
源码:点击下载 VGAPlayer-src.zip

安装方法:
本程序是个很简陋的绿色软件,双击 “绿化.cmd” 可以安装。
双击 “卸载.cmd” 可以卸载。

使用方法:
将.vga文件和.asf放在同一个目录下,见下图:


双击 .vga 文件即可开始播放。
播放效果如下:


关于在线课件的下载:
content.htm
frm000.htm
frmleftdown.htm
frmleftup.htm
localclip.asx
remoteclip.asx
上面这些文件都是我们不需要的,需要的是:
Screen.vga
000.asf

这里我写了一个下载脚本,可以批量下载vga和asf文件,并自动根据课程编号重命名:

# download.sh 可以在cygwin,msys,SFU下运行
# 使用 wget 下载西北工业大学的课件
# -P, --directory-prefix=PREFIX   save files to PREFIX/... mkdir -p files

# 《汇编语言》共64讲
start=$1
end=$2

url_base=http://219.144.186.219/vod/hbywjjk
course_index=$start
while [ $course_index -le $end ]
do
    mkdir $course_index
    #wget -P $course_index $url_base/$course_index/content.htm      #(播放器页面)
    #wget -P $course_index $url_base/$course_index/frm000.htm       # (右边,演示窗口)
    #wget -P $course_index $url_base/$course_index/frmleftdown.htm  #(左下窗口,PPT目录)
    #wget -P $course_index $url_base/$course_index/frmleftup.htm    #(左上,主讲人窗口)
    #wget -P $course_index $url_base/$course_index/localclip.asx    #(本机播放asf视频文件名)
    #wget -P $course_index $url_base/$course_index/remoteclip.asx   #(远程播放asf视频文件名)
   
    wget -P $course_index $url_base/$course_index/Screen.vga        #(每集的VGA视频演示文件)
    wget -P $course_index $url_base/$course_index/000.asf           #(每集的主讲人视频文件)
   
    number3=`printf %03d $course_index`
    mv $course_index/Screen.vga files/$number3.vga
    mv $course_index/000.asf files/$number3.asf rm -fR $course_index

    course_index=$(( $course_index + 1 ))
done

使用方法是先修改一下url_base,再执行:

download.sh 1 64

也可以运行多个进程,以便加快下载速度:

download.sh 1 10 &
download.sh 11 20 &
download.sh 21 30 &
download.sh 31 40 &
download.sh 41 50 &
download.sh 51 60 &
download.sh 61 64 &

注:本程序使用了来自http://www.powercreator.com.cn 公司的 VGAPlayer.ocx 控件。
本文最后更新(2015年08月31日09:07:12)


本文链接地址: 西北工业大学.vga,.asf网络课件播放器(附批量下载脚本)
https://blog.qingfengju.com/index.asp?id=350

分类:Win32/C++ 查看次数:7282 发布时间:2013/10/1 23:25:49