Been looking into this but I've not got a sansa to test these out but I thought perhaps using the -ipod switch with MP4Box might work since it seems to maintain tags while creating a new file.
Info dump from the original file:
E:\iPlayer Recordings>MP4Box -info BBC_Radio_1s_Essential_Mix.m4a
* Movie Info *
Timescale 1000 - Duration 02:00:00.044
Fragmented File no - 1 track(s)
File suitable for progressive download (moov before mdat)
File Brand M4A - version 512
Created: GMT Thu Jan 01 00:00:00 1970
File has no MPEG4 IOD/OD
iTunes Info:
Name: Future Stars of 2013: 2. Duke Dumont
Artist: BBC Radio 1
Album: BBC Radio 1's Essential Mix
Comment: The Essential Mix Future Stars of 2013 continues with Annie Mac
's choice, Duke Dumont!
Writer: BBC iPlayer
Album Artist: BBC Radio
Genre: Music
Created: 2013-01-12T01:00:00Z
Encoder Software: Lavf53.4.0
TrackNumber: 2 / 0
Group: Music,Dance & Electronica
Cover Art: JPEG File
Track # 1 Info - TrackID 1 - TimeScale 44100 - Duration 02:00:00.043
Media Info: Language "Undetermined" - Type "soun:mp4a" - 310080 samples
MPEG-4 Config: Audio Stream - ObjectTypeIndication 0x40
MPEG-4 Audio MPEG-4 Audio AAC LC - 2 Channel(s) - SampleRate 44100
Self-synchronized
From the new file using -ipod:
?E:\iPlayer Recordings>MP4Box -ipod BBC_Radio_1s_Essential_Mix.m4a
Setting up iTunes/iPod file...
Saving BBC_Radio_1s_Essential_Mix.m4a: 0.500 secs Interleaving
?E:\iPlayer Recordings>MP4Box -info BBC_Radio_1s_Essential_Mix.m4a
* Movie Info *
Timescale 1000 - Duration 02:00:00.043
Fragmented File no - 1 track(s)
File suitable for progressive download (moov before mdat)
File Brand M4A - version 1
Created: GMT Thu Jan 01 00:00:00 1970
File has no MPEG4 IOD/OD
iTunes Info:
Name: Future Stars of 2013: 2. Duke Dumont
Artist: BBC Radio 1
Album: BBC Radio 1's Essential Mix
Comment: The Essential Mix Future Stars of 2013 continues with Annie Mac
's choice, Duke Dumont!
Writer: BBC iPlayer
Album Artist: BBC Radio
Genre: Music
Created: 2013-01-12T01:00:00Z
Encoder Software: Lavf53.4.0
TrackNumber: 2 / 0
Group: Music,Dance & Electronica
Cover Art: JPEG File
Track # 1 Info - TrackID 1 - TimeScale 44100 - Duration 02:00:00.043
Media Info: Language "Undetermined" - Type "soun:mp4a" - 310080 samples
MPEG-4 Config: Audio Stream - ObjectTypeIndication 0x40
MPEG-4 Audio MPEG-4 Audio AAC LC - 2 Channel(s) - SampleRate 44100
Self-synchronized
However playing this in foobar it wasn't seekable so I ran it through mp4creator with the -optimize switch and it spat out this error:
E:\iPlayer Recordings>mp4creator -optimize -i BBC_Radio_1s_Essential_Mix.m4a
[b]ReadAtom: invalid atom size, extends outside parent atom - skipping to end of "cprt" "data" 1300193 vs 1300125
MP4ERROR: Atom ReadProperties: atom is too small[/b]
ReadAtom: invalid atom size, extends outside parent atom - skipping to end of "cprt" "data" 1300193 vs 1300125
MP4ERROR: Atom ReadProperties: atom is too small
Looking up the "MP4ERROR: Atom ReadProperties: atom is too small" suggests it's caused by the way the encoder tags the files, so the -ipod switch messed things up since the original file doesn't have this error along with the one created with the -new switch which I presume you're doing in YAMB too. May want to try mp4creator -optimize on the original file yourself to see if it makes it playable.
If this doesn't work then I think this avenue is a dead end, there's no settings in the script to help with what you're wanting - could start changing the source but that's way out of my league and I don't think I've seen external meta-data files being used for the likes of m4a, mp3, etc - maybe wrong. But I think the best way to solve this is to dump meta-data to a file and then import it back into the new container, or have you already tried this - still causes problems?
There's AtomicParsley tool that lets you modify the metadata in the aac files, so might be a way to do what we want.
example of the data it grabs:
E:\iPlayer Recordings>"E:\iPlayer Recordings\AtomicParsley.exe" "E:\iPlayer Recordings\BBC_Radio_1s_Essential_Mix.m4a" -t
Atom "©too" contains: Lavf53.4.0
Atom "stik" contains: Normal
Atom "cprt" contains: © 2013 British Broadcasting Corporation, all rights reserved
Atom "©nam" contains: Future Stars of 2013: 2. Duke Dumont
Atom "©ART" contains: BBC Radio 1
Atom "aART" contains: BBC Radio
Atom "©alb" contains: BBC Radio 1's Essential Mix
Atom "©grp" contains: Music,Dance & Electronica
Atom "©wrt" contains: BBC iPlayer
Atom "©gen" contains: Music
Atom "©cmt" contains: The Essential Mix Future Stars of 2013 continues with Annie Mac's choice, Duke Dumont!
Atom "©day" contains: 2013-01-12T01:00:00Z
Atom "trkn" contains: 2
Atom "©lyr" contains: Throughout January, Pete Tong, Annie Mac, Heidi and Friction are shining the spotlight on four artists they think are going to break through big time in 2013. Annie's choice is a DJ/Producer who is no newcomer, but who has re-emerged after a brief hiatus, during which time he holed up in his country studio producing some future house classics like 'The Giver' and 'Need U (100%)'. "For me, being from the UK, the Essential Mix is an institution, so I am honoured to receive the call from Annie & Pete. My aim was to give listeners an insight into the music that motivatesme to record and also to showcase my own material, including some exclusive works. The overwhelmingphilosophy behind the mix wasto represent what I play on a regular basis on my weekly travels aroundthe world. The mix was recorded in a single take on a standard CDJ set-up, with the majority of tracks being edited to help keep a consistent energy throughout the mix. I hope you enjoy my selection and all the best to all upcoming producers & DJ's engaging in their passion for music x". Duke Dumont, January 2013. This show is part 2 of a 4 part series and available to listen to again via the iPlayer until Friday 1st February, alongside Pete Tong's Future Stars Essential Mix from Perseus & Jonas Rathsman.
EPISODE
http://www.bbc.co.uk/iplayer/episode/b01plbw4/BBC_Radio_1s_Essential_Mix_Future_Stars_of_2013_Duke_Dumont/
Atom "covr" contains: 1 piece of artwork
If it's not possible to export/import directly we could use the output above to parse the data back into their specific fields via individual commands.
Example of the commands that can be used.
E:\iPlayer Recordings>"E:\iPlayer Recordings\AtomicParsley.exe"
AtomicParlsey sets metadata into MPEG-4 files & derivatives supporting 3 tag
schemes: iTunes-style, 3GPP assets & ISO defined copyright notifications.
AtomicParlsey quick help for setting iTunes-style metadata into MPEG-4 files.
General usage examples:
AtomicParsley /path/to.mp4 -T 1
AtomicParsley /path/to.mp4 -t +
AtomicParsley /path/to.mp4 --artist "Me" --artwork /path/to/art.jpg
Atomicparsley /path/to.mp4 --albumArtist "You" --podcastFlag true
Atomicparsley /path/to.mp4 --stik "TV Show" --advisory explicit
Getting information about the file & tags:
-T --test Test file for mpeg4-ishness & print atom tree
-t --textdata Prints tags embedded within the file
-E --extractPix Extracts pix to the same folder as the mpeg-4 file
Setting iTunes-style metadata tags
--artist (string) Set the artist tag
--title (string) Set the title tag
--album (string) Set the album tag
--genre (string) Genre tag (see --longhelp for more info)
--tracknum (num)[/tot] Track number (or track number/total tracks)
--disk (num)[/tot] Disk number (or disk number/total disks)
--comment (string) Set the comment tag
--year (num|UTC) Year tag (see --longhelp for "Release Date")
--lyrics (string) Set lyrics (not subject to 256 byte limit)
--composer (string) Set the composer tag
--copyright (string) Set the copyright tag
--grouping (string) Set the grouping tag
--artwork (/path) Set a piece of artwork (jpeg or png only)
--bpm (number) Set the tempo/bpm
--albumArtist (string) Set the album artist tag
--compilation (boolean) Set the compilation flag (true or false)
--advisory (string*) Content advisory (*values: 'clean', 'explicit')
--stik (string*) Sets the iTunes "stik" atom (see --longhelp)
--description (string) Set the description tag
--TVNetwork (string) Set the TV Network name
--TVShowName (string) Set the TV Show name
--TVEpisode (string) Set the TV episode/production code
--TVSeasonNum (number) Set the TV Season number
--TVEpisodeNum (number) Set the TV Episode number
--podcastFlag (boolean) Set the podcast flag (true or false)
--category (string) Sets the podcast category
--keyword (string) Sets the podcast keyword
--podcastURL (URL) Set the podcast feed URL
--podcastGUID (URL) Set the episode's URL tag
--purchaseDate (UTC) Set time of purchase
--encodingTool (string) Set the name of the encoder
--gapless (boolean) Set the gapless playback flag
Deleting tags
Set the value to "": --artist "" --stik "" --bpm ""
To delete (all) artwork: --artwork REMOVE_ALL
manually removal: --manualAtomRemove "moov.udta.meta.ilst.ATOM"
More detailed iTunes help is available with AtomicParsley --longhelp
Setting 3gp assets into 3GPP & derivative files: see --3gp-help
Setting copyright notices for all files: see --ISO-help
For file-level options & padding info: see --file-help
Setting custom private tag extensions: see --uuid-help
----------------------------------------------------------------------
Sorry for the long answer, but it's possible to do with some scripting but I'd restore the metadata manually first to see if the file will actually still play.