Tidying up Radio Downloads

Vangelis forthnet northmedia1 at the.forthnet.gr
Thu Aug 24 08:17:34 PDT 2017


 On Thu Aug 24 13:12:07 BST 2017, RS wrote:

> whether I am at risk of losing tags or metadata.

 There is such a risk, but whenever FFmpeg has tagged files as input,
it does its best to preserve (most) of the metadata present in the input
file and carry it over to the output file, taking, of course, into account
what metadata the output container has support for...

> The reason for my concern is that
> there seems to be a lot of code in get_iplayer to process metadata,
> although I can't pretend to understand what it all does.

 Yes, there's a lot of code, but in a nutshell
what it does is parse online BBC sources
(currently e.g.
http://www.bbc.co.uk/programmes/<pid>.json
http://www.bbc.co.uk/programmes/<pid>/playlist.json )
to harvest what metadata is needed,
then use it to construct AtomicParsley commands
to tag the downloaded->remuxed .M4A files.
Using --verbose or --debug into your GiP commands
will let you inspect in detail what's being actually done :-)

> What I still haven't worked out is
> whether there is an equivalent of
> -codec copy for metadata.

 If my details above wrt ffmpeg still leave you in doubt,
then please have a read of

http://www.ffmpeg.org/ffmpeg-formats.html#Metadata-1

 This is a manual labour, metadata present in
the input file is first extracted and backed-up,
to be inserted to the output file at a second stage...
But again, since it's GiP audio files we're discussing
(or maybe not?), you can tag the edited .m4a file with
GiP via:

get_iplayer --type=radio --pid=<pid> --tag-only --tag-podcast-radio --tag-only-filename="<filename>"

"<filename>" in this case is THE COMPLETE PATH
to your edited audio file (whereas in normal GiP use
"<filename>"="<dir>\<fileprefix>.EXT", "<dir>"
being your "iPlayer Recordings" directory...

 The tagging command works even after a radio
programme has expired from iPlayer Radio,
because the online sources stay there for good
(tied to the unique pid string!).

All the best,
Vangelis 




More information about the get_iplayer mailing list