Simplify ffprobe output parsing using '-of json'

ffprobe/avprobe has built-in support for outputing in JSON format.
Parsing JSON is simpler for obvious reasons and also produces better output than manual parsing.
As a side benefit, this method also supports avprobe output.