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

Capabilities: ExoPlayer does not play mov format video. #2007

Closed
shirensong opened this issue Oct 27, 2016 · 5 comments
Closed

Capabilities: ExoPlayer does not play mov format video. #2007

shirensong opened this issue Oct 27, 2016 · 5 comments

Comments

@shirensong
Copy link

shirensong commented Oct 27, 2016

I follow the demo and play a mov format video, there is only sound but no video... But if I use the base MediaCodec api with compile version 23 to play this video, it will be OK and everything is great.
here is the file link for this sample mov:

https://pan.baidu.com/s/1slnKXrv

based on exoplayer r2.0.4
a device with android 6.0
below is the adb log:

10-26 18:07:33.614 32300-32300/? I/main: type=1400 audit(0.0:428): avc: denied { open } for path="/selinux_version" dev="tmpfs" ino=9206 scontext=u:r:zygote:s0 tcontext=u:object_r:tmpfs:s0 tclass=file permissive=1
10-26 18:07:33.619 32300-32300/? I/art: Late-enabling -Xcheck:jni
10-26 18:07:33.619 32300-32300/? I/art: Late-enabling JIT
10-26 18:07:33.629 32300-32300/? I/art: JIT created with code_cache_capacity=2MB compile_threshold=1000
10-26 18:07:33.684 32300-32300/? W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
10-26 18:07:33.838 32300-32300/com.twos.demo I/ExoPlayerImpl: Init 2.0.4
10-26 18:07:33.853 32300-32320/com.twos.demo D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
10-26 18:07:33.921 32300-32318/com.twos.demo W/VideoCapabilities: Unrecognized profile/level 1/8192 for video/3gpp
10-26 18:07:33.921 32300-32318/com.twos.demo W/VideoCapabilities: Unrecognized profile/level 2/8192 for video/3gpp
10-26 18:07:33.921 32300-32318/com.twos.demo W/VideoCapabilities: Unrecognized profile/level 8/8192 for video/3gpp
10-26 18:07:33.923 32300-32318/com.twos.demo W/VideoCapabilities: Unrecognized profile/level 0/3 for video/mpeg2
10-26 18:07:33.925 32300-32318/com.twos.demo W/VideoCapabilities: Unsupported mime video/raw
10-26 18:07:33.926 32300-32318/com.twos.demo W/VideoCapabilities: Unsupported mime video/vc1
10-26 18:07:33.928 32300-32318/com.twos.demo W/VideoCapabilities: Unsupported mime video/vnd.rn-realvideo
10-26 18:07:33.929 32300-32318/com.twos.demo W/VideoCapabilities: Unsupported mime video/divx3
10-26 18:07:33.931 32300-32318/com.twos.demo W/VideoCapabilities: Unsupported mime video/avs-video
10-26 18:07:33.932 32300-32318/com.twos.demo W/VideoCapabilities: Unsupported mime video/x-motion-jpeg
10-26 18:07:33.936 32300-32320/com.twos.demo D/libEGL: loaded /vendor/lib/egl/libGLES_mali.so
10-26 18:07:33.938 32300-32318/com.twos.demo W/VideoCapabilities: Unsupported mime video/wvc1
10-26 18:07:33.940 32300-32318/com.twos.demo W/VideoCapabilities: Unsupported mime video/wmv3
10-26 18:07:33.941 32300-32318/com.twos.demo W/VideoCapabilities: Unsupported mime video/x-ms-wmv
10-26 18:07:33.943 32300-32318/com.twos.demo W/VideoCapabilities: Unsupported mime video/mp43
10-26 18:07:33.944 32300-32318/com.twos.demo W/VideoCapabilities: Unsupported mime video/x-flv
10-26 18:07:33.946 32300-32318/com.twos.demo W/VideoCapabilities: Unsupported mime video/rv30
10-26 18:07:33.947 32300-32318/com.twos.demo W/VideoCapabilities: Unsupported mime video/rv40
10-26 18:07:33.950 32300-32318/com.twos.demo W/VideoCapabilities: Unrecognized level 8192 for video/x-vnd.on2.vp9
10-26 18:07:33.950 32300-32318/com.twos.demo W/VideoCapabilities: Unrecognized level 8192 for video/x-vnd.on2.vp9
10-26 18:07:33.950 32300-32318/com.twos.demo W/VideoCapabilities: Unrecognized profile 2 for video/x-vnd.on2.vp9
10-26 18:07:33.950 32300-32318/com.twos.demo W/VideoCapabilities: Unrecognized level 8192 for video/x-vnd.on2.vp9
10-26 18:07:33.950 32300-32318/com.twos.demo W/VideoCapabilities: Unrecognized profile 8 for video/x-vnd.on2.vp9
10-26 18:07:33.956 32300-32320/com.twos.demo I/OpenGLRenderer: Initialized EGL, version 1.4
10-26 18:07:33.963 32300-32320/com.twos.demo D/mali_winsys: new_window_surface returns 0x3000
10-26 18:07:33.969 32300-32318/com.twos.demo W/AudioCapabilities: Unsupported mime audio/alac_caff
10-26 18:07:33.980 32300-32318/com.twos.demo W/AudioCapabilities: Unsupported mime audio/pcm-le
10-26 18:07:33.983 32300-32318/com.twos.demo W/AudioCapabilities: Unsupported mime audio/x-pcm
10-26 18:07:34.007 32300-32318/com.twos.demo I/VideoCapabilities: Unsupported profile 4 for video/mp4v-es
10-26 18:07:34.057 32300-32331/com.twos.demo I/OMXClient: Using client-side OMX mux.
10-26 18:07:34.063 32300-32331/com.twos.demo D/ACodec: [OMX.realtek.audio.dec] Allocating 4 buffers of size 32768/32768 (from 32768 using Invalid) on input port
10-26 18:07:34.064 32300-32331/com.twos.demo D/ACodec: [OMX.realtek.audio.dec] Allocating 4 buffers of size 32768/32768 (from 32768 using Invalid) on output port
10-26 18:07:34.078 32300-32300/com.twos.demo D/EventLogger: audioEnabled [0.24]
10-26 18:07:34.096 32300-32300/com.twos.demo D/EventLogger: audioDecoderInitialized [0.25, OMX.realtek.audio.dec]
10-26 18:07:34.096 32300-32300/com.twos.demo D/EventLogger: audioFormatChanged [0.25, id=2, mimeType=audio/mp4a-latm, channels=2, sample_rate=48000, language=```]
10-26 18:07:34.258 32300-32331/com.twos.demo D/ACodec: [OMX.realtek.audio.dec] Allocating 4 buffers of size 32768/32768 (from 32768 using Invalid) on output port
10-26 18:07:34.288 32300-32300/com.twos.demo D/EventLogger: audioSessionId [34]
@ojw28
Copy link
Contributor

ojw28 commented Oct 27, 2016

The issue here is most likely that the underlying platform is under-reporting the capabilities of the device to play video of type video/mp4v-es. On Pixel the decoder for this type is OMX.qcom.video.decoder.mpeg4, which claims to support a maximum decode width of 896px. Since the video provided is 1280px wide, ExoPlayer determines that the format exceeds the capabilities of the decoder and hence plays only the audio component.

If I force ExoPlayer to play the video stream regardless then it works fine, suggesting that the underlying platform should be reporting that it's capable of playing video in this format with larger decode widths, on Pixel at least.

  • Perhaps we should be more optimistic and have ExoPlayer always try and play the stream in the case there's only one stream available and it exceeds the device capabilities. We'll have a think about this.
  • You can experiment with force enabling the video stream for yourself by editing this part of TrackSelectionHelper so that the if block is always executed. You'll then be able to select the video stream in the demo app by clicking on the "Video" button.
  • As an aside, if you control the way these videos are encoded, I'd strongly recommend you use H264 instead.

@shirensong
Copy link
Author

shirensong commented Oct 31, 2016

@ojw28, so currently, is there a way to have ExoPlayer always try and play the stream in this case ?

@ojw28
Copy link
Contributor

ojw28 commented Oct 31, 2016

Not currently. We're thinking about it, but it's unclear whether it makes sense.

@ojw28 ojw28 changed the title ExoPlayer does not play mov format video. Capabilities: ExoPlayer does not play mov format video. Nov 18, 2016
@ojw28
Copy link
Contributor

ojw28 commented Nov 18, 2016

Please could you:

  1. Check out the latest dev-v2 code.
  2. Try and play the affected video.
  3. Paste the output of adb logcat -s "MediaCodecInfo" here. You should see a bunch of lines containing "FalseCheck" the detail exactly why the stream wasn't played.

Thanks!

ojw28 added a commit that referenced this issue Dec 1, 2016
Leaving disabled by default for now, but we may want to consider
enabling it by default. Note that in V1 for ExtractorSampleSource
the behaviour was equivalent to this option being enabled, since
we didn't perform capabilities checks. For DASH/SS/HLS the V1
behaviour was equivalent to this option being disabled.

The type in PlayerActivity has been changed just to make it
easier to add a line that calls setParameters.

Issue: #2034
Issue: #2007
Issue: #2078

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140477568
ojw28 added a commit that referenced this issue Dec 12, 2016
Not sure what I think about this, but we're getting quite
a lot of issues reported where streams play fine but capabilities
indicate they wont. It's probably best just to cross our fingers
and hope for the best in such cases, as was the case in V1 when
using ExtractorSampleSource.

Issue: #2157
Issue: #2034
Issue: #2007

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141758070
@ojw28
Copy link
Contributor

ojw28 commented Dec 12, 2016

Fixed in dev-v2.

@ojw28 ojw28 closed this as completed Dec 12, 2016
@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

2 participants