[FFmpeg-devel] MP3 streaming/seeking broken in new Chrome release using newer ffmpeg

Andrew Armstrong phplasma at gmail.com
Thu Sep 10 12:35:21 CEST 2015


Hello,

A recent Chrome update today has caused seeking in audio files streamed on
the web (eg, via SoundCloud and others) to no longer work. Instead, the
file is slowly buffered until the required position in the data stream is
reached.

I added some notes about this problem at the Chrome bug report list at
https://code.google.com/p/chromium/issues/detail?id=530043

I'm not sure how to directly test this in the ffmpeg toolset, perhaps it
has been corrected in a recent commit? Please see below for my analysis.


*ANALYSIS*
ffmpeg has been updated in the new Chrome release. Various mp3 seeking
commits were included that made large changes, breaking this feature. Other
commits have since been added that have not been merged in, I do not know
if these fix the issue - potentially.

I noticed a new seek "mode" was added to ffmpeg for mp3's that causes
seeking to either by disabled or use the "slow but accurate" mode of
reading data until the byte position is available, instead of causing a
seek like before.

This commit, which was not part of the merge, is also of interest
https://github.com/FFmpeg/FFmpeg/commit/c43bd08f8b043df7e18110e5344283c37b8380c1

*DETAILS*
I noticed that ffmpeg was updated, and ffmpeg had a lot of changes
regarding mp3 seeking, and more changes after the commit that Chrome merged.

1. Chrome stable release diff:
https://chromium.googlesource.com/chromium/src/+log/44.0.2403.157..45.0.2454.85?pretty=fuller&n=10000

2.These are the ffmpeg DEPS submodule versions
44x ffmpeg deps: ffmpeg cc2ec2825b0cc25cf27c5843847e7028c1cdb075
45x ffmpeg deps: ffmpeg 833732528c1873f37b490b289eeaded2ae86349c

3. Diff of ffmpeg from the previous stable release to this one:
https://chromium.googlesource.com/chromium/third_party/ffmpeg.git/+log/cc2ec2825b0cc25cf27c5843847e7028c1cdb075..833732528c1873f37b490b289eeaded2ae86349c

4. Commits affecting mp3 seeking in this diff:
avformat/mp3: large id3 tags break concatenated file detection
https://chromium.googlesource.com/chromium/third_party/ffmpeg.git/+/537ab680534e53bd298ba3f62d4aabb56afcd403

avformat/mp3dec: fix gapless audio when seeking in CBR mode
https://chromium.googlesource.com/chromium/third_party/ffmpeg.git/+/92eef26e67ea8d2265854594344f8db17b9ce299

avformat/mp3dec: Allow forcing the use of the xing TOC for CBR files
https://chromium.googlesource.com/chromium/third_party/ffmpeg.git/+/a742a0536dbb8b5a280b21ffd76c8b4acdbd20a6

avformat/mp3dec: offset seek index to end of id3v2 tag
https://chromium.googlesource.com/chromium/third_party/ffmpeg.git/+/8b76c0eb561b0313e2a27950fe9d2bc5e4780dd8

avformat/mp3: skip junk at the beginning of mp3 files
https://chromium.googlesource.com/chromium/third_party/ffmpeg.git/+/2b3e9bbfb529e6bde238aeb511b55ebe461664c8

avformat/mp3dec: allow enabling generic seek mode
https://chromium.googlesource.com/chromium/third_party/ffmpeg.git/+/c3a73666ad1eee93e49f25efae30fda5556c228e

5. I notice that further commits, that were not merged, have been made to
ffmpeg seeking at
https://github.com/FFmpeg/FFmpeg/commit/c43bd08f8b043df7e18110e5344283c37b8380c1

Regards,
Andrew


More information about the ffmpeg-devel mailing list