mplmult.sh

来自「君正早期ucos系统(只有早期的才不没有打包成库),MPLAYER,文件系统,图」· Shell 代码 · 共 46 行

SH
46
字号
#!/bin/sh# example how to output video on multiple windows in sync.# might be even more useful in combination with vo ggi# to distribute the video arbitrarilydir=/tmp/$$count=$1shiftif test 0"$count" -lt 1; then  echo "At least 1 slave instance must be used."  echo ""  echo "Usage:"  echo "./mplmult.sh n mplayer-opts"  echo "n              number of MPlayer instances that display the video"  echo "mplayer-opts   anything you would specify to mplayer,"  echo "               more than one file will usually not work"  exit 1fimkdir -m 700 $dirif test $? -ne 0; then  echo "Could not create temp dir!"  exit 1fimkfifo $dir/stream.yuvi=1fifo_list=""while test $i -le $count; do  fifo_list="$dir/mp$i $fifo_list"  let i=$i+1donemkfifo $fifo_list(cat $dir/stream.yuv | tee $fifo_list > /dev/null ) &for fifo in $fifo_list; do  # -benchmark is neccessary so that it will not do any timing.  # the master instance already takes care of it and not specifying  # it will break A-V sync.  mplayer -nocache -quiet -benchmark "$fifo" > /dev/null 2>&1 &donemplayer -nocache -fixed-vo -vo yuv4mpeg:file=$dir/stream.yuv "$@"rm -rf $dir

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?