13 lines
414 B
Plaintext
13 lines
414 B
Plaintext
|
#!/bin/bash
|
||
|
video=$1
|
||
|
speed=${2:-1}
|
||
|
echo "speed: $speed"
|
||
|
slowness="$( echo $speed | bc -l )"
|
||
|
echo "slowness: $slowness"
|
||
|
rate=$( ffmpeg -i $video | sed -n "s/.*, \(.*\) tbr.*/\1/p" )
|
||
|
echo "oldrate: $rate"
|
||
|
newrate=$( echo "scale=0; $speed * $rate" | bc -l )
|
||
|
echo "newrate: $newrate"
|
||
|
command=ffmpeg -re -i "$video" -r $newrate filter:v "setpts=$slowness*PTS" pipe:1
|
||
|
mkchromecast --video --control --command "$command"
|