Import of atscap v1.1
[atscap.git] / mpeg.sh
blob9def7f0d0e8133226d33726e618e1897bc01ed1f
1 #!/bin/bash
2 # Changes mozilla supplied mpeg:// url to:
3 # a) http:// for xine/mplayer http playback over httpd
4 # or:
5 # b) directory plus basename for playback over mounted filesystem
7 # mplayer can use httpd Range: to seek within file. no slider in xine http://
9 # xine player options can be set to:
10 # -V xvmc overrides to xvmc mode; -p starts playback;
11 # --enqueue adds to mrl list and starts playing if not loaded yet
12 PLAYER=xine
13 #PLAYOPT="-p -V xvmc --enqueue"
14 PLAYOPT="-p -G960x544"
16 # mplayer options set to xvmc mode playback
17 #PLAYER=mplayer
18 #PLAYOPT="-vo xvmc -vc ffmpeg12mc"
20 # replace mpeg:// with http:// for URL
21 URI=$1
22 PLAYURL=http${URI:4}
23 CUT1=`expr "$URI" : 'mpeg://'`
24 HOSTFILE=${URI:CUT1}
25 CUT2=`expr index "$HOSTFILE" '/'`
26 NAME=${HOSTFILE:CUT2}
28 # change this to local mount used for your remote capture directory
29 DIR=/dtv
30 PLAYFILE=$DIR/$NAME
32 # uncomment this for playback over local mount directory/filename.ts
33 $PLAYER $PLAYOPT $PLAYFILE
34 # uncomment this for playback over HTTP
35 #$PLAYER $PLAYOPT $PLAYURL