3 "The only intuitive interface is the nipple. After that, it's all
5 --Bruce Ediger, bediger@teal.csn.org, in comp.os.linux.misc
7 Although Snatch has a fairly simple, friendly interface, some
8 documentation is in order. As a wise man once remarked, "You'd be
11 ****************************** ABOUT ******************************
13 Snatch is a RealPlayer output recorder. It is not really a ripper; it
14 does not save RealPlayer streams and can't be used to talk to
15 RealServers directly. Instead, it catches the already decoded audio
16 and video as RealPlayer sends it off to the sound device and X server.
17 This technique has the advantages of a) always working, with audio,
18 video and live streams and b) being undetectable at the Real Server.
20 But grabbing the sound and video is relatively trivial (four hours
21 begin to end). Putting it into an easy to use application is what
22 took about two weeks. Snatch also includes a Robot that can issue
23 commands to RealPlayer via synthetic X events, allowing a user to set
24 up preprogrammed timed recording.
26 Snatch does not modify, patch or 'crack' RealPlayer in any way and
27 [should] work with any RealPlayer8 on any architecture for Linux.
28 Snatch simply subverts calls to Xlib and libc, capturing X
29 transactions and sound writes after they leave RealPlayer and before
30 they get to the OS, saving the data in a raw format capture file.
31 It's important to note that this capture output is *uncompressed* and
32 a considerable amount of both disk space and I/O bandwidth is
33 necessary for useful capturing. Five minutes of 240x180 video at
34 15fps will eat about a gigabyte of disk space.
36 Once saved to disk, the output can be transcoded into any other
37 format. MPEG video is a popular choice, and a convenient front end
38 for the 'mjpeg' tools suite is in progress. More about that once the
41 ****************************** SETUP ******************************
43 See the document 'INSTALL'.
45 *************************** QUICK START ***************************
47 Snatch has two parts; libsnatch and the Snatch Robot. It's the
48 responsibility of libsnatch to load as a library underneath
49 RealPlayer, keep track of windows, and capture the audio and video.
50 The Snatch Robot is an external application written in perl that makes
51 libsnatch easier to use (the Robot also provides a convenient
54 If everything is installed correctly, just start the Snatch Robot
55 (named 'Snatch') and you're ready to go. I've gone through some
56 effort to make any error dialogs careful and descriptive, as well as
57 making buttons do what the label says. Five minutes of twiddling
58 should be enough to become an expert. That said, there are a few
59 'clever features' that without some description could easily become
60 'clever pains-in-the-ass'.
62 ***************************** START UP ****************************
64 1) After placing its main window, Snatch will load a user's
65 configuration, history and timer setup from text files in ~/.snatch.
66 If the user has no ~/.snatch directory or no configuration files,
67 Snatch will create the directory and/or populate it with a sensible
68 default configuration.
70 2) Snatch starts a RealPlayer. If it can't, it should tell why. Most
71 failures are due to not being able to find libsnatch.so or the
72 RealPlayer executable. Both of these settings are found on the
75 3) RealPlayer will appear with the 'Snatch' logo on a dark salmon
76 background. This indicates Snatch is ready to go and will now capture
77 anything RealPlayer plays, audio or video or both.
79 **************************** MAIN PANEL ***************************
81 The main panel has eight buttons; two menu tabs and six panel buttons.
85 The timed recoding config panel opens when this button is pressed.
86 More in its own section later.
90 The main configuration panel opens when this button is pressed. More
91 in its own section later.
95 When activated, every frame of audio/video RealPlayer plays is dumped
96 in raw format into a snatch file. The RealPlayer background will be
97 dark Salmon whenever Snatch is in capture all mode (if the background
98 is partially blocked by the video window, the borders will still be
103 When activated, the Snatch Robot is in timer mode. Any stream
104 manually started on RealPlayer will not be recorded. When it comes
105 time for a preprogrammed stream to play, Snatch will wake up, direct
106 RealPlayer to start the stream, and begin capturing. When the
107 programmed duration elapses, Snatch will go back into timer mode and
108 disable capture. If no more preprogrammed streams are waiting, Snatch
109 will go into 'Off' mode.
111 In timer mode, the background is black and the logo is a hourglass.
115 When pressed, Snatch is inactive. It will not capture any Real
116 output. The 'silent capture' settings still function, behaving like
119 6) Silent capture: audio
121 Setting audio to 'silent capture' prevents RealAudio from trying to
122 access the actual Linux sound card devices. Any attempt to open the
123 device is 'faked' by libsnatch. The playback audio is then silently
126 This has a number of advantages. To begin, it eliminates the
127 possibility of RealPlayer trying to open the audio device when another
128 application is using it, resulting in RealPlayer waiting, or not
129 playing back (and thus Snatch not capturing) audio. There is also a
130 slight performance benefit to turning off audible audio
131 playback. Last, it adds a bit more privacy to the capture process.
132 Naturally, Snatch will still capture the stream audio if audio is in
135 If silent audio capture is selected at the beginning of stream
136 playback, unsetting it will have no effect until the next stream. If
137 silent audio is set during stream playback, audio can be reenabled
138 later, but will likely play somewhat out of sync (see the FAQ). Even
139 if it sounds out of sync, the captured file will still be OK.
141 7) Silent capture: video
143 This is analagous to silent audio capture; it may be set and unset at
144 any point during capture. This button turns off all X updates to the
145 main RealPlayer window. Neither video nor UI changes will display.
147 The primary reason for silent video capture is performance; on a
148 machine with a slow framebuffer, slow processor or other applications
149 vying for X latency performance, it's best to concentrate on capturing
150 the video as smoothly as possible and not bother sending it off to the
151 actual display. Using silent capture can almost double effective
152 RealPlayer performace on the Linux machines here.
154 Remember: Snatch does not capture the Real stream; it grabs the audio
155 and video at display time, so what you see/hear is what you get
156 (neglecting silent capture of course). Any dropped frames in the
157 decoded video or gaps in decoded audio will show up in the capture.
158 Although Snatch exacts virtually no additional computation overhead, it
159 *will* give disk I/O a good workout. Many computers will need the
160 extra performance silent capture gives.
164 Quit both Snatch and RealPlayer.
166 *************************** TIMER SETUP ***************************
168 The Timer Setup panel allows you to program future streams for
169 recording. When put in Timer mode, Snatch will record those streams
170 automatically at the selected time.
172 The Timer Setup panel is mostly a simple list of streams queued for
173 recording. The list is sorted by date of recording with any
174 programmed streams that have already passed grayed out at the top of
175 the list. Old entries are not automatically removed, and must be
178 A timed stream may be for a single time/date, or may contain wildcards
179 that allow it to run repeatedly at configured times. The position on
180 the list will be determined by the next time that stream will trigger.
182 The Timer Setup Panel allows four operations, each of which has a
183 button. A fifth button ('X' in the lower right hand corner) closes
184 the Timer Setup panel. Any changes made to the panel are saved
185 immediately. WYSIWYG.
189 The add button adds a new stream to the time list, popping a Timer
190 Entry panel to allow the user to configure the specifics. The Timer
191 Entry panel will be blank aside from the current time/date being
196 Highlighting a stream on the list and clicking the Edit button will
197 pop a Timer Entry panel allowing the user to edit that stream
198 entry. An entry is highlighted by clicking on the entry in the list
199 window. Doubleclicking a line on the list will also open that stream
202 Old [greyed out] entries may also be editied (and reactivated by
203 changing the record date to a future time).
207 This does the same thing as 'add', but rather than presenting the user
208 with a blank Timer Entry panel, fills in a Timer Entry panel for a new
209 stream with the setting fro the highlighted stream.
213 Immediately delete the highlighted stream. There is no 'Are you
214 sure?', there is no undo. Changes are saved immediately.
216 ************************* TIMER ENTRY SETUP ************************
218 The Timer Entry panel allows configuration of all the settings for a
223 When to record; any or all of the fields may be a wildcard setting
224 ('*'). If all fields are wildcards, that indicates recording should
227 Note that impossible dates will be rejected, but not until the user
232 When to begin recording, or rather, when to tell RealPlayer to start
233 playback. RealPlayer will generally spend a good 15-30 seconds
234 connecting, buffering, yadda, before playback/capture actually begins.
238 How many hours and minutes to after beginning playback to stop
243 The file (beginning with file:) or URL to instruct RealPlayer to play.
245 5) username and password
247 If the stream is password protected content, fill in the proper
248 username and password to hand to RealPlayer upon request.
252 These settings have the same effect as the silent capture settings on
253 the main panel. When it comes time to record this stream, these
254 settings will override the settings on the front panel. These will
255 always be preset as timed recording is intended to happen with
256 RealPlayer innocously iconofied somewhere.
260 If Snatch is currently in 'Off' or idle in 'Timer' mode, pressing this
261 button allows the user to test that there are no typos in the URL,
262 username or password by immediately telling RealPlayer to try to
263 connect to the stream. If Snatch is set to 'capture all' or recording
264 another timed stream, the button will be grayed out.
268 Select where to put the captured file. This field may specify stdout
269 (but filling in with a bare -), a directory (in which case Snatch will
270 choose a unique filename) or a file (in which case Snatch will create
271 the file if it does not exist or append to it if it does).
273 Note that most Linux 2.2 machines cannot have files over 2GB and
274 because captures are in a raw format, 2GB can happen fairly quickly.
275 If you specify a file for the output path and hit 2GB, Snatch will
276 stop capturing. If you specify an output directory instead, Snatch
277 will close the 2GB file, open a new file, and continue capturing.
281 When OK is pressed, the fields are checked for problems, and any such
282 problems (like an impossible date or unwriteable output directory) are
283 reported. If there are no errors, the entry is saved to disk
284 immediately, and the Timer Entry panel closes.
288 Abort adding/editing the entry. The panel closes without saving any
291 *************************** CONFIGURATION **************************
293 1) RealPlayer location
295 Where to look for RealPlayer on startup. This field is a glob.
297 2) libsnatch.so location
299 Where to look for the file libsnatch.so on startup. This field is a glob.
303 Which OSS audio device names to watch for. This is only relevant if
304 your Linux is using OSS directly.
306 4) EsounD server socket
308 Where the Enlightened Sound Daemon keeps its connect socket. This
309 option is only relevant if you're using the EsounD daemon.
313 The best first thing to set when something goes wrong, but the error
314 messages dialogs from the Snatch Robot aren't being helpful.
316 This reports to stderr the continuous debugging output from
317 libsnatch/RealPlayer.
321 Select where to put the captured data. This field may specify stdout
322 (but filling in with a bare -), a directory (in which case Snatch will
323 choose a unique filename) or a file (in which case Snatch will create
324 the file if it does not exist or append to it if it does).
326 Note that most Linux 2.2 machines cannot have files over 2GB and
327 because captures are in a raw format, 2GB can happen fairly quickly.
328 If you specify a file for the output path and hit 2GB, Snatch will
329 stop capturing. If you specify an output directory instead, Snatch
330 will close the 2GB file, open a new file, and continue capturing.
334 Pressing OK applies any configuration changes immedaitely, saves the
335 changes to the configuration file ~/.snatch/config.txt and closes the
340 Same as 'ok', but does not close the Configuration panel.
344 Discard any changes and close the Configuration panel.