Can u please help me with bash script for ffmpeg? Trying to create condition based on args to play OR save media to file, so I've created this kind of IF:
#!/bin/bash
if [ "$1" == "play" ]; then
POSTFIX="-f matroska - | mpv -"
else
POSTFIX="-y $OUTPUT"
fi
ffmpeg \
# skipped personal ffmpeg stuff
"$POSTFIX"
Now when I try to run it with "play" argument it says:
Unrecognized option 'f matroska - | mpv -'.
So if I add this POSTFIX both variants to command everything works fine...
It looks like something in my bash screens this args or something like that? Also I don't see in error this dash symbol before f option