Videogrep: Difference between revisions

From XPUB & Lens-Based wiki
Line 15: Line 15:


=== Redirecting stderr to stdout ===
=== Redirecting stderr to stdout ===
  2>&1
ffmpeg's output is actually to the "stderr" and not the stdout. In fact they both appear on the screen -- but the ability to distinguish between these two different "sources" or types of information can be very useful. In this case, we want to erase the distinction so that "errors" are treated like regular output.
 
  ffmpeg -i foo.ogg 2>&1


[http://www.cyberciti.biz/faq/redirecting-stderr-to-stdout/]
[http://www.cyberciti.biz/faq/redirecting-stderr-to-stdout/]

Revision as of 22:33, 7 October 2010

aka grep meets SRT

The idea of this assignment is to familiarize yourself with:

  • basic text/code editing in Linux
  • commandline basics
  • big idea: working in a "pipeline" (both literally, and more metaphorically)

Ingredients

Plain text?

file nameofyourfile.srt

Redirecting stderr to stdout

ffmpeg's output is actually to the "stderr" and not the stdout. In fact they both appear on the screen -- but the ability to distinguish between these two different "sources" or types of information can be very useful. In this case, we want to erase the distinction so that "errors" are treated like regular output.

ffmpeg -i foo.ogg 2>&1

[1]

Search & Replace

sed is good for search and replace...

sed s/a/*/g from to


http://www.archive.org/details/night_of_the_living_dead