This repository has been archived on 2023-12-11. You can view files and clone it, but cannot push or open issues or pull requests.
archive/shell/mpv-fmt/mpv-fmt.sh
2023-07-29 16:42:28 +05:00

10 lines
359 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/usr/bin/env bash
# kill -9 $(pgrep mpv)
read -p 'С какой серии начать? ' -i Ep01 -e START_EPISODE
for CURRENT_EPISODE in $(ls | grep mkv)
do
if grep -q "$START_EPISODE" <<< "$CURRENT_EPISODE"; then
mpv --vf=lavfi=[crop=1440:1080:240:0] $CURRENT_EPISODE \
--audio-file=$(sed 's/mkv/mka/g' <<< $CURRENT_EPISODE)
fi
done