6
How can i save ffmpeg file-info output to a variable?
if i put the following command into variable it's always empty, even though the command generates an output
/usr/bin/ffmpeg/ffmpeg -i $1
what i've tried
INFO=$(/usr/bin/ffmpeg/ffmpeg -i $1)
if [ -z "$INFO" ]; then
echo "empty variable"
else
echo "$INFO"
fi
what issue you are facing? – Guru – 2013-01-21T10:30:19.473
the variable is empty. – teslasimus – 2013-01-21T10:35:37.847
without saving into variable, can you try running the command directly within the script to make sure output is generated? – Guru – 2013-01-21T10:40:05.817