As previously mentioned by PTrenholme and indicated by others, you need to understand output redirection.
In a shell, type
man bash and read the section on
REDIRECTION.
The output you are getting is from
stderr instead of
stdout
When you redirect output using the >
without a file descriptor, bash assumes that you mean stdout (File descriptor
1).
Therefore:
Code:
ffmpeg -i $1 -b 4000k -minrate 4000k -maxrate 4000k -bufsize 1835k temp.m2v > temp
is the same as:
Code:
ffmpeg -i $1 -b 4000k -minrate 4000k -maxrate 4000k -bufsize 1835k temp.m2v 1> temp
What you could do is redirect stderr (File descriptor
2):
Code:
ffmpeg -i $1 -b 4000k -minrate 4000k -maxrate 4000k -bufsize 1835k temp.m2v 1> temp 2> errors
I suspect (as does everyone else who has posted a response) that the line you are after is the last line of the new errors file.
If you look at my previous post you would see something like:
What this is saying is, redirect
stderr to
stdout (which is being redirected to the file
temp.
What we have been saying, is that it is in your best interest to
understand this as opposed to copy typing.