Files
shellfiles/bin/wsl/move_nonhcodec.sh
2026-01-19 21:36:25 -05:00

17 lines
375 B
Bash
Executable File

#!/bin/sh
echo "Media to convert to h.264"
echo "--------------------"
for i in `ls`
do
OUTPUTh264=`ffmpeg -i $i 2>&1 | egrep 'h264'`
OUTPUTh265=`ffmpeg -i $i 2>&1 | egrep 'hevc'`
if [[ ( -z "$OUTPUTh264" ) && ( -z "$OUTPUTh265" ) ]]; then
echo " "
if [[ -f $i ]]; then
echo "Moving $i"
mkdir -p to_mp4
mv $i to_mp4
fi
fi
done