Media Grabber

This filter intercepts specified types of media streams (video, audio, images, or anything else) and saves them in files in the specified directory.

Media Grabber filter is similar to UNIX tee command: it passes its input unchanged to the next filter in the active filter chain, but also saves a copy of it in a file.

Media Grabber relies on HTTP Content-Type headers provided by HTTP servers to recognize media types.

Parameters

content_type

One or more content_type parameters define a set of content types the filter will grab.

Here are some examples of common media content types:

*/* All content types (not very useful for this filter).
audio/* All audio content types.
video/* All video content types.
image/* All image content types.
audio/mpeg3 MPEG3 (MP3) audio streams.
video/x-ms-wmv Microsoft .wmv video.
image/jpeg JPEG images.
application/x-shockwave-flash Shockwave animations.

Some servers may send incorrect Content-Type headers in their HTTP responses or don't send them at all. E.g. WMV streams may be incorrectly announced as text/plain instead of video/x-ms-wmv. Foxy corrects some of such cases. Currently it tries to guess some content types by file extension if

This logic may be changed in the future.

Please note that for some content types there are widely used alternative names, e.g. text/javascript and application/x-javascript. If you want to grab such content types, specify all possible values.

What is saved by a Media Grabber filter depends on the filter's position in the filter list. If it's first, the content may be close to the original (only external filters (if any) could have changed it at this point).

directory

This parameter specifies the directory where media files will be saved. An absolute directory path is recommended. May also be a path relative to the current directory (on Win32 platforms it's the directory where foxy.exe is located). The directory must exist. If the value is empty, the current directory is assumed.

Files are saved in the specified directory under their original base names (no path). If a file with the same name already exists, it will be overwritten.

Let your browser play the movie or audio stream until it ends, otherwise only partial content will be saved.

min_file_size

Minimum file size in bytes. Media files smaller than that won't be saved.

See also Common Filter Parameters.

Example

The following filter example saves all audio and video media types with file sizes at least 5000 bytes. Media files from all domains are grabbed.

type = Media Grabber
name = Media Grabber
enabled = true
include = *
directory = \work\var\foxy\media
min_file_size = 5000
content_type = audio/*
content_type = video/*

Foxy web UI equivalent:

Example 2

Say, you discovered a cool http://www.lots-of-pictures.org web site. You want to save all the pictures that you see on this site automatically, without bothering right-clicking on every image and selecting “Save as”. You want only real things though; not banners, buttons, etc. (image file size at least 30,000 bytes). You also want to save those files in a separate directory.

Create a filter like this (use Clone function in Foxy filter editor to clone an existing Media Grabber filter, then modify a few parameters and click Apply):

type = Media Grabber
name = Pictures from lots-of-pictures.org
enabled = true
include = lots-of-pictures.org
directory = \var\foxy\lots-of-pictures
min_file_size = 30000
content_type = image/*