These forums are archived

See this post for further info

get_iplayer forums

Forum archived. Posting disabled.

get_iplayer commands

user-47

On my windows GiP setup I've put together a batch script to get a radio show based on a supplied PID which is working fine for m4a recordings but for mp3 recordings I'm unable to get my command working so the mp3 gets the metadata on the programme applied, using the Web PVR Manager the mp3 recording gets the metadata added correctly so the manager seems to be using the MP3:Tag perl module to do that, so I would of through it would do the same via a command.

I've tried playing about with the --id3v2 argument but I've not been able to find a windows binary to use with the argument that shows as working.

It's not a big issues for me as it's looks like it's just the local programmes that are mp3 and I can use the manager as a last resort but would prefer to use my main solution for everyone via command, plus the metadata allows me to find it on my playlist on my ipod

Any advise from any appreciated, thanks
Code:
SET iplayer_path="C:\Program Files (x86)\get_iplayer"
SET ffmpeg_path="C:\Program Files (x86)\get_iplayer\FFmpeg\ffmpeg-shared\bin\ffmpeg.exe"
SET Lame="C:\Program Files (x86)\get_iplayer\LAME\lame.exe"
SET RTMPDump_path="C:\Program Files (x86)\get_iplayer\RTMPDump\rtmpdump.exe"
SET Meta_Path="C:\Program Files (x86)\get_iplayer\AtomicParsley\AtomicParsley\AtomicParsley.exe"
SET MPlayer="C:\Program Files (x86)\get_iplayer\MPlayer\mplayer-svn-36348\mplayer.exe"
SET ID3V2 = "C:\Program Files (x86)\get_iplayer\id3\metamp3.exe"

%iplayer_path%\get_iplayer.pl --type=radio --pid=%1 --modes default --rtmpdump %RTMPDump_path% --ffmpeg %ffmpeg_path% --atomicparsley %Meta_Path% --mplayer %Mplayer% --lame %Lame% --id3v2 %ID3V2% --tag-podcast --file-prefix="<nameshort>-<episodeshort>" --force > .\%1.log

user-2

Your description omits a few things, but I will hazard a a guess that: a) you're using your own version of Perl; b) your working directory when you run your script is not the get_iplayer installation directory. If you're using your own Perl version and you haven't installed MP3::Tag from CPAN, then MP3 files won't get tagged since MP3::Tag isn't found in @INC. If you run get_iplayer with
Code:
--verbose
you will see a warning to that effect. If the above doesn't describe your setup, fill in the blanks in your reply.

Assuming my guess is correct, you can install MP3::Tag in your Perl version and try that. Another option is to alter your script to make your working directory the get_iplayer installation directory and call the batch wrapper (get_iplayer.cmd), which will use the embedded version of Perl that has MP3::Tag installed (assumed to be in working directory):
Code:
cd %iplayer_path%
get_iplayer --type=radio ...


If you do that you will need to change the log file location to include the full path to wherever you have been saving it up to now. You don't want to pollute the installation directory with log files.

user-2

I neglected to add: You may need to use setlocal/endlocal or pushd/popd if you don't want the
Code:
cd %iplayer_path%
to change the working directory for the calling shell.

user-47

Thanks, I do have a local install of Perl Activestate and installing the MP3::Tag package through PPM has fixed my issue. My script is so I can call get_iplayer from my little app I've put together - [url=http://lakeuk.blogspot.co.uk/search/label/radiobrowser][/url] - working nicely now - keep me sane in little longer on my daily commutes ;)

For anyone that's interested, here's my final script:-
Code:
SET iplayer_path="C:\Program Files (x86)\get_iplayer"
SET ffmpeg_path="C:\Program Files (x86)\get_iplayer\FFmpeg\ffmpeg-shared\bin\ffmpeg.exe"
SET Lame="C:\Program Files (x86)\get_iplayer\LAME\lame.exe"
SET RTMPDump_path="C:\Program Files (x86)\get_iplayer\RTMPDump\rtmpdump.exe"
SET Meta_Path="C:\Program Files (x86)\get_iplayer\AtomicParsley\AtomicParsley\AtomicParsley.exe"
SET MPlayer="C:\Program Files (x86)\get_iplayer\MPlayer\mplayer-svn-36348\mplayer.exe"

%iplayer_path%\get_iplayer.pl --type=radio --pid=%1 --modes default --rtmpdump %RTMPDump_path% --ffmpeg %ffmpeg_path% --atomicparsley %Meta_Path% --mplayer %Mplayer% --lame %Lame% --tag-podcast --file-prefix="<nameshort>-<episodeshort>" --force > .\log\%1.log

exit %ERRORLEVEL%

These forums are archived

See this post for further info