So i have this script here Remove Audio Streams of videos - recursively without converting audio or video with FFMPEG But the subtitles part doesn't work. Currently I have tried a few variations of
export FLAGS='-sub_charenc CP1252 -i "${1%\.*}".srt -vcodec copy -acodec copy'
and
find "$TRANSCODEDIR"/* -type f -name "*.mkv" -exec bash -c 'ffmpeg -i "$1" "$FLAGS" "${1%\.*}".mkv ' _ {} \;
But I am getting errors like movie.mkv.srt does not exist or atleast one output file must be specified, and others, I am going to trial and error again and keep notes of what errors I get depending on what variation, but any help pointing me in the right direction is appreciated.
What code is supposed to do
File Tree Example
Movie.mkv Movie2.mkv Movie.srt Movie2.srt
It should add the correct srt to the correct mkv.
As it stands the error i get is that
Unrecognized option 'sub_charenc CP1252 -i "${1%\.*}".srt -vcodec copy -acodec c opy'.