Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MOV containing PCM - playback speed too high #1592

Closed
ened opened this issue Jun 14, 2016 · 5 comments
Closed

MOV containing PCM - playback speed too high #1592

ened opened this issue Jun 14, 2016 · 5 comments
Assignees

Comments

@ened
Copy link
Contributor

ened commented Jun 14, 2016

Playing back a certain MOV file through ExoPlayer will result in the playback being too fast.

The code to instantiate ExoPlayer is:

mediaPlayer = ExoPlayer.Factory.newInstance(2, 5000, 15000);

Allocator allocator = new DefaultAllocator(BUFFER_SEGMENT_SIZE);

TransferListener listener = new DefaultBandwidthMeter(uiHandler, (elapsedMs, bytes, bitrate)
        -> bandwidthSample.setText(String.format(Locale.getDefault(), "bitrate: %d kb/s", bitrate / 8 / 1000)));

DataSource dataSource = new DefaultUriDataSource(this, listener, "MyApp/1.0");

ExtractorSampleSource sampleSource = new ExtractorSampleSource(getIntent().getData(),
        dataSource, allocator, BUFFER_SEGMENT_COUNT * BUFFER_SEGMENT_SIZE, 5, new Handler(), (sourceId, e) -> {
    Log.e(TAG, "failed loading source: " + sourceId, e);
}, -1, new Mp4Extractor());

MediaCodecVideoTrackRenderer videoRenderer =
        new MediaCodecVideoTrackRenderer(this, sampleSource, MediaCodecSelector.DEFAULT,
                MediaCodec.VIDEO_SCALING_MODE_SCALE_TO_FIT, 0, new Handler(), new MediaCodecVideoTrackRenderer.EventListener() {
            @Override
            @DebugLog
            public void onDroppedFrames(int count, long elapsed) {

            }

            @Override
            @DebugLog
            public void onVideoSizeChanged(int width, int height, int unappliedRotationDegrees, float pixelWidthHeightRatio) {
                surfaceView.adjustToVideoSize(width, height);
            }

            @Override
            @DebugLog
            public void onDrawnToSurface(Surface surface) {

            }

            @Override
            @DebugLog
            public void onDecoderInitializationError(MediaCodecTrackRenderer.DecoderInitializationException e) {

            }

            @Override
            @DebugLog
            public void onCryptoError(MediaCodec.CryptoException e) {

            }

            @Override
            @DebugLog
            public void onDecoderInitialized(String decoderName, long elapsedRealtimeMs, long initializationDurationMs) {

            }
        }, -1);

MediaCodecAudioTrackRenderer audioRenderer = new MediaCodecAudioTrackRenderer(
        sampleSource, MediaCodecSelector.DEFAULT);

mediaPlayer.prepare(videoRenderer, audioRenderer);

mediaPlayer.addListener(new ExoPlayer.Listener() {
    @Override
    @DebugLog
    public void onPlayerStateChanged(boolean playWhenReady, int playbackState) {
        progressBar.setVisibility(playbackState == ExoPlayer.STATE_BUFFERING ? View.VISIBLE : View.GONE);
    }

    @Override
    @DebugLog
    public void onPlayWhenReadyCommitted() {

    }

    @Override
    @DebugLog
    public void onPlayerError(ExoPlaybackException error) {

    }
});

mediaPlayer.sendMessage(videoRenderer, MediaCodecVideoTrackRenderer.MSG_SET_SURFACE, holder.getSurface());

mediaPlayer.setPlayWhenReady(true);

Sample video has been sent over to dev.exoplayer..

The issue occurs on a Nexus 6, running Android 6.0.1. It also occurs on a Samsung S5, Android 6.0.1.

Exo Player version: d7b8256

Nothing crashes, therefore I can only offer adb logcat messages which occur during the playback:

02-04 16:22:20.470 16868 16868 I ExoPlayerImpl: Init 1.5.8
02-04 16:22:20.474 16868 16868 V ExoPlayerActivity: ⇢ onPlayerStateChanged(playWhenReady=true, playbackState=1)
02-04 16:22:20.474 16868 16868 V ExoPlayerActivity: ⇠ onPlayerStateChanged [0ms]
02-04 16:22:20.496 16868 16868 V ExoPlayerActivity: ⇢ onPlayerStateChanged(playWhenReady=true, playbackState=2)
02-04 16:22:20.496 16868 16868 V ExoPlayerActivity: ⇠ onPlayerStateChanged [0ms]
02-04 16:22:20.496 16868 16868 V ExoPlayerActivity: ⇢ onPlayWhenReadyCommitted()
02-04 16:22:20.497 16868 16868 V ExoPlayerActivity: ⇠ onPlayWhenReadyCommitted [0ms]
02-04 16:22:20.531 16868 17015 D OpenGLRenderer: endAllStagingAnimators on 0x962c8200 (RippleDrawable) with handle 0x9cc16760
02-04 16:22:20.546 16868 16868 V ExoPlayerActivity: ⇢ onPlayerStateChanged(playWhenReady=true, playbackState=3)
02-04 16:22:20.547 16868 16868 V ExoPlayerActivity: ⇠ onPlayerStateChanged [0ms]
02-04 16:22:20.561 16868 19682 I OMXClient: Using client-side OMX mux.
02-04 16:22:20.833 16868 19681 I MediaCodec: [OMX.qcom.video.decoder.avc] setting surface generation to 17272836
02-04 16:22:20.850 16868 19682 D SurfaceUtils: set up nativeWindow 0x9e187a08 for 1920x1080, color 0x7fa30c04, rotation 0, usage 0x42002900
02-04 16:22:20.863 16868 19694 I OMXClient: Using client-side OMX mux.
02-04 16:22:20.867 16868 16868 V ExoPlayerActivity: ⇢ onDecoderInitialized(decoderName="OMX.qcom.video.decoder.avc", elapsedRealtimeMs=6462915, initializationDurationMs=303)
02-04 16:22:20.868 16868 16868 V ExoPlayerActivity: ⇠ onDecoderInitialized [0ms]
02-04 16:22:20.876 16868 19694 E OMXMaster: A component of name 'OMX.qcom.audio.decoder.aac' already exists, ignoring this one.
02-04 16:22:20.879 16868 19682 D SurfaceUtils: set up nativeWindow 0x9e187a08 for 1920x1088, color 0x7fa30c04, rotation 0, usage 0x42002900
02-04 16:22:21.002 16868 16868 V ExoPlayerActivity: ⇢ onVideoSizeChanged(width=1920, height=1080, unappliedRotationDegrees=0, pixelWidthHeightRatio=1.0)
02-04 16:22:21.003 16868 16868 V VideoSurfaceView: ⇢ adjustToVideoSize(width=1920, height=1080)
02-04 16:22:21.003 16868 16868 V VideoSurfaceView: ⇢ getRealSize()
02-04 16:22:21.004 16868 16868 V VideoSurfaceView: ⇠ getRealSize [0ms] = Point(1440, 2560)
02-04 16:22:21.005 16868 16868 V VideoSurfaceView: ⇠ adjustToVideoSize [1ms]
02-04 16:22:21.006 16868 16868 V ExoPlayerActivity: ⇠ onVideoSizeChanged [2ms]
02-04 16:22:21.006 16868 16868 V ExoPlayerActivity: ⇢ onDrawnToSurface(surface=Surface(name=null)/@0xd0b1d0d)
02-04 16:22:21.007 16868 16868 V ExoPlayerActivity: ⇠ onDrawnToSurface [0ms]
02-04 16:22:21.007 16868 16868 V ExoPlayerActivity: ⇢ onPlayerStateChanged(playWhenReady=true, playbackState=4)
02-04 16:22:21.008 16868 16868 V ExoPlayerActivity: ⇠ onPlayerStateChanged [0ms]
02-04 16:22:21.017 16868 19675 E AudioTrack: Discontinuity detected [expected 256000, got 512000]
02-04 16:22:21.038 16868 16868 V VideoListActivity: ⇢ onSaveInstanceState(outState=Bundle[{}])
02-04 16:22:21.038 16868 16868 V VideoListActivity: ⇠ onSaveInstanceState [0ms]
02-04 16:22:21.039 16868 16868 V VideoListActivity: ⇢ onStop()
02-04 16:22:21.039 16868 16868 V VideoListActivity: ⇠ onStop [0ms]
02-04 16:22:21.252 16868 19675 E AudioTrack: Discontinuity detected [expected 756000, got 1000000]
02-04 16:22:21.512 16868 19675 E AudioTrack: Discontinuity detected [expected 1256000, got 1512000]
02-04 16:22:21.758 16868 19675 E AudioTrack: Discontinuity detected [expected 1756000, got 2000000]
02-04 16:22:22.002 16868 19675 E AudioTrack: Discontinuity detected [expected 2256000, got 2512000]
02-04 16:22:22.261 16868 19675 E AudioTrack: Discontinuity detected [expected 2756000, got 3000000]
02-04 16:22:22.495 16868 19675 E AudioTrack: Discontinuity detected [expected 3256000, got 3512000]
02-04 16:22:22.743 16868 19675 E AudioTrack: Discontinuity detected [expected 3756000, got 4000000]
02-04 16:22:23.004 16868 19675 E AudioTrack: Discontinuity detected [expected 4256000, got 4512000]
02-04 16:22:23.243 16868 19675 E AudioTrack: Discontinuity detected [expected 4756000, got 5000000]
02-04 16:22:23.510 16868 19675 E AudioTrack: Discontinuity detected [expected 5256000, got 5512000]
02-04 16:22:23.743 16868 19675 E AudioTrack: Discontinuity detected [expected 5756000, got 6000000]
02-04 16:22:24.008 16868 19675 E AudioTrack: Discontinuity detected [expected 6256000, got 6512000]
02-04 16:22:24.253 16868 19675 E AudioTrack: Discontinuity detected [expected 6756000, got 7000000]
02-04 16:22:24.511 16868 19675 E AudioTrack: Discontinuity detected [expected 7256000, got 7512000]
02-04 16:22:24.754 16868 19675 E AudioTrack: Discontinuity detected [expected 7756000, got 8000000]
02-04 16:22:24.993 16868 19675 E AudioTrack: Discontinuity detected [expected 8256000, got 8512000]
02-04 16:22:25.262 16868 19675 E AudioTrack: Discontinuity detected [expected 8756000, got 9000000]
02-04 16:22:25.502 16868 19675 E AudioTrack: Discontinuity detected [expected 9256000, got 9512000]
02-04 16:22:25.740 16868 19675 E AudioTrack: Discontinuity detected [expected 9756000, got 10000000]
02-04 16:22:26.008 16868 19675 E AudioTrack: Discontinuity detected [expected 10256000, got 10512000]
02-04 16:22:26.243 16868 19675 E AudioTrack: Discontinuity detected [expected 10756000, got 11000000]
02-04 16:22:26.505 16868 19675 E AudioTrack: Discontinuity detected [expected 11256000, got 11512000]
02-04 16:22:26.746 16868 19675 E AudioTrack: Discontinuity detected [expected 11756000, got 12000000]
02-04 16:22:27.012 16868 19675 E AudioTrack: Discontinuity detected [expected 12256000, got 12512000]
02-04 16:22:27.247 16868 19675 E AudioTrack: Discontinuity detected [expected 12756000, got 13000000]
02-04 16:22:27.521 16868 19675 E AudioTrack: Discontinuity detected [expected 13256000, got 13512000]
02-04 16:22:27.762 16868 19675 E AudioTrack: Discontinuity detected [expected 13756000, got 14000000]
02-04 16:22:27.992 16868 19675 E AudioTrack: Discontinuity detected [expected 14256000, got 14512000]
02-04 16:22:28.257 16868 19675 E AudioTrack: Discontinuity detected [expected 14756000, got 15000000]
02-04 16:22:28.504 16868 19675 E AudioTrack: Discontinuity detected [expected 15256000, got 15512000]
02-04 16:22:28.742 16868 19675 E AudioTrack: Discontinuity detected [expected 15756000, got 16000000]
02-04 16:22:29.011 16868 19675 E AudioTrack: Discontinuity detected [expected 16256000, got 16512000]
02-04 16:22:29.241 16868 19675 E AudioTrack: Discontinuity detected [expected 16756000, got 17000000]
02-04 16:22:29.511 16868 19675 E AudioTrack: Discontinuity detected [expected 17256000, got 17512000]
02-04 16:22:29.753 16868 19675 E AudioTrack: Discontinuity detected [expected 17756000, got 18000000]
02-04 16:22:30.016 16868 19675 E AudioTrack: Discontinuity detected [expected 18256000, got 18512000]
02-04 16:22:30.249 16868 19675 E AudioTrack: Discontinuity detected [expected 18756000, got 19000000]
02-04 16:22:30.519 16868 19675 E AudioTrack: Discontinuity detected [expected 19256000, got 19512000]
02-04 16:22:30.758 16868 19675 E AudioTrack: Discontinuity detected [expected 19756000, got 20000000]
02-04 16:22:30.993 16868 19675 E AudioTrack: Discontinuity detected [expected 20256000, got 20512000]
02-04 16:22:31.261 16868 19675 E AudioTrack: Discontinuity detected [expected 20756000, got 21000000]
02-04 16:22:31.498 16868 19675 E AudioTrack: Discontinuity detected [expected 21256000, got 21512000]
02-04 16:22:31.741 16868 19675 E AudioTrack: Discontinuity detected [expected 21756000, got 22000000]
02-04 16:22:32.010 16868 19675 E AudioTrack: Discontinuity detected [expected 22256000, got 22512000]
02-04 16:22:32.245 16868 19675 E AudioTrack: Discontinuity detected [expected 22756000, got 23000000]
02-04 16:22:32.512 16868 19675 E AudioTrack: Discontinuity detected [expected 23256000, got 23512000]
02-04 16:22:32.751 16868 19675 E AudioTrack: Discontinuity detected [expected 23756000, got 24000000]
02-04 16:22:33.011 16868 19675 E AudioTrack: Discontinuity detected [expected 24256000, got 24512000]
02-04 16:22:33.252 16868 19675 E AudioTrack: Discontinuity detected [expected 24756000, got 25000000]
02-04 16:22:33.511 16868 19675 E AudioTrack: Discontinuity detected [expected 25256000, got 25512000]
02-04 16:22:33.754 16868 19675 E AudioTrack: Discontinuity detected [expected 25756000, got 26000000]
02-04 16:22:33.995 16868 19675 E AudioTrack: Discontinuity detected [expected 26256000, got 26512000]
02-04 16:22:34.262 16868 19675 E AudioTrack: Discontinuity detected [expected 26756000, got 27000000]
02-04 16:22:34.503 16868 19675 E AudioTrack: Discontinuity detected [expected 27256000, got 27512000]
02-04 16:22:34.742 16868 19675 E AudioTrack: Discontinuity detected [expected 27756000, got 28000000]
02-04 16:22:35.003 16868 19675 E AudioTrack: Discontinuity detected [expected 28256000, got 28512000]
02-04 16:22:35.240 16868 19675 E AudioTrack: Discontinuity detected [expected 28756000, got 29000000]
02-04 16:22:35.504 16868 19675 E AudioTrack: Discontinuity detected [expected 29256000, got 29512000]
02-04 16:22:35.749 16868 19675 E AudioTrack: Discontinuity detected [expected 29756000, got 30000000]
02-04 16:22:36.012 16868 19675 E AudioTrack: Discontinuity detected [expected 30256000, got 30512000]
02-04 16:22:36.255 16868 19675 E AudioTrack: Discontinuity detected [expected 30756000, got 31000000]
02-04 16:22:36.516 16868 19675 E AudioTrack: Discontinuity detected [expected 31256000, got 31512000]
02-04 16:22:36.759 16868 19675 E AudioTrack: Discontinuity detected [expected 31756000, got 32000000]
02-04 16:22:36.995 16868 19675 E AudioTrack: Discontinuity detected [expected 32256000, got 32512000]
02-04 16:22:37.258 16868 19675 E AudioTrack: Discontinuity detected [expected 32756000, got 33000000]
02-04 16:22:37.500 16868 19675 E AudioTrack: Discontinuity detected [expected 33256000, got 33512000]
02-04 16:22:37.749 16868 19675 E AudioTrack: Discontinuity detected [expected 33756000, got 34000000]
02-04 16:22:38.004 16868 19675 E AudioTrack: Discontinuity detected [expected 34256000, got 34512000]
02-04 16:22:38.240 16868 19675 E AudioTrack: Discontinuity detected [expected 34756000, got 35000000]
02-04 16:22:38.507 16868 19675 E AudioTrack: Discontinuity detected [expected 35256000, got 35512000]
02-04 16:22:38.753 16868 19675 E AudioTrack: Discontinuity detected [expected 35756000, got 36000000]
02-04 16:22:39.014 16868 19675 E AudioTrack: Discontinuity detected [expected 36256000, got 36512000]
02-04 16:22:39.252 16868 19675 E AudioTrack: Discontinuity detected [expected 36756000, got 37000000]
02-04 16:22:39.517 16868 19675 E AudioTrack: Discontinuity detected [expected 37256000, got 37512000]
02-04 16:22:39.764 16868 19675 E AudioTrack: Discontinuity detected [expected 37756000, got 38000000]
02-04 16:22:39.996 16868 19675 E AudioTrack: Discontinuity detected [expected 38256000, got 38512000]
02-04 16:22:40.261 16868 19675 E AudioTrack: Discontinuity detected [expected 38756000, got 39000000]
02-04 16:22:40.507 16868 19675 E AudioTrack: Discontinuity detected [expected 39256000, got 39512000]
02-04 16:22:40.740 16868 19675 E AudioTrack: Discontinuity detected [expected 39756000, got 40000000]
02-04 16:22:41.003 16868 19675 E AudioTrack: Discontinuity detected [expected 40256000, got 40512000]
02-04 16:22:41.247 16868 19675 E AudioTrack: Discontinuity detected [expected 40756000, got 41000000]
02-04 16:22:41.512 16868 19675 E AudioTrack: Discontinuity detected [expected 41256000, got 41512000]
02-04 16:22:41.748 16868 19675 E AudioTrack: Discontinuity detected [expected 41756000, got 42000000]
02-04 16:22:42.010 16868 19675 E AudioTrack: Discontinuity detected [expected 42256000, got 42512000]
02-04 16:22:42.251 16868 19675 E AudioTrack: Discontinuity detected [expected 42756000, got 43000000]
02-04 16:22:42.518 16868 19675 E AudioTrack: Discontinuity detected [expected 43256000, got 43512000]
02-04 16:22:42.761 16868 19675 E AudioTrack: Discontinuity detected [expected 43756000, got 44000000]
02-04 16:22:42.998 16868 19675 E AudioTrack: Discontinuity detected [expected 44256000, got 44512000]
02-04 16:22:43.260 16868 19675 E AudioTrack: Discontinuity detected [expected 44756000, got 45000000]
02-04 16:22:43.504 16868 19675 E AudioTrack: Discontinuity detected [expected 45256000, got 45512000]
02-04 16:22:43.745 16868 19675 E AudioTrack: Discontinuity detected [expected 45756000, got 46000000]
02-04 16:22:44.007 16868 19675 E AudioTrack: Discontinuity detected [expected 46256000, got 46512000]
02-04 16:22:44.250 16868 19675 E AudioTrack: Discontinuity detected [expected 46756000, got 47000000]
02-04 16:22:44.514 16868 19675 E AudioTrack: Discontinuity detected [expected 47256000, got 47512000]
02-04 16:22:44.753 16868 19675 E AudioTrack: Discontinuity detected [expected 47756000, got 48000000]
02-04 16:22:45.014 16868 19675 E AudioTrack: Discontinuity detected [expected 48256000, got 48512000]
02-04 16:22:45.260 16868 19675 E AudioTrack: Discontinuity detected [expected 48756000, got 49000000]
02-04 16:22:45.515 16868 19675 E AudioTrack: Discontinuity detected [expected 49256000, got 49512000]
02-04 16:22:45.761 16868 19675 E AudioTrack: Discontinuity detected [expected 49756000, got 50000000]
02-04 16:22:45.995 16868 19675 E AudioTrack: Discontinuity detected [expected 50256000, got 50512000]
02-04 16:22:46.259 16868 19675 E AudioTrack: Discontinuity detected [expected 50756000, got 51000000]
02-04 16:22:46.504 16868 19675 E AudioTrack: Discontinuity detected [expected 51256000, got 51512000]
02-04 16:22:46.745 16868 19675 E AudioTrack: Discontinuity detected [expected 51756000, got 52000000]
02-04 16:22:47.008 16868 19675 E AudioTrack: Discontinuity detected [expected 52256000, got 52512000]
02-04 16:22:47.244 16868 19675 E AudioTrack: Discontinuity detected [expected 52756000, got 53000000]
02-04 16:22:47.519 16868 19675 E AudioTrack: Discontinuity detected [expected 53256000, got 53512000]
02-04 16:22:47.750 16868 19675 E AudioTrack: Discontinuity detected [expected 53756000, got 54000000]
02-04 16:22:48.019 16868 19675 E AudioTrack: Discontinuity detected [expected 54256000, got 54512000]
02-04 16:22:48.257 16868 19675 E AudioTrack: Discontinuity detected [expected 54756000, got 55000000]
02-04 16:22:48.514 16868 19675 E AudioTrack: Discontinuity detected [expected 55256000, got 55512000]
02-04 16:22:48.765 16868 19675 E AudioTrack: Discontinuity detected [expected 55756000, got 56000000]
02-04 16:22:49.005 16868 19675 E AudioTrack: Discontinuity detected [expected 56256000, got 56512000]
02-04 16:22:49.268 16868 19675 E AudioTrack: Discontinuity detected [expected 56756000, got 57000000]
02-04 16:22:49.499 16868 19675 E AudioTrack: Discontinuity detected [expected 57256000, got 57512000]
02-04 16:22:49.743 16868 19675 E AudioTrack: Discontinuity detected [expected 57756000, got 58000000]
02-04 16:22:50.010 16868 19675 E AudioTrack: Discontinuity detected [expected 58256000, got 58512000]
02-04 16:22:50.247 16868 19675 E AudioTrack: Discontinuity detected [expected 58756000, got 59000000]
02-04 16:22:50.515 16868 19675 E AudioTrack: Discontinuity detected [expected 59256000, got 59512000]
02-04 16:22:50.750 16868 19675 E AudioTrack: Discontinuity detected [expected 59756000, got 60000000]
02-04 16:22:51.016 16868 19675 E AudioTrack: Discontinuity detected [expected 60256000, got 60512000]
02-04 16:22:51.251 16868 19675 E AudioTrack: Discontinuity detected [expected 60756000, got 61000000]
02-04 16:22:51.519 16868 19675 E AudioTrack: Discontinuity detected [expected 61256000, got 61512000]
02-04 16:22:51.762 16868 19675 E AudioTrack: Discontinuity detected [expected 61756000, got 62000000]
02-04 16:22:51.995 16868 19675 E AudioTrack: Discontinuity detected [expected 62256000, got 62512000]
02-04 16:22:52.267 16868 19675 E AudioTrack: Discontinuity detected [expected 62756000, got 63000000]
02-04 16:22:52.509 16868 19675 E AudioTrack: Discontinuity detected [expected 63256000, got 63512000]
02-04 16:22:52.750 16868 19675 E AudioTrack: Discontinuity detected [expected 63756000, got 64000000]
02-04 16:22:53.006 16868 19675 E AudioTrack: Discontinuity detected [expected 64256000, got 64512000]
02-04 16:22:53.260 16868 19675 E AudioTrack: Discontinuity detected [expected 64756000, got 65000000]
02-04 16:22:53.519 16868 19675 E AudioTrack: Discontinuity detected [expected 65256000, got 65512000]
02-04 16:22:53.757 16868 19675 E AudioTrack: Discontinuity detected [expected 65756000, got 66000000]
02-04 16:22:54.022 16868 19675 E AudioTrack: Discontinuity detected [expected 66256000, got 66512000]
02-04 16:22:54.261 16868 19675 E AudioTrack: Discontinuity detected [expected 66756000, got 67000000]
02-04 16:22:54.519 16868 19675 E AudioTrack: Discontinuity detected [expected 67256000, got 67512000]
02-04 16:22:54.760 16868 19675 E AudioTrack: Discontinuity detected [expected 67756000, got 68000000]
02-04 16:22:55.004 16868 19675 E AudioTrack: Discontinuity detected [expected 68256000, got 68512000]
02-04 16:22:55.269 16868 19675 E AudioTrack: Discontinuity detected [expected 68756000, got 69000000]
02-04 16:22:55.503 16868 19675 E AudioTrack: Discontinuity detected [expected 69256000, got 69512000]
02-04 16:22:55.745 16868 19675 E AudioTrack: Discontinuity detected [expected 69756000, got 70000000]
02-04 16:22:56.016 16868 19675 E AudioTrack: Discontinuity detected [expected 70256000, got 70512000]
02-04 16:22:56.254 16868 19675 E AudioTrack: Discontinuity detected [expected 70756000, got 71000000]
02-04 16:22:56.514 16868 19675 E AudioTrack: Discontinuity detected [expected 71256000, got 71512000]
02-04 16:22:56.761 16868 19675 E AudioTrack: Discontinuity detected [expected 71756000, got 72000000]
02-04 16:22:57.016 16868 19675 E AudioTrack: Discontinuity detected [expected 72256000, got 72512000]
02-04 16:22:57.259 16868 19675 E AudioTrack: Discontinuity detected [expected 72756000, got 73000000]
02-04 16:22:57.522 16868 19675 E AudioTrack: Discontinuity detected [expected 73256000, got 73512000]
02-04 16:22:57.767 16868 19675 E AudioTrack: Discontinuity detected [expected 73756000, got 74000000]
02-04 16:22:58.000 16868 19675 E AudioTrack: Discontinuity detected [expected 74256000, got 74512000]
02-04 16:22:58.268 16868 19675 E AudioTrack: Discontinuity detected [expected 74756000, got 75000000]
02-04 16:22:58.512 16868 19675 E AudioTrack: Discontinuity detected [expected 75256000, got 75512000]
02-04 16:22:58.746 16868 19675 E AudioTrack: Discontinuity detected [expected 75756000, got 76000000]
02-04 16:22:59.013 16868 19675 E AudioTrack: Discontinuity detected [expected 76256000, got 76512000]
02-04 16:22:59.248 16868 19675 E AudioTrack: Discontinuity detected [expected 76756000, got 77000000]
02-04 16:22:59.517 16868 19675 E AudioTrack: Discontinuity detected [expected 77256000, got 77512000]
02-04 16:22:59.752 16868 19675 E AudioTrack: Discontinuity detected [expected 77756000, got 78000000]
02-04 16:23:00.019 16868 19675 E AudioTrack: Discontinuity detected [expected 78256000, got 78512000]
02-04 16:23:00.254 16868 19675 E AudioTrack: Discontinuity detected [expected 78756000, got 79000000]
02-04 16:23:00.518 16868 19675 E AudioTrack: Discontinuity detected [expected 79256000, got 79512000]
02-04 16:23:00.767 16868 19675 E AudioTrack: Discontinuity detected [expected 79756000, got 80000000]
02-04 16:23:01.007 16868 19675 E AudioTrack: Discontinuity detected [expected 80256000, got 80512000]
02-04 16:23:01.266 16868 19675 E AudioTrack: Discontinuity detected [expected 80756000, got 81000000]
02-04 16:23:01.510 16868 19675 E AudioTrack: Discontinuity detected [expected 81256000, got 81512000]
02-04 16:23:01.744 16868 19675 E AudioTrack: Discontinuity detected [expected 81756000, got 82000000]
02-04 16:23:02.008 16868 19675 E AudioTrack: Discontinuity detected [expected 82256000, got 82512000]
02-04 16:23:02.252 16868 19675 E AudioTrack: Discontinuity detected [expected 82756000, got 83000000]
02-04 16:23:02.519 16868 19675 E AudioTrack: Discontinuity detected [expected 83256000, got 83512000]
02-04 16:23:02.749 16868 19675 E AudioTrack: Discontinuity detected [expected 83756000, got 84000000]
02-04 16:23:03.018 16868 19675 E AudioTrack: Discontinuity detected [expected 84256000, got 84512000]
02-04 16:23:03.257 16868 19675 E AudioTrack: Discontinuity detected [expected 84756000, got 85000000]
02-04 16:23:03.526 16868 19675 E AudioTrack: Discontinuity detected [expected 85256000, got 85512000]
02-04 16:23:03.766 16868 19675 E AudioTrack: Discontinuity detected [expected 85756000, got 86000000]
02-04 16:23:04.010 16868 19675 E AudioTrack: Discontinuity detected [expected 86256000, got 86512000]
02-04 16:23:04.266 16868 19675 E AudioTrack: Discontinuity detected [expected 86756000, got 87000000]
02-04 16:23:04.509 16868 19675 E AudioTrack: Discontinuity detected [expected 87256000, got 87512000]
02-04 16:23:04.751 16868 19675 E AudioTrack: Discontinuity detected [expected 87756000, got 88000000]
02-04 16:23:05.007 16868 19675 E AudioTrack: Discontinuity detected [expected 88256000, got 88512000]
02-04 16:23:05.254 16868 19675 E AudioTrack: Discontinuity detected [expected 88756000, got 89000000]
02-04 16:23:05.514 16868 19675 E AudioTrack: Discontinuity detected [expected 89256000, got 89512000]
02-04 16:23:05.756 16868 19675 E AudioTrack: Discontinuity detected [expected 89756000, got 90000000]
02-04 16:23:06.019 16868 19675 E AudioTrack: Discontinuity detected [expected 90256000, got 90512000]
02-04 16:23:06.255 16868 19675 E AudioTrack: Discontinuity detected [expected 90756000, got 91000000]
02-04 16:23:06.521 16868 19675 E AudioTrack: Discontinuity detected [expected 91256000, got 91512000]
02-04 16:23:06.763 16868 19675 E AudioTrack: Discontinuity detected [expected 91756000, got 92000000]
02-04 16:23:07.006 16868 19675 E AudioTrack: Discontinuity detected [expected 92256000, got 92512000]
02-04 16:23:07.264 16868 19675 E AudioTrack: Discontinuity detected [expected 92756000, got 93000000]
02-04 16:23:07.508 16868 19675 E AudioTrack: Discontinuity detected [expected 93256000, got 93512000]
02-04 16:23:07.750 16868 19675 E AudioTrack: Discontinuity detected [expected 93756000, got 94000000]
02-04 16:23:08.014 16868 19675 E AudioTrack: Discontinuity detected [expected 94256000, got 94512000]
02-04 16:23:08.251 16868 19675 E AudioTrack: Discontinuity detected [expected 94756000, got 95000000]
02-04 16:23:08.515 16868 19675 E AudioTrack: Discontinuity detected [expected 95256000, got 95512000]
02-04 16:23:08.759 16868 19675 E AudioTrack: Discontinuity detected [expected 95756000, got 96000000]
02-04 16:23:09.019 16868 19675 E AudioTrack: Discontinuity detected [expected 96256000, got 96512000]
02-04 16:23:09.255 16868 19675 E AudioTrack: Discontinuity detected [expected 96756000, got 97000000]
02-04 16:23:09.518 16868 19675 E AudioTrack: Discontinuity detected [expected 97256000, got 97512000]
02-04 16:23:09.765 16868 19675 E AudioTrack: Discontinuity detected [expected 97756000, got 98000000]
02-04 16:23:10.004 16868 19675 E AudioTrack: Discontinuity detected [expected 98256000, got 98512000]
02-04 16:23:10.264 16868 19675 E AudioTrack: Discontinuity detected [expected 98756000, got 99000000]
02-04 16:23:10.504 16868 19675 E AudioTrack: Discontinuity detected [expected 99256000, got 99512000]
02-04 16:23:10.749 16868 19675 E AudioTrack: Discontinuity detected [expected 99756000, got 100000000]
02-04 16:23:11.012 16868 19675 E AudioTrack: Discontinuity detected [expected 100256000, got 100512000]
02-04 16:23:11.250 16868 19675 E AudioTrack: Discontinuity detected [expected 100756000, got 101000000]
02-04 16:23:11.514 16868 19675 E AudioTrack: Discontinuity detected [expected 101256000, got 101512000]
02-04 16:23:11.754 16868 19675 E AudioTrack: Discontinuity detected [expected 101756000, got 102000000]
02-04 16:23:12.020 16868 19675 E AudioTrack: Discontinuity detected [expected 102256000, got 102512000]
02-04 16:23:12.258 16868 19675 E AudioTrack: Discontinuity detected [expected 102756000, got 103000000]
02-04 16:23:12.522 16868 19675 E AudioTrack: Discontinuity detected [expected 103256000, got 103512000]
02-04 16:23:12.764 16868 19675 E AudioTrack: Discontinuity detected [expected 103756000, got 104000000]
02-04 16:23:12.998 16868 19675 E AudioTrack: Discontinuity detected [expected 104256000, got 104512000]
02-04 16:23:13.268 16868 19675 E AudioTrack: Discontinuity detected [expected 104756000, got 105000000]
02-04 16:23:13.510 16868 19675 E AudioTrack: Discontinuity detected [expected 105256000, got 105512000]
02-04 16:23:13.748 16868 19675 E AudioTrack: Discontinuity detected [expected 105756000, got 106000000]
02-04 16:23:14.008 16868 19675 E AudioTrack: Discontinuity detected [expected 106256000, got 106512000]
02-04 16:23:14.257 16868 19675 E AudioTrack: Discontinuity detected [expected 106756000, got 107000000]
02-04 16:23:14.509 16868 19675 E AudioTrack: Discontinuity detected [expected 107256000, got 107512000]
02-04 16:23:15.311 16868 16868 V ExoPlayerActivity: ⇢ onPlayerStateChanged(playWhenReady=true, playbackState=5)
02-04 16:23:15.313 16868 16868 V ExoPlayerActivity: ⇠ onPlayerStateChanged [0ms]
02-04 16:23:15.315 16868 16868 V ExoPlayerActivity: ⇢ onDroppedFrames(count=2013, elapsed=54325)
02-04 16:23:15.322 16868 16868 V ExoPlayerActivity: ⇠ onDroppedFrames [0ms]
@ojw28
Copy link
Contributor

ojw28 commented Jun 14, 2016

This is an example of raw PCM audio in mp4. The audio samples end up with incorrect timestamps. The samples are rechunked, but it appears the timestamps are wrong even if rechunking is disabled.

@dcower - Could you take a look at this? It's quite possible that the audio timestamps are incorrect in the media itself, but it could be that we've missed something.

@ojw28 ojw28 added the bug label Jun 14, 2016
@ened
Copy link
Contributor Author

ened commented Jun 14, 2016

ffmpeg info on the file:

$ ffmpeg -i 2016_0613_170040_004.MOV 
ffmpeg version 3.0.2 Copyright (c) 2000-2016 the FFmpeg developers
  built with Apple LLVM version 7.3.0 (clang-703.0.29)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/3.0.2 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-opencl --enable-libx264 --enable-libmp3lame --enable-libxvid --enable-libsnappy --enable-libfontconfig --enable-libfreetype --enable-libtheora --enable-libvorbis --enable-libvpx --enable-librtmp --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfaac --enable-libass --enable-ffplay --enable-libssh --enable-libspeex --enable-libschroedinger --enable-libfdk-aac --enable-openssl --enable-libopus --enable-frei0r --enable-libcaca --enable-libsoxr --enable-libvidstab --enable-libx265 --enable-libwebp --enable-libzmq --enable-libbs2b --enable-libdcadec --enable-librubberband --enable-libzimg --enable-libopenh264 --enable-libopenjpeg --disable-decoder=jpeg2000 --extra-cflags=-I/usr/local/Cellar/openjpeg/1.5.2_1/include/openjpeg-1.5 --enable-nonfree --enable-vda
  libavutil      55. 17.103 / 55. 17.103
  libavcodec     57. 24.102 / 57. 24.102
  libavformat    57. 25.100 / 57. 25.100
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 31.100 /  6. 31.100
  libavresample   3.  0.  0 /  3.  0.  0
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc    54.  0.100 / 54.  0.100
Guessed Channel Layout for  Input Stream #0.1 : mono
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '2016_0613_170040_004.MOV':
  Metadata:
    major_brand     : qt  
    minor_version   : 0
    compatible_brands: qt  
    creation_time   : 2016-06-13 11:08:34
    original_format : NVT-IM
    original_format-eng: NVT-IM
    comment         : CarDV-TURNKEY
    comment-eng     : CarDV-TURNKEY
  Duration: 00:01:48.00, start: 0.000000, bitrate: 13087 kb/s
    Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080, 11871 kb/s, 30 fps, 30 tbr, 30k tbn, 60k tbc (default)
    Metadata:
      creation_time   : 2016-06-13 11:08:34
      handler_name    : DataHandler
      encoder         : h264
    Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 32000 Hz, 1 channels, s16, 512 kb/s (default)
    Metadata:
      creation_time   : 2016-06-13 11:08:34
      handler_name    : DataHandler

The audio stream does say something about pcm_s16le.

Playback using Androids MediaPlayer or VLC would work ok and on time.

Please also note the dropped frames, which in turn make the video playback stutter. (perhaps related to the audio problems).

@ojw28 ojw28 changed the title MOV playback speed too high (file:// & http://) MOV containing PCM - playback speed too high (file:// & http://) Jun 14, 2016
@ojw28 ojw28 changed the title MOV containing PCM - playback speed too high (file:// & http://) MOV containing PCM - playback speed too high (file:// & http:// Jun 14, 2016
@ojw28 ojw28 changed the title MOV containing PCM - playback speed too high (file:// & http:// MOV containing PCM - playback speed too high Jun 14, 2016
@ened
Copy link
Contributor Author

ened commented Nov 4, 2016

@dcower has there been any progress on that for further testing? Thx

@ojw28
Copy link
Contributor

ojw28 commented Nov 24, 2016

Closing this on the assumption the media was broken. If it was just the one file and you don't know how to generate a file that's similarly broken, this seems quite likely. If you're aware of a way to generate such files please let us know, and we'll take a closer look.

@ened
Copy link
Contributor Author

ened commented Nov 25, 2016

The file was streamed of a car DVR which contained a standard chip, built into millions of those devices. I can re-test using the latest firmware and models and will re-upload.

@google google locked and limited conversation to collaborators Jun 28, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants