LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices



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

Rep: Reputation: 0
Confused in ffmpg options


Hi,

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
Quote:
$ 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
Quote:
$ ffmpeg -v 5 -i episode01.avi -f null - 2> episode01.txt
The above command is used to redirect the output to a file.

'2>'
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.

Regards
 
Old 04-18-2009, 10:26 AM   #2
Udi
Member
 
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 "&>".
 
  


Reply

Tags
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 03:22 AM
Confused nay Very Confused chrystlenight Suse/Novell 3 08-28-2007 06:57 PM
help!! seriously confused andymckay2001 Linux - Newbie 5 04-10-2007 06:48 PM
Kernel 2.6.2 options question - LOCKED options ? tvojvodi Linux - General 0 02-17-2004 05:23 AM
Confused about kernel compilation options toolkit Linux - General 3 11-21-2002 10:34 PM


All times are GMT -5. The time now is 09:09 PM.

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