Videogrep: Difference between revisions

From XPUB & Lens-Based wiki
No edit summary
No edit summary
Line 1: Line 1:
{{draft}}
== Videogrep ==


aka [[wikipedia:grep|grep]] meets [[wikipedia:SubRip|SRT]]
From SRT to EDL


The idea of this assignment is to familiarize yourself with:
== SubRip Text ==
* basic text/code editing in Linux
* commandline basics
* '''big idea''': working in a "pipeline" (both literally, and more metaphorically)


== Ingredients ==
<pre>
48
00:06:13,530 --> 00:06:14,460
lt's about time you got married,


=== Plain text? ===
49
* [http://aspell.net/charsets/iso8859.html ISO-8859]
00:06:14,530 --> 00:06:18,530
* UTF-8
Before you turn into
a lonesome and bitter, old man.


file nameofyourfile.srt
50
00:06:19,730 --> 00:06:21,860
yeah, can't you just see me?


=== Redirecting stderr to stdout ===
51
ffmpeg's output is actually to the ''stderr'' and not the ''stdout''. In other words, its output is tagged as "error" information, and the ability to distinguish between this and "regular" information can sometimes be useful. In this case however, we want ffmpeg's output to be treated like "regular" command output. You do this by "redirecting stderr to stdout" with the rather cryptic addition of "2>&1".
00:06:23,000 --> 00:06:25,000
Rushing home to a hot apartment


ffmpeg -i foo.ogg 2>&1
52
00:06:25,060 --> 00:06:29,060
To listen to the automatic laundry
and the electric dishwasher


[http://www.cyberciti.biz/faq/redirecting-stderr-to-stdout/]
53
00:06:29,130 --> 00:06:33,130
And the garbage disposal
and the nagging wife.
</pre>


=== Search & Replace ===
http://en.wikipedia.org/wiki/SubRip


sed is good for search and replace...
== grep "\bman\b" ==


sed s/a/*/g from to
http://activearchives.org/mw/images/3/3c/Videogrep_man.png


== grep "\bwoman\b" ==


http://www.archive.org/details/night_of_the_living_dead
http://activearchives.org/mw/images/7/79/Videogrep_woman.png


== Videogrep ==


[[Category: Prototyping]]
{{#Widget:Video|webm=http://automatist.org/video/man.webm}}
{{#Widget:Video|webm=http://automatist.org/video/woman.webm}}

Revision as of 10:26, 8 October 2012

Videogrep

From SRT to EDL

SubRip Text

48
00:06:13,530 --> 00:06:14,460
lt's about time you got married,

49
00:06:14,530 --> 00:06:18,530
Before you turn into
a lonesome and bitter, old man.

50
00:06:19,730 --> 00:06:21,860
yeah, can't you just see me?

51
00:06:23,000 --> 00:06:25,000
Rushing home to a hot apartment

52
00:06:25,060 --> 00:06:29,060
To listen to the automatic laundry
and the electric dishwasher

53
00:06:29,130 --> 00:06:33,130
And the garbage disposal
and the nagging wife.

http://en.wikipedia.org/wiki/SubRip

grep "\bman\b"

Videogrep_man.png

grep "\bwoman\b"

Videogrep_woman.png

Videogrep