[FFmpeg-user] Reading Tempo/BPM information from audio files
Adam Harries
harries.adam at gmail.com
Mon Sep 17 15:31:31 EEST 2018
> The mp3 encoder you used wrote the BPM as a comment (that
> may or may not be correct) into the file you read with FFmpeg,
> FFmpeg shows the comment.
It definitely didn't - if you see my sample output, it (correctly) reports
the id3v2 TBPM tag, which contains the bpm data.
I've attached .txt files showing the output from running ffmpeg on an mp3
file, and on an m4a file, as well as the output from id3v2 and mp4info. As
you can see from the files, both the mp3 and m4a files have bpm metadata as
explicit tags (TBPM in the case of mp3, and BPM in the case of m4a).
My question relates to whether ffmpeg can read the BPM tag from m4a. I
would ideally like to use ffmpeg as a tool to read audio metadata, as
mp4info and other tools are not entirely cross platform, while ffmpeg is
available on (roughly) every single platform available.
Thanks,
Adam
On Mon, Sep 17, 2018 at 12:35 PM Carl Eugen Hoyos <ceffmpeg at gmail.com>
wrote:
> 2018-09-17 13:24 GMT+02:00, Adam Harries <harries.adam at gmail.com>:
>
> > I'm hoping to use ffmpeg as a generic, cross-platform, tool to read
> > metadata from audio files - specifically title and BPM information.
> >
> > From what I cant tell, ffmpeg easily supports this for mp3 files.
>
> The mp3 encoder you used wrote the BPM as a comment (that
> may or may not be correct) into the file you read with FFmpeg,
> FFmpeg shows the comment.
>
> > For example, the following command:
> >
> > ffmpeg -i ~/Music/Archive.org/Jumpin\'\ at\ the\ Woodside\ -\ Count\
> > Basie\ And\ His\ Orchestra.mp3 -f ffmetadata jumpin_metadata.txt
> >
> > Produces useful output of the (shortened) form:
> > Input #0, mp3, from '/home/adam/Music/Archive.org/Jumpin' at the
> > Woodside - Count Basie And His Orchestra.mp3':
> > Metadata:
> > album : Jumpin' at the Woodside
> > title : Jumpin' at the Woodside
> > TLEN : 196.48
> > artist : Count Basie And His Orchestra;Count Basie
> > track : 01
> > encoder : LAME 64bits version 3.99.5 (http://lame.sf.net)
> > TBPM : 2
> >
> > (Where TBPM is the bpm tag).
> >
> > Unfortunately, when I try to use a similar command with any other audio
> > format (such as ALAC, FLAC, or M4A), ffmpeg doesn't appear to return any
> > BPM information.
>
> > This is true even for files which I can verify (with other
> > tools) that they have bpm/tempo metadata attached.
>
> Command line and complete, uncut console output missing /
> please provide such a file.
>
> Carl Eugen
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
-------------- next part --------------
;FFMETADATA1
major_brand=M4A
minor_version=0
compatible_brands=M4A mp42isom
account_id=harries.adam at gmail.com
iTunSMPB= 00000000 00000840 00000250 000000000068F970 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
iTunNORM= 0000022F 00000236 0000215E 000031B2 00015CD8 00015CD8 000062DD 0000552D 0001E2D0 0001C4CA
title=Airmail Special
artist=Michael Gamble & The Rhythm Serenaders
album_artist=Michael Gamble
album=Michael Gamble & the Rhythm Serenaders
comment= [ed\#{"algs"\#{"ffmpeg-naive"\#249}}\#de]
genre=Jazz
date=2016-08-12T07:00:00Z
track=19/23
compilation=0
copyright=℗ 2016 Organic Records
purchase_date=2017-10-14 16:31:54
media_type=1
rating=0
gapless_playback=0
encoder=Lavf57.83.100
-------------- next part --------------
id3v1 tag info for /home/adam/Music/Archive.org/Jumpin' at the Woodside - Count Basie And His Orchestra.mp3:
Title : Jumpin' at the Woodside Artist: Count Basie And His Orchestra;
Album : Jumpin' at the Woodside Year: , Genre: Unknown (255)
Comment: https://archive.org/details/ Track: 1
id3v2 tag info for /home/adam/Music/Archive.org/Jumpin' at the Woodside - Count Basie And His Orchestra.mp3:
TALB (Album/Movie/Show title): Jumpin' at the Woodside
TIT2 (Title/songname/content description): Jumpin' at the Woodside
TLEN (Length): 196.48
TPE1 (Lead performer(s)/Soloist(s)): Count Basie And His Orchestra;Count Basie
TRCK (Track number/Position in set): 01
TSSE (Software/Hardware and settings used for encoding): LAME 64bits version 3.99.5 (http://lame.sf.net)
APIC (Attached picture): ()[, 0]: image/jpeg, 102729 bytes
TBPM (BPM (beats per minute)): 2
COMM (Comments): ()[]: [ed#{"algs"#{"ffmpeg-naive"#240}}#de]
-------------- next part --------------
mp4info version -r
/home/adam/Music/iTunes/iTunes Media/Music/Michael Gamble/Michael Gamble & the Rhythm Serenaders/19 Airmail Special.m4a:
Track Type Info
1 audio MPEG-4 AAC LC, 156.061 secs, 261 kbps, 44100 Hz
Name: Airmail Special
Artist: Michael Gamble & The Rhythm Serenaders
Release Date: 2016-08-12T07:00:00Z
Album: Michael Gamble & the Rhythm Serenaders
Track: 19 of 23
GenreType: 9, Jazz
BPM: 249
Comments: [ed#{"algs"#{"ffmpeg-naive"#249}}#de]
Part of Compilation: no
Part of Gapless Album: no
Cover Art pieces: 1
Album Artist: Michael Gamble
Copyright: ℗ 2016 Organic Records
Content Rating: None
Media Type: Normal
Content ID: 1121446638
Artist ID: 416250816
Playlist ID: 1121446386
Genre ID: 11
xid: SyntaxRecords:isrc:USETB1600414
iTunes Account: harries.adam at gmail.com
Purchase Date: 2017-10-14 16:31:54
iTunes Store Country: United Kingdom
-------------- next part --------------
;FFMETADATA1
album=Jumpin' at the Woodside
title=Jumpin' at the Woodside
TLEN=196.48
artist=Count Basie And His Orchestra\;Count Basie
track=01
comment= [ed\#{"algs"\#{"ffmpeg-naive"\#240}}\#de]
TBPM=2
encoder=Lavf57.83.100
More information about the ffmpeg-user
mailing list