Using results of a command as a prameter for another
by GPGAgent from LinuxQuestions.org on (#5N61W)
I have a movie with black bars at each side, this ffmpeg cpmmand will generate the cropping informationCode:$ ffmpeg -ss 25 -i movie.mp4 -t 1 -vf cropdetect -f null - 2>&1 | awk '/crop/ { print $NF }' | tail -1
crop=640:480:108:0and I can use it in a second ffmpeg command, but for testing purposes I use ffplay like thisCode:ffplay -ss 25 -i movie.mp4 -vf crop=640:480:108:0My question is how can I use the firts ffmpeg command to fill in the crop information in the scond ffplay command?
I've tried piping it but that is obviously wrong, it fails.


crop=640:480:108:0and I can use it in a second ffmpeg command, but for testing purposes I use ffplay like thisCode:ffplay -ss 25 -i movie.mp4 -vf crop=640:480:108:0My question is how can I use the firts ffmpeg command to fill in the crop information in the scond ffplay command?
I've tried piping it but that is obviously wrong, it fails.