New issue
Advanced search Search tips

Issue 902634 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Dec 12
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug-Regression



Sign in to add a comment

Sound have serious distortion when play AVI-DivX format video

Project Member Reported by yuhsuan@chromium.org, Nov 7

Issue description

Chrome Version: 71.0.3578.8 (Official Build) unknown (64-bit)
OS: ChromeOS (eve-release/R71-11151.4.0)

What steps will reproduce the problem?
Play AVI-DivX format video via default video player.

What is the expected result?
Should play normal

What happens instead?
Find sound have serious distortion


The issue is from b/118782387.
I can reproduce it and it is like a regression. It works fine on R69 but fails on R70.
The mp3 extracted from this file can play normally. So I think it is a problem about converting file format on Chrome.
 
DivX-Avril Lavigne.avi
8.3 MB Download
Components: -Internals>Media>Audio Internals>Media>FFmpeg
Owner: dalecur...@chromium.org
Status: Assigned (was: Untriaged)
Will take a look.
Cc: chcunningham@chromium.org
Fun, this also triggers:

[204813:204813:1113/164552.996725:FATAL:video_decode_stats_recorder.cc(33)] Check failed: features->profile != VIDEO_CODEC_PROFILE_UNKNOWN (-1 vs. -1)

Cc: dalecur...@chromium.org
Owner: tmathmeyer@chromium.org
This is due to the avi demuxer spitting out packets with a pos value of -1 which we consider to be before the last packet and thus drop them:

[1:16:1113/171844.572736:ERROR:ffmpeg_demuxer.cc(384)] packet_pos=10260 vs -9223372036854775808
[1:16:1113/171844.573345:ERROR:ffmpeg_demuxer.cc(384)] packet_pos=-1 vs 10260
[1:16:1113/171844.573433:ERROR:ffmpeg_demuxer.cc(387)] Dropped packet with out of order position
[1:16:1113/171844.573722:ERROR:ffmpeg_demuxer.cc(384)] packet_pos=-1 vs 10260
[1:16:1113/171844.573835:ERROR:ffmpeg_demuxer.cc(387)] Dropped packet with out of order position
[1:16:1113/171844.574099:ERROR:ffmpeg_demuxer.cc(384)] packet_pos=-1 vs 10260
[1:16:1113/171844.574190:ERROR:ffmpeg_demuxer.cc(387)] Dropped packet with out of order position
[1:16:1113/171844.574372:ERROR:ffmpeg_demuxer.cc(384)] packet_pos=-1 vs 10260
[1:16:1113/171844.574448:ERROR:ffmpeg_demuxer.cc(387)] Dropped packet with out of order position
[1:16:1113/171844.574623:ERROR:ffmpeg_demuxer.cc(384)] packet_pos=-1 vs 10260
[1:16:1113/171844.574699:ERROR:ffmpeg_demuxer.cc(387)] Dropped packet with out of order position
[1:16:1113/171844.574873:ERROR:ffmpeg_demuxer.cc(384)] packet_pos=-1 vs 10260
[1:16:1113/171844.574949:ERROR:ffmpeg_demuxer.cc(387)] Dropped packet with out of order position
[1:16:1113/171844.575143:ERROR:ffmpeg_demuxer.cc(384)] packet_pos=-1 vs 10260
[1:16:1113/171844.575216:ERROR:ffmpeg_demuxer.cc(387)] Dropped packet with out of order position
[1:16:1113/171844.575381:ERROR:ffmpeg_demuxer.cc(384)] packet_pos=-1 vs 10260
[1:16:1113/171844.575460:ERROR:ffmpeg_demuxer.cc(387)] Dropped packet with out of order position
[1:16:1113/171844.575627:ERROR:ffmpeg_demuxer.cc(384)] packet_pos=-1 vs 10260
[1:16:1113/171844.575703:ERROR:ffmpeg_demuxer.cc(387)] Dropped packet with out of order position
[1:16:1113/171844.575867:ERROR:ffmpeg_demuxer.cc(384)] packet_pos=-1 vs 10260
[1:16:1113/171844.575944:ERROR:ffmpeg_demuxer.cc(387)] Dropped packet with out of order position
[1:16:1113/171844.576107:ERROR:ffmpeg_demuxer.cc(384)] packet_pos=-1 vs 10260
[1:16:1113/171844.576184:ERROR:ffmpeg_demuxer.cc(387)] Dropped packet with out of order position
[1:16:1113/171844.576349:ERROR:ffmpeg_demuxer.cc(384)] packet_pos=-1 vs 10260
[1:16:1113/171844.576426:ERROR:ffmpeg_demuxer.cc(387)] Dropped packet with out of order position
[1:16:1113/171844.576587:ERROR:ffmpeg_demuxer.cc(384)] packet_pos=-1 vs 10260
[1:16:1113/171844.576668:ERROR:ffmpeg_demuxer.cc(387)] Dropped packet with out of order position
[1:16:1113/171844.576841:ERROR:ffmpeg_demuxer.cc(384)] packet_pos=-1 vs 10260
[1:16:1113/171844.576918:ERROR:ffmpeg_demuxer.cc(387)] Dropped packet with out of order position
[1:16:1113/171844.577121:ERROR:ffmpeg_demuxer.cc(384)] packet_pos=-1 vs 10260
[1:16:1113/171844.577201:ERROR:ffmpeg_demuxer.cc(387)] Dropped packet with out of order position
[1:16:1113/171844.577384:ERROR:ffmpeg_demuxer.cc(384)] packet_pos=-1 vs 10260
[1:16:1113/171844.577439:ERROR:ffmpeg_demuxer.cc(387)] Dropped packet with out of order position
[1:16:1113/171844.577559:ERROR:ffmpeg_demuxer.cc(384)] packet_pos=-1 vs 10260
[1:16:1113/171844.577610:ERROR:ffmpeg_demuxer.cc(387)] Dropped packet with out of order position
[1:16:1113/171844.577845:ERROR:ffmpeg_demuxer.cc(384)] packet_pos=-1 vs 10260
[1:16:1113/171844.577908:ERROR:ffmpeg_demuxer.cc(387)] Dropped packet with out of order position
[1:16:1113/171844.578030:ERROR:ffmpeg_demuxer.cc(384)] packet_pos=12768 vs 10260

The attached patch ignores -1 packets and fixes the dropping issue, but the correct fix would be to update the pos value correctly for avi files... if such a thing is possible. We found it wasn't for ogg files :/
fix.patch
1.8 KB Download
Actually this is a better fix, but defer to Ted on the right thing here. We want to make sure this doesn't break background-video-decode-disable.

Hard to debug these since we expect to drop these packets sometimes, so the logs are disabled :/
fix2.patch
1.4 KB Download
Project Member

Comment 5 by bugdroid1@chromium.org, Nov 28

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6abddce1cf306a668c2e48ab7c364436e084817c

commit 6abddce1cf306a668c2e48ab7c364436e084817c
Author: Ted Meyer <tmathmeyer@chromium.org>
Date: Wed Nov 28 23:09:54 2018

Special case when packet->pos==-1

Sometimes video containers report audio packet timestamps as -1,
which was triggering the packet drop code from background track seeking.

Bug:  902634 
Change-Id: I2b74fde01f9f2e06aeaf5fa4c2a3a1a4af8ead5d
Reviewed-on: https://chromium-review.googlesource.com/c/1352579
Commit-Queue: Ted Meyer <tmathmeyer@chromium.org>
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#611923}
[modify] https://crrev.com/6abddce1cf306a668c2e48ab7c364436e084817c/media/filters/ffmpeg_demuxer.cc
[modify] https://crrev.com/6abddce1cf306a668c2e48ab7c364436e084817c/media/filters/ffmpeg_demuxer_unittest.cc
[modify] https://crrev.com/6abddce1cf306a668c2e48ab7c364436e084817c/media/test/data/README.md
[add] https://crrev.com/6abddce1cf306a668c2e48ab7c364436e084817c/media/test/data/negative-audio-timestamps.avi

> [204813:204813:1113/164552.996725:FATAL:video_decode_stats_recorder.cc(33)] Check failed: features->profile != VIDEO_CODEC_PROFILE_UNKNOWN (-1 vs. -1)


Is this somehow fixed? Should we add an mpeg4 codec profile?
@chris No, I didn't make any changes that would affect that.

I don't know if there would be any negative ramifications to adding a codec profile, but I also do not know where that would be added, or what it would entail. Is is just adding an element to an enum+mojom and a new switch case? or something more involved?

It might also be good to split that off into a different bug?
Done (Issue 910731)
Status: Verified (was: Assigned)
Verified, thanks!

Sign in to add a comment