Thanks very much for the documented examples which let me construct:
ffmpeg -i h:\mp3t\bab-320k.m4a -c:v copy -c:a libmp3lame -b:a 128k -id3v2_version 3 -write_id3v1 1 -y h:/mp3t/bab-320k.mp3
(excuse my hard-coded file names). This should get me part of the way towards my 'tidy up' by enabling me to save all files (mostly now at 320k bps) at a standard and more realistic (for me) 128k bps compression.
One tiny problem though which much searching has not helped ... the resultant file (above) does indeed contain metadata, but one important field the "comment" seems to get truncated to about 30 chars. Can anyone point me at some method of relaxing this limitation? Ta.
The command writes both ID3v2 and ID3v1 tags. if you don't know what that is about, Google is your friend The truncated comment is the ID3v1 version, which has a length limit. Which one you see, if any, depends on the application or player you use. Remove and/or experiment with the -id3v2_version and -write_id3v1 options to see if you can get tags you like better.
Thanks. I've spent a while on further tests, so just to complete this post .....
I think this is an ffmpeg bug because:
- I can find multiple online advice saying that "-id3v2_version 3 -write_id3v1 1" is what is needed for Windows metedata.
- Experimenting with various other values of both did not improve things.
- The console output from my ffmpeg command (see original post) shows the "comment" read correctly from the source file and the same "comment" apparently written to the .mp3 output file. But only the first 30 chars do get written.
In doing this (and in practice) I'm relying on Windows explorer to see the metadata. It shows (whether correct or not) the results that I describe above.
I looked at using exiftool to copy the metadata after the conversion, but unfortunately exiftool can't (yet) write metadata to .mp3 files. Shame!
it would be easier to do the transcoding of m4a files to mp3s using
foobar2000. that way you can set the ID3 tags how you like and also perform easier to control settings such as replaygain. you'll need to download the LAME encoder but that's easy to find at
rarewares.org.
Also take a look at the UNSYNCEDLYRICS tag. It seems to be better supported now in modern players than the COMMENT tag (I actually write the same info to both).
You can also try mapping tags individually with ffmpeg (rather than just copying). It's using LAME underneath, but I think it would defeat the purpose of the exercise. Windows Explorer is another limitation. I pretty sure it still doesn't grok ID3v2.4 or all of ID3v2.3, among other things. I suggest you get Mp3Tag or similar so you can properly explore what's in your files. You will see that both ID3v2 and ID3v1 comments are written. The problem is getting the desired value to display in your particular application.
I've washed my hands of all this as far as get_iplayer is concerned. The examples I provide are a least common denominator approach you can implement with ffmpeg, which comes with get_iplayer for Windows, and execute via get_iplayer. There are much better methods, to say the least.
Thanks both. Don't get me wrong, I'm grateful for the starting point (ffmpeg and all that) and for this forum .... and for the pointer to foobar2000. My computing is normally in other directions so am not up to speed with everything audio, tags etc. FYI, foobar2000 can indeed see the complete "comment" metadata on my converted mp3 file. Strange that Windows Explorer can't. Even though it can see all the "comment" on the m4a precursor file.
I'll look at using foobar2000 a bit more, and mp3tag.
You'll not go wrong with both foobar and Mp3tag if you're happy to spend a little bit of time getting used to them. I've used both for over 12 years and imo nothing compares on Windows. Mp3tag is the ultimate tagging program; hugely powerful.
Good luck.