Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 04-18-2009, 08:37 AM   #1
LQ Newbie
Registered: Feb 2008
Distribution: Fedroa 10
Posts: 19

Rep: Reputation: 0
Confused in ffmpg options


I was looking for a way to check avi files for errors and came across this tutorial. Though its ffmpeg commands work fine but I don't understand what they mean.

First Question
$ ffmpeg -v 5 -i episode01.avi -f null -
Now this command works but I don't understand its last option.

I understand that we give the name of the output file in the end but here we have given hyphen(-). How does it affect the ffmpeg? What does it mean? Does it tells ffmpeg there is no output file or does it tells it to dry run on the input file?

Second Question
$ ffmpeg -v 5 -i episode01.avi -f null - 2> episode01.txt
The above command is used to redirect the output to a file.

Why we have to put a '2' before '>'?
In other commands to redirect the output, I simply have to put a '>'; like 'ls >list', but here redirection doesn't work unless there is a 2 immediately before the '>'.
Why is to so?

Please help me with my confusion. Any explanation will be highly appreciated.

Old 04-18-2009, 09:26 AM   #2
Registered: Jan 2009
Posts: 165

Rep: Reputation: 44
The '-' usually means that the output is dumped to the console. I assume that "-v 5" sets verbosity level high, and "-f null" means null format - so you shouldn't see any data dumped to the console, only error messages. That is how they check for errors with ffmpeg.

The "2>" redirects stderr to a file. In Linux, every program has 2 output streams: stdout and stderr. By default they are both redirected to the console - so you don't know that it's 2 different output streams... But when redirecting to files you have to be aware of it. You can also redirect stderr to stdout with "2>&1" and you can redirect both streams to a file with "&>".


avi, check, ffmpeg, file

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Confused!! kenny724 Linux - Server 6 05-23-2008 02:22 AM
Confused nay Very Confused chrystlenight SUSE / openSUSE 3 08-28-2007 05:57 PM
help!! seriously confused andymckay2001 Linux - Newbie 5 04-10-2007 05:48 PM
Kernel 2.6.2 options question - LOCKED options ? tvojvodi Linux - General 0 02-17-2004 04:23 AM
Confused about kernel compilation options toolkit Linux - General 3 11-21-2002 09:34 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:00 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration