Saved filename format for recordings

dinkypumpkin dinkypumpkin at gmail.com
Tue Mar 27 07:14:03 EDT 2012


On 27/03/2012 10:16, MrArtist wrote:
>
> On 27/03/2012 08:06, J K.Eason wrote:
>>
>> I'd also like to know how to save filenames without the PID and 'default'
>> on the end, and have been meaning to ask that for ages.
>> However you can change the underscores to spaces by adding 'whitespace 1'
>> to the options.
>> Note that for those using Windows, you'll *also* have to add
>> 'fatfilename 1' to the options or the filename will be truncated at the
>> first space causing failure to write the file.
>>
> As I'm using the Web PVR Manager to do my recordings, I'm not sure where
> I'd add in the 'whitespace 1' and 'fatfilename 1'?

The Web PVR isn't designed for that level of flexibility, so it doesn't 
provide access to many get_iplayer options.  This is where your options 
file comes into play, which is what the poster was referring to. 
Settings in the options file are permanent (unless overridden on command 
line) and apply to all downloads from the Web PVR or command line.  You 
can add settings in the options file using the --prefs-xxx options from 
the command line (see below), but you can also create them directly:

Since you're on Windows 7, create a plain text file at:

USERPROFILE\.get_iplayer\options

which will usually be:

C:\Users\<username>\.get_iplayer\options

That file will contain your user-level options.  The Windows installer 
creates a system-level options file at:

C:\ProgramData\get_iplayer\options

Don't edit the system options, but rather make any customisations in 
your user options file.

Look at the global options file for the format, which is just:

<option-name>(whitespace)<option-value>

where <option-name> is the same as the associated command line option. 
For example, the command line boolean option "--whitespace" is 
equivalent to "whitespace 1" (ON) and "--no-whitespace" is equivalent to 
"whitespace 0" (OFF).

So to change the format of the recording file name, you would use the 
--fileprefix option and substitution parameters.  This command line form:

--fileprefix="<nameshort>-<episodeshort>-<senum>-<pid>"

becomes:

fileprefix  <nameshort>-<episodeshort>-<senum>-<pid>

in the options file.

The full list of substitution parameters, along with more examples, can 
be found by invoking:

get_iplayer->Help->get_iplayer Example Commands

from the Start menu, then clicking "Documentation".  The examples are 
given for the command line, but can be transferred to the options file 
as above.  See the "Saving Settings" section for info on using the 
command line to maintain the options file.

Unfortunately, none of the "Click here for ..." links work since the 
original online man page has disappeared.  If you want to see all the 
options available, there is an online copy of the get_iplayer man page 
for release v2.80 here:

http://manpages.ubuntu.com/manpages/precise/man1/get_iplayer.1.html

It has changed slightly since release, but not much.  Before we do 
another release, I plan to restore those documentation files in some 
fashion.

> I've had a look through the get_iplayer.pl script and there are quite
> few references to whitespace but nothing I can see to readily change to 1.

The script reads from your options file, where it would find "whitespace 
1" or "whitespace 0", then overrides those settings if you enter 
--whitespace or --no-whitespace on the command line.  The 1 and 0 are 
interpreted as boolean true and false in Perl.  Probably best to ignore 
the internals and use the options file.

> Also I wonder why the fatfilename requirement? Is this just a Windows
> limitation or something for Fat32 file system only?

Mostly only a FAT filesystem issue, but it usually doesn't hurt to 
remove those punctuation characters.



More information about the get_iplayer mailing list