Videogrep: Difference between revisions

From XPUB & Lens-Based wiki
No edit summary
No edit summary
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
aka [[wikipedia:grep|grep]] meets [[wikipedia:SubRip|SRT]]
See also [[Videogrep.py]]


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


== Ingredients ==
From SRT to EDL


=== Plain text? ===
== SubRip Text ==
* [http://aspell.net/charsets/iso8859.html ISO-8859]
* UTF-8


file nameofyourfile.srt
<pre>
48
00:06:13,530 --> 00:06:14,460
lt's about time you got married,


=== Redirecting stderr to stdout ===
49
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:14,530 --> 00:06:18,530
Before you turn into
a lonesome and bitter, old man.


ffmpeg -i foo.ogg 2>&1
50
00:06:19,730 --> 00:06:21,860
yeah, can't you just see me?


[http://www.cyberciti.biz/faq/redirecting-stderr-to-stdout/]
51
00:06:23,000 --> 00:06:25,000
Rushing home to a hot apartment


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


sed is good for search and replace...
53
00:06:29,130 --> 00:06:33,130
And the garbage disposal
and the nagging wife.
</pre>


sed s/a/*/g from to
http://en.wikipedia.org/wiki/SubRip


== grep "\bman\b" ==


http://activearchives.org/mw/images/3/3c/Videogrep_man.png


http://www.archive.org/details/night_of_the_living_dead
== grep "\bwoman\b" ==


{{#widget Video|url=http://www.archive.org/download/night_of_the_living_dead/night_of_the_living_dead_512kb.mp4}}
http://activearchives.org/mw/images/7/79/Videogrep_woman.png


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

Latest revision as of 17:10, 3 February 2015

See also Videogrep.py

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