Skip to content
This repository has been archived by the owner on Feb 13, 2024. It is now read-only.

No sound and videos not playing in iTube and browser #904

Closed
kde99 opened this issue Sep 9, 2018 · 38 comments · Fixed by #914
Closed

No sound and videos not playing in iTube and browser #904

kde99 opened this issue Sep 9, 2018 · 38 comments · Fixed by #914

Comments

@kde99
Copy link

kde99 commented Sep 9, 2018

  1. Please check that no similar bug is already reported. Have a look on the list of open bugs at https://github.com/anbox/anbox/issues => checked none with the same error except a camera issue which was fixed before

  2. Make sure you are running the latest version of Anbox before reporting an issue. Update snap to latest: snap refresh --devmode --edge anbox => version 4-8febc16 updated

  3. Make sure you have debug logs enabled:
    sudo snap set anbox debug.enable=true => did

  4. Reproduce the error while debug logs enabled.

  5. Run the anbox logs collection utility and attach the tar file.
    sudo /snap/bin/anbox.collect-bug-info => system diag zip

  6. ** Please paste the result of anbox system-info below:**

version: 4
snap-revision: 149
cpu:
  arch:  x86
  brand:        Intel(R) Core(TM) i5-2520M CPU @ 2.50GHz
  features: 
    - aes
    - sse4_1
    - sse4_2
    - avx
os:
  name: Gentoo
  version: 
  snap-based: true
kernel:
  version: Linux version 4.18.5-gentoo (root@pen) (gcc version 8.2.0 (Gentoo 8.2.0-r2 p1.2)) #1 SMP Wed Sep 5 15:20:21 CEST 2018
  binder: true
  ashmem: true
graphics:
  egl:
    vendor: Mesa Project
    version: 1.4 (DRI2)
    extensions:
      - EGL_ANDROID_native_fence_sync
      - EGL_CHROMIUM_sync_control
      - EGL_EXT_buffer_age
      - EGL_EXT_create_context_robustness
      - EGL_EXT_image_dma_buf_import
      - EGL_EXT_image_dma_buf_import_modifiers
      - EGL_KHR_config_attribs
      - EGL_KHR_create_context
      - EGL_KHR_create_context_no_error
      - EGL_KHR_fence_sync
      - EGL_KHR_get_all_proc_addresses
      - EGL_KHR_gl_colorspace
      - EGL_KHR_gl_renderbuffer_image
      - EGL_KHR_gl_texture_2D_image
      - EGL_KHR_gl_texture_3D_image
      - EGL_KHR_gl_texture_cubemap_image
      - EGL_KHR_image
      - EGL_KHR_image_base
      - EGL_KHR_image_pixmap
      - EGL_KHR_no_config_context
      - EGL_KHR_reusable_sync
      - EGL_KHR_surfaceless_context
      - EGL_EXT_pixel_format_float
      - EGL_KHR_wait_sync
      - EGL_MESA_configless_context
      - EGL_MESA_drm_image
      - EGL_MESA_image_dma_buf_export
      - EGL_NOK_texture_from_pixmap
      - EGL_WL_bind_wayland_display
  gles2:
    vendor: Intel Open Source Technology Center
    vendor: OpenGL ES 3.0 Mesa 18.0.5
    extensions:
      - GL_ANGLE_texture_compression_dxt3
      - GL_ANGLE_texture_compression_dxt5
      - GL_APPLE_texture_max_level
      - GL_EXT_blend_func_extended
      - GL_EXT_blend_minmax
      - GL_EXT_clip_cull_distance
      - GL_EXT_color_buffer_float
      - GL_EXT_compressed_ETC1_RGB8_sub_texture
      - GL_EXT_discard_framebuffer
      - GL_EXT_disjoint_timer_query
      - GL_EXT_draw_buffers
      - GL_EXT_draw_buffers_indexed
      - GL_EXT_draw_elements_base_vertex
      - GL_EXT_frag_depth
      - GL_EXT_map_buffer_range
      - GL_EXT_multi_draw_arrays
      - GL_EXT_occlusion_query_boolean
      - GL_EXT_polygon_offset_clamp
      - GL_EXT_read_format_bgra
      - GL_EXT_robustness
      - GL_EXT_separate_shader_objects
      - GL_EXT_shader_integer_mix
      - GL_EXT_texture_border_clamp
      - GL_EXT_texture_compression_dxt1
      - GL_EXT_texture_filter_anisotropic
      - GL_EXT_texture_format_BGRA8888
      - GL_EXT_texture_rg
      - GL_EXT_texture_sRGB_decode
      - GL_EXT_texture_type_2_10_10_10_REV
      - GL_EXT_unpack_subimage
      - GL_INTEL_performance_query
      - GL_KHR_blend_equation_advanced
      - GL_KHR_context_flush_control
      - GL_KHR_debug
      - GL_KHR_no_error
      - GL_KHR_robustness
      - GL_MESA_shader_integer_functions
      - GL_NV_draw_buffers
      - GL_NV_fbo_color_attachments
      - GL_NV_read_buffer
      - GL_NV_read_depth
      - GL_NV_read_depth_stencil
      - GL_NV_read_stencil
      - GL_OES_EGL_image
      - GL_OES_EGL_image_external
      - GL_OES_EGL_sync
      - GL_OES_compressed_ETC1_RGB8_texture
      - GL_OES_depth24
      - GL_OES_depth_texture
      - GL_OES_depth_texture_cube_map
      - GL_OES_draw_buffers_indexed
      - GL_OES_draw_elements_base_vertex
      - GL_OES_element_index_uint
      - GL_OES_fbo_render_mipmap
      - GL_OES_get_program_binary
      - GL_OES_mapbuffer
      - GL_OES_packed_depth_stencil
      - GL_OES_required_internalformat
      - GL_OES_rgb8_rgba8
      - GL_OES_sample_shading
      - GL_OES_sample_variables
      - GL_OES_shader_multisample_interpolation
      - GL_OES_standard_derivatives
      - GL_OES_stencil8
      - GL_OES_surfaceless_context
      - GL_OES_texture_3D
      - GL_OES_texture_border_clamp
      - GL_OES_texture_float
      - GL_OES_texture_float_linear
      - GL_OES_texture_half_float
      - GL_OES_texture_half_float_linear
      - GL_OES_texture_npot
      - GL_OES_vertex_array_object
      - GL_OES_vertex_half_float

Please describe your problem:
When I try to play a video in iTube well it doesn't start and in the console (adb logcat) I see

09-09 08:39:30.783   111   918 E ACodec  : Unable to instantiate a decoder for type 'audio/vorbis' with err 0xfffffffe.
09-09 08:39:30.783   111   918 E ACodec  : signalError(omxError 0xfffffffe, internalError -2)
09-09 08:39:30.783   111   918 E MediaCodec: Codec reported err 0xfffffffe, actionCode 0, while in state 1
09-09 08:39:30.784   111   916 E SoundPool: Unable to load sample
09-09 08:39:30.784   111   167 W AudioService: onLoadSoundEffects(), Error -2147483648 while loading samples
09-09 08:39:30.788    40    40 I MediaPlayerService: MediaPlayerService::getOMX

whenever I press the play/pause button. Also the same happens in the webview shell the when I try youtube there.

The above errors changes to

09-09 08:48:12.966  1027  1129 E ACodec  : Unable to instantiate a decoder for type 'audio/opus' with err 0xfffffffe.
09-09 08:48:12.966  1027  1129 E ACodec  : signalError(omxError 0xfffffffe, internalError -2)
09-09 08:48:12.966  1027  1129 E MediaCodec: Codec reported err 0xfffffffe, actionCode 0, while in state 1
09-09 08:48:12.967  1027  1027 W MediaCodec-JNI: try to release MediaCodec from JMediaCodec::~JMediaCodec()...
09-09 08:48:12.967  1027  1027 W MediaCodec-JNI: done releasing MediaCodec from JMediaCodec::~JMediaCodec().
09-09 08:48:12.967  1027  1027 E cr_MediaCodecUtil: Failed to create MediaCodec: audio/opus, isSecure: false, requireSoftwareCodec: no
09-09 08:48:12.967  1027  1027 E cr_MediaCodecUtil: java.lang.IllegalArgumentException: Failed to initialize audio/opus, error 0xfffffffe
09-09 08:48:12.967  1027  1027 E cr_MediaCodecUtil: 	at android.media.MediaCodec.native_setup(Native Method)
09-09 08:48:12.967  1027  1027 E cr_MediaCodecUtil: 	at android.media.MediaCodec.<init>(MediaCodec.java:1776)
09-09 08:48:12.967  1027  1027 E cr_MediaCodecUtil: 	at android.media.MediaCodec.createDecoderByType(MediaCodec.java:1724)
09-09 08:48:12.967  1027  1027 E cr_MediaCodecUtil: 	at org.chromium.media.MediaCodecUtil.createDecoder(MediaCodecUtil.java:217)
09-09 08:48:12.967  1027  1027 E cr_MediaCodecUtil: 	at org.chromium.media.MediaCodecBridge.create(MediaCodecBridge.java:214)
09-09 08:48:12.967  1027  1027 E cr_MediaCodecUtil: 	at org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native Method)
09-09 08:48:12.967  1027  1027 E cr_MediaCodecUtil: 	at org.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:39)
09-09 08:48:12.967  1027  1027 E cr_MediaCodecUtil: 	at android.os.Handler.dispatchMessage(Handler.java:102)
09-09 08:48:12.967  1027  1027 E cr_MediaCodecUtil: 	at android.os.Looper.loop(Looper.java:154)
09-09 08:48:12.967  1027  1027 E cr_MediaCodecUtil: 	at android.app.ActivityThread.main(ActivityThread.java:6119)
09-09 08:48:12.967  1027  1027 E cr_MediaCodecUtil: 	at java.lang.reflect.Method.invoke(Native Method)
09-09 08:48:12.967  1027  1027 E cr_MediaCodecUtil: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
09-09 08:48:12.967  1027  1027 E cr_MediaCodecUtil: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
09-09 08:48:12.969    40    99 I MediaPlayerService: MediaPlayerService::getOMX

when in the WebView shell.

What were you expecting?:
I was expecting to view videos and hear sound from the emulator.

Additional info:

@kde99 kde99 changed the title No sound and videos not playing in iTube No sound and videos not playing in iTube and browser Sep 9, 2018
@eMPee584
Copy link
Contributor

eMPee584 commented Sep 13, 2018

Ha ­— it was the missing decoder entries! Putting this
media_codecs.xml.txt
to /var/lib/anbox/rootfs-overlay/system/etc/media_codecs.xml fixed youtube and musicolet player : )
Edit: wow even concurrent sound (i.e. soft mixing) works..

@eMPee584
Copy link
Contributor

actually, the file posted is from an i9103 and includes hw accelerated decoders for nv tegra 2 which will be unavailable on anbox.. so all OMX.Nvidia.* entries should be replaced by teh default software implementations OMX.google.* which are in https://android.googlesource.com/platform/frameworks/av/+/master/media/libstagefright/omx/SoftOMXPlugin.cpp

@morphis
Copy link
Member

morphis commented Sep 13, 2018

@eMPee584 Can you submit a PR to get this fixed in Anbox?

@ShapeShifter499
Copy link

#914 This doesn't seem to work for me. Was this PR supposed to fix media playback?

I seem to have the same exact issue as #151 and #956

@eMPee584
Copy link
Contributor

@ShapeShifter499 a new anbox release is not enough, you would also need a new system image. The most recent on https://build.anbox.io/android-images/2018/07/19/ is too old to contain that fix. (@morphis how about rolling a new one? ; )
If you are using the debian package (for snap, locations will differ of both anbox dir and systemd service file) you can also add these xml files (media_codecs_google_audio.xml, media_codecs_google_telephony.xml, media_codecs_google_video.xml) to a dir /var/lib/anbox/rootfs-overlay/system/etc/ and put

[Service]
ExecStart=
ExecStart=/usr/bin/anbox container-manager --daemon --privileged --data-path=/var/lib/anbox --use-rootfs-overlay

into a /etc/systemd/system/anbox-container-manager.service.d/override.conf file (create the parent directories as needed by mkdir -pv /etc/systemd/system/anbox-container-manager.service.d /var/lib/anbox/rootfs-overlay/system/etc/)

@ShapeShifter499
Copy link

@eMPee584 Using Arch Linux here.

So the codecs are technically included but most recent official anbox system image is missing the 'xml' setting files that help the system make use of them?

@eMPee584
Copy link
Contributor

Xactly.

@Foorack
Copy link

Foorack commented Jan 26, 2019

@eMPee584 Thank you so much!! 😊

Running Ubuntu 19.04 with snap. Putting your media_codecs.xml file unmodified into /var/snap/anbox/common/rootfs-overlay/system/etc/media_codecs.xml and rebooting my laptop worked. I also had to set snap set anbox rootfs-overlay.enable=true ✔️

This fixed all my audio problem and sound is now playing perfectly, even DRM content like audiobooks. ❤️

@ShapeShifter499
Copy link

@eMPee584 After adding the overlay xml files to my setup this is what I get.

Sound is now working but video playback is not. The included webview browser is playing audio but no video. Videos from https://m.youtube.com are black boxes with sound and test videos from https://www.quirksmode.org/html5/tests/video.html are white boxes with sound.

@ShapeShifter499
Copy link

ShapeShifter499 commented Jan 27, 2019

@eMPee584 I added the three following xml from the PR comment you made. media_codecs_google_audio.xml, media_codecs_google_video.xml, and media_codecs_google_telephony.xml

EDIT: Tried adding all of the xml files you had added in the PR to "/var/lib/anbox/rootfs-overlay/system/etc/" Still the same issue, audio works but no video yet. But audio didn't work for me before so progress!

@eMPee584
Copy link
Contributor

@ShapeShifter499 can you please post a log (adb logcat) from starting your file? There should be something about Unable to instantiate a decoder or Failed to create MediaCodec ...

@ShapeShifter499
Copy link

@eMPee584 Started up anbox, loaded webview, and tried to play a YouTube video. Nothing played now. Attached is the logcat from that

anbox.log

@ShapeShifter499
Copy link

ShapeShifter499 commented Jan 29, 2019

@eMPee584 PEBCAK, accidentally got rid of the --use-rootfs-overlay flag in systemd service file override. Attached is the correct logcat where audio is only playing, no video.

anbox-audio_only.log

@eMPee584
Copy link
Contributor

eMPee584 commented Feb 2, 2019

E libEGL : validate_display:99 error 3008 (EGL_BAD_DISPLAY)
E OMXNodeInstance: getParameter(250024:google.vp9.decoder, ParamVideoAndroidVp8Encoder(0x6f600007)) ERROR: UnsupportedIndex(0x8000101a) = Failed to force a keyframe
E OMXNodeInstance: !!! Observer died. Quickly, do something, ... anything..

🤔 mmh no time right now to dive into this further .. ⌛

@friddle
Copy link

friddle commented Jul 16, 2019

Thnaks.it works.amazing

@ArthurKariuki
Copy link

somebody help me out i don't understand how to do this i have the same problem

@matoro
Copy link

matoro commented Sep 22, 2019

Can a new image please be bumped to the build service? The old one is over a year old and having no audio support is a huge issue.

@eMPee584
Copy link
Contributor

eMPee584 commented Sep 22, 2019 via email

@originalknibbler
Copy link

Same Problem:

version: 4
snap-revision: 180
cpu:
arch: x86
brand: Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz
features:
- aes
- sse4_1
- sse4_2
- avx
- avx2
os:
name: Ubuntu
version: 18.04.3 LTS (Bionic Beaver)
snap-based: true
kernel:
version: Linux version 5.0.0-29-generic (buildd@lgw01-amd64-039) (gcc version 7.4.0 (Ubuntu 7.4.0-1ubuntu118.04.1)) #3118.04.1-Ubuntu SMP Thu Sep 12 18:29:21 UTC 2019
binder: true
ashmem: true
graphics:
egl:
vendor: NVIDIA
version: 1.5
extensions:
- EGL_EXT_buffer_age
- EGL_EXT_client_sync
- EGL_EXT_create_context_robustness
- EGL_EXT_output_base
- EGL_EXT_stream_acquire_mode
- EGL_EXT_sync_reuse
- EGL_IMG_context_priority
- EGL_KHR_config_attribs
- EGL_KHR_create_context_no_error
- EGL_KHR_context_flush_control
- EGL_KHR_create_context
- EGL_KHR_display_reference
- EGL_KHR_fence_sync
- EGL_KHR_get_all_proc_addresses
- EGL_KHR_partial_update
- EGL_KHR_swap_buffers_with_damage
- EGL_KHR_no_config_context
- EGL_KHR_gl_colorspace
- EGL_KHR_gl_renderbuffer_image
- EGL_KHR_gl_texture_2D_image
- EGL_KHR_gl_texture_3D_image
- EGL_KHR_gl_texture_cubemap_image
- EGL_KHR_image
- EGL_KHR_image_base
- EGL_KHR_image_pixmap
- EGL_KHR_reusable_sync
- EGL_KHR_stream
- EGL_KHR_stream_attrib
- EGL_KHR_stream_consumer_gltexture
- EGL_KHR_stream_cross_process_fd
- EGL_KHR_stream_fifo
- EGL_KHR_stream_producer_eglsurface
- EGL_KHR_surfaceless_context
- EGL_KHR_wait_sync
- EGL_NV_nvrm_fence_sync
- EGL_NV_post_sub_buffer
- EGL_NV_quadruple_buffer
- EGL_NV_stream_cross_display
- EGL_NV_stream_cross_object
- EGL_NV_stream_cross_process
- EGL_NV_stream_cross_system
- EGL_NV_stream_flush
- EGL_NV_stream_metadata
- EGL_NV_stream_remote
- EGL_NV_stream_reset
- EGL_NV_stream_socket
- EGL_NV_stream_socket_inet
- EGL_NV_stream_socket_unix
- EGL_NV_stream_sync
- EGL_NV_stream_fifo_next
- EGL_NV_stream_fifo_synchronous
- EGL_NV_stream_consumer_gltexture_yuv
- EGL_NV_stream_attrib
- EGL_NV_stream_origin
- EGL_NV_system_time
- EGL_NV_output_drm_flip_event
- EGL_NV_triple_buffer
gles2:
vendor: NVIDIA Corporation
vendor: OpenGL ES 3.2 NVIDIA 430.26
extensions:
- GL_EXT_base_instance
- GL_EXT_blend_func_extended
- GL_EXT_blend_minmax
- GL_EXT_buffer_storage
- GL_EXT_clear_texture
- GL_EXT_clip_control
- GL_EXT_clip_cull_distance
- GL_EXT_color_buffer_float
- GL_EXT_color_buffer_half_float
- GL_EXT_conservative_depth
- GL_EXT_copy_image
- GL_EXT_debug_label
- GL_EXT_discard_framebuffer
- GL_EXT_disjoint_timer_query
- GL_EXT_draw_buffers_indexed
- GL_EXT_draw_elements_base_vertex
- GL_EXT_EGL_image_array
- GL_EXT_EGL_image_storage
- GL_EXT_EGL_image_external_wrap_modes
- GL_EXT_float_blend
- GL_EXT_frag_depth
- GL_EXT_geometry_point_size
- GL_EXT_geometry_shader
- GL_EXT_gpu_shader5
- GL_EXT_map_buffer_range
- GL_EXT_multi_draw_indirect
- GL_EXT_multisample_compatibility
- GL_EXT_multisampled_render_to_texture
- GL_EXT_multisampled_render_to_texture2
- GL_EXT_occlusion_query_boolean
- GL_EXT_polygon_offset_clamp
- GL_EXT_post_depth_coverage
- GL_EXT_primitive_bounding_box
- GL_EXT_raster_multisample
- GL_EXT_render_snorm
- GL_EXT_robustness
- GL_EXT_separate_shader_objects
- GL_EXT_shader_group_vote
- GL_EXT_shader_implicit_conversions
- GL_EXT_shader_integer_mix
- GL_EXT_shader_io_blocks
- GL_EXT_shader_non_constant_global_initializers
- GL_EXT_shader_texture_lod
- GL_EXT_shadow_samplers
- GL_EXT_sparse_texture
- GL_EXT_sparse_texture2
- GL_EXT_sRGB
- GL_EXT_sRGB_write_control
- GL_EXT_tessellation_point_size
- GL_EXT_tessellation_shader
- GL_EXT_texture_border_clamp
- GL_EXT_texture_buffer
- GL_EXT_texture_compression_bptc
- GL_EXT_texture_compression_dxt1
- GL_EXT_texture_compression_rgtc
- GL_EXT_texture_compression_s3tc
- GL_EXT_texture_cube_map_array
- GL_EXT_texture_filter_anisotropic
- GL_EXT_texture_filter_minmax
- GL_EXT_texture_format_BGRA8888
- GL_EXT_texture_mirror_clamp_to_edge
- GL_EXT_texture_norm16
- GL_EXT_texture_rg
- GL_EXT_texture_sRGB_R8
- GL_EXT_texture_sRGB_decode
- GL_EXT_texture_storage
- GL_EXT_texture_view
- GL_EXT_draw_transform_feedback
- GL_EXT_unpack_subimage
- GL_EXT_window_rectangles
- GL_KHR_context_flush_control
- GL_KHR_debug
- GL_EXT_memory_object
- GL_EXT_memory_object_fd
- GL_KHR_parallel_shader_compile
- GL_KHR_no_error
- GL_KHR_robust_buffer_access_behavior
- GL_KHR_robustness
- GL_EXT_semaphore
- GL_EXT_semaphore_fd
- GL_NV_bgr
- GL_NV_bindless_texture
- GL_NV_blend_equation_advanced
- GL_NV_blend_equation_advanced_coherent
- GL_NVX_blend_equation_advanced_multi_draw_buffers
- GL_NV_blend_minmax_factor
- GL_NV_clip_space_w_scaling
- GL_NV_conditional_render
- GL_NV_conservative_raster
- GL_NV_conservative_raster_pre_snap_triangles
- GL_NV_copy_buffer
- GL_NV_copy_image
- GL_NV_draw_buffers
- GL_NV_draw_instanced
- GL_NV_draw_texture
- GL_NV_draw_vulkan_image
- GL_NV_EGL_stream_consumer_external
- GL_NV_explicit_attrib_location
- GL_NV_fbo_color_attachments
- GL_NV_fill_rectangle
- GL_NV_fragment_coverage_to_color
- GL_NV_fragment_shader_interlock
- GL_NV_framebuffer_blit
- GL_NV_framebuffer_mixed_samples
- GL_NV_framebuffer_multisample
- GL_NV_generate_mipmap_sRGB
- GL_NV_geometry_shader_passthrough
- GL_NV_instanced_arrays
- GL_NV_internalformat_sample_query
- GL_NV_gpu_shader5
- GL_NV_image_formats
- GL_NV_memory_attachment
- GL_NV_occlusion_query_samples
- GL_NV_non_square_matrices
- GL_NV_pack_subimage
- GL_NV_packed_float
- GL_NV_packed_float_linear
- GL_NV_path_rendering
- GL_NV_path_rendering_shared_edge
- GL_NV_pixel_buffer_object
- GL_NV_polygon_mode
- GL_NV_read_buffer
- GL_NV_read_depth
- GL_NV_read_depth_stencil
- GL_NV_read_stencil
- GL_NV_sample_locations
- GL_NV_sample_mask_override_coverage
- GL_NV_shader_atomic_fp16_vector
- GL_NV_shader_noperspective_interpolation
- GL_NV_shadow_samplers_array
- GL_NV_shadow_samplers_cube
- GL_NV_sRGB_formats
- GL_NV_stereo_view_rendering
- GL_NV_texture_array
- GL_NV_texture_barrier
- GL_NV_texture_border_clamp
- GL_NV_texture_compression_latc
- GL_NV_texture_compression_s3tc
- GL_NV_texture_compression_s3tc_update
- GL_NV_timer_query
- GL_NV_viewport_array
- GL_NV_viewport_array2
- GL_NV_viewport_swizzle
- GL_KHR_blend_equation_advanced
- GL_KHR_blend_equation_advanced_coherent
- GL_OES_compressed_ETC1_RGB8_texture
- GL_EXT_compressed_ETC1_RGB8_sub_texture
- GL_OES_depth24
- GL_OES_depth32
- GL_OES_depth_texture
- GL_OES_depth_texture_cube_map
- GL_OES_copy_image
- GL_OES_draw_buffers_indexed
- GL_OES_draw_elements_base_vertex
- GL_OES_texture_border_clamp
- GL_OES_tessellation_point_size
- GL_OES_tessellation_shader
- GL_OES_texture_buffer
- GL_OES_geometry_point_size
- GL_OES_geometry_shader
- GL_OES_gpu_shader5
- GL_OES_shader_io_blocks
- GL_OES_texture_view
- GL_OES_primitive_bounding_box
- GL_OES_EGL_image
- GL_OES_EGL_image_external
- GL_OES_EGL_image_external_essl3
- GL_OES_EGL_sync
- GL_OES_element_index_uint
- GL_OES_fbo_render_mipmap
- GL_OES_get_program_binary
- GL_OES_mapbuffer
- GL_OES_packed_depth_stencil
- GL_OES_rgb8_rgba8
- GL_OES_sample_shading
- GL_OES_sample_variables
- GL_OES_shader_image_atomic
- GL_OES_shader_multisample_interpolation
- GL_OES_standard_derivatives
- GL_OES_surfaceless_context
- GL_OES_texture_cube_map_array
- GL_OES_texture_npot
- GL_OES_texture_float
- GL_OES_texture_float_linear
- GL_OES_texture_half_float
- GL_OES_texture_half_float_linear
- GL_OES_texture_stencil8
- GL_OES_texture_storage_multisample_2d_array
- GL_OES_vertex_array_object
- GL_OES_vertex_half_float
- GL_OES_viewport_array
- GL_OVR_multiview
- GL_OVR_multiview2
- GL_OVR_multiview_multisampled_render_to_texture
- GL_ANDROID_extension_pack_es31a

@heinrich-ulbricht
Copy link

@eMPee584 Thank you so much, your comment (#904 (comment)) solved the issue I had in WhatsApp.

In my case WhatsApp did not play animated GIFs but rather displayed a black square when clicking them.

The file media_codecs.xml did not exist in /var/snap/anbox/common/rootfs-overlay/system/etc. I created it and copied the content from your linked file into it. Then I restarted Anbox:

sudo snap stop anbox
sudo snap start anbox

And the GIFs started playing.

The error in the WhatsApp log file was:

2019-10-26 22:44:02.233 LL_I 9 [1:main] ExoPlayerVideoPlayer/unplayable video track
2019-10-26 22:44:02.233 LL_E 9 [1:main] ExoPlayerVideoPlayer/onError=Es gab einen Fehler beim Abspielen des Videos.
2019-10-26 22:44:03.334 LL_I 9 [1:main] presencestatemanager/setAvailable/new-state: available setIfUnavailable:true
2019-10-26 22:44:03.634 LL_I 9 [1:main] ExoPlayerVideoPlayer/unplayable video track
2019-10-26 22:44:03.634 LL_E 9 [1:main] ExoPlayerVideoPlayer/onError=Es gab einen Fehler beim Abspielen des Videos.
2019-10-26 22:44:04.813 LL_I 9 [1:main] ExoPlayerVideoPlayer/unplayable video track
2019-10-26 22:44:04.814 LL_E 9 [1:main] ExoPlayerVideoPlayer/onError=Es gab einen Fehler beim Abspielen des Videos.
2019-10-26 22:44:06.009 LL_I 9 [1:main] ExoPlayerVideoPlayer/unplayable video track
2019-10-26 22:44:06.009 LL_E 9 [1:main] ExoPlayerVideoPlayer/onError=Es gab einen Fehler beim Abspielen des Videos.

The corresponding log entries in the console.log of the Anbox debug infos were:

10-26 21:58:17.962   503   503 I ExoPlayerImpl: Init 4a6aa55 [ExoPlayerLib/2.5.0] [x86_64, Anbox, unknown, 25]
10-26 21:58:17.968    41    41 I MediaPlayerService: MediaPlayerService::getOMX
10-26 21:58:17.969   111  1807 I OMXClient: MuxOMX ctor
10-26 21:58:17.969   111  1807 E ACodec  : Unable to instantiate a decoder for type 'audio/vorbis' with err 0xfffffffe.
10-26 21:58:17.969   111  1807 E ACodec  : signalError(omxError 0xfffffffe, internalError -2)
10-26 21:58:17.969   111  1807 E MediaCodec: Codec reported err 0xfffffffe, actionCode 0, while in state 1
10-26 21:58:17.972   111  1804 E SoundPool: Unable to load sample
10-26 21:58:17.973   111   165 W AudioService: onLoadSoundEffects(), Error -2147483648 while loading samples
10-26 21:58:17.992    41  1276 I MediaPlayerService: MediaPlayerService::getOMX
10-26 21:58:17.995   111  1809 I OMXClient: MuxOMX ctor
10-26 21:58:17.995   111  1809 E ACodec  : Unable to instantiate a decoder for type 'audio/vorbis' with err 0xfffffffe.
10-26 21:58:17.995   111  1809 E ACodec  : signalError(omxError 0xfffffffe, internalError -2)
10-26 21:58:17.996   111  1809 E MediaCodec: Codec reported err 0xfffffffe, actionCode 0, while in state 1
10-26 21:58:17.997   111  1804 E SoundPool: Unable to load sample
10-26 22:02:19.122   837   854 I Finsky  : [102] kam.run(3): Stats for Executor: BlockingExecutor kce@331b78f[Running, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 11]
10-26 22:02:19.123   837   854 I Finsky  : [102] kam.run(3): Stats for Executor: LightweightExecutor kce@9b2ea1c[Running, pool size = 2, active threads = 0, queued tasks = 0, completed tasks = 73]
10-26 22:02:19.938   837   854 I Finsky  : [102] kam.run(3): Stats for Executor: bgExecutor kce@22a6625[Running, pool size = 4, active threads = 0, queued tasks = 0, completed tasks = 55]
10-26 22:03:10.401    41    96 I MediaPlayerService: MediaPlayerService::getOMX
10-26 22:03:10.401   111  1823 I OMXClient: MuxOMX ctor
10-26 22:03:10.402   111  1823 E ACodec  : Unable to instantiate a decoder for type 'audio/vorbis' with err 0xfffffffe.
10-26 22:03:10.402   111  1823 E ACodec  : signalError(omxError 0xfffffffe, internalError -2)
10-26 22:03:10.402   111  1823 E MediaCodec: Codec reported err 0xfffffffe, actionCode 0, while in state 1
10-26 22:03:10.402   111  1820 E SoundPool: Unable to load sample
10-26 22:03:10.402   111   165 W AudioService: onLoadSoundEffects(), Error -2147483648 while loading samples
10-26 22:03:10.409    41    41 I MediaPlayerService: MediaPlayerService::getOMX
10-26 22:03:10.409   111  1825 I OMXClient: MuxOMX ctor
10-26 22:03:10.410   111  1825 E ACodec  : Unable to instantiate a decoder for type 'audio/vorbis' with err 0xfffffffe.
10-26 22:03:10.410   111  1825 E ACodec  : signalError(omxError 0xfffffffe, internalError -2)
10-26 22:03:10.410   111  1825 E MediaCodec: Codec reported err 0xfffffffe, actionCode 0, while in state 1
10-26 22:03:10.410   111  1820 E SoundPool: Unable to load sample

And for sake of completeness the output of /snap/bin/anbox system-info

libEGL warning: DRI2: failed to authenticate
version: 4
snap-revision: 158
cpu:
  arch:  x86
  brand:         Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz
  features: 
    - aes
    - sse4_1
    - sse4_2
    - avx
os:
  name: Debian GNU/Linux
  version: 10 (buster)
  snap-based: true
kernel:
  version: Linux version 4.19.0-6-amd64 (debian-kernel@lists.debian.org) (gcc version 8.3.0 (Debian 8.3.0-6)) #1 SMP Debian 4.19.67-2+deb10u1 (2019-09-20)
  binder: true
  ashmem: true
graphics:
  egl:
    vendor: Mesa Project
    version: 1.4 (DRI2)
    extensions:
      - EGL_KHR_cl_event2
      - EGL_KHR_config_attribs
      - EGL_KHR_context_flush_control
      - EGL_KHR_create_context
      - EGL_KHR_create_context_no_error
      - EGL_KHR_fence_sync
      - EGL_KHR_get_all_proc_addresses
      - EGL_KHR_gl_colorspace
      - EGL_KHR_gl_renderbuffer_image
      - EGL_KHR_gl_texture_2D_image
      - EGL_KHR_gl_texture_3D_image
      - EGL_KHR_gl_texture_cubemap_image
      - EGL_KHR_image_base
      - EGL_KHR_no_config_context
      - EGL_KHR_reusable_sync
      - EGL_KHR_surfaceless_context
      - EGL_EXT_pixel_format_float
      - EGL_KHR_wait_sync
      - EGL_MESA_configless_context
      - EGL_MESA_drm_image
  gles2:
    vendor: VMware, Inc.
    vendor: OpenGL ES 3.0 Mesa 18.0.5
    extensions:
      - GL_ANGLE_texture_compression_dxt3
      - GL_ANGLE_texture_compression_dxt5
      - GL_APPLE_texture_max_level
      - GL_EXT_base_instance
      - GL_EXT_blend_func_extended
      - GL_EXT_blend_minmax
      - GL_EXT_clip_cull_distance
      - GL_EXT_color_buffer_float
      - GL_EXT_compressed_ETC1_RGB8_sub_texture
      - GL_EXT_copy_image
      - GL_EXT_discard_framebuffer
      - GL_EXT_draw_buffers
      - GL_EXT_draw_buffers_indexed
      - GL_EXT_draw_elements_base_vertex
      - GL_EXT_frag_depth
      - GL_EXT_map_buffer_range
      - GL_EXT_multi_draw_arrays
      - GL_EXT_occlusion_query_boolean
      - GL_EXT_polygon_offset_clamp
      - GL_EXT_read_format_bgra
      - GL_EXT_separate_shader_objects
      - GL_EXT_shader_integer_mix
      - GL_EXT_texture_border_clamp
      - GL_EXT_texture_compression_dxt1
      - GL_EXT_texture_format_BGRA8888
      - GL_EXT_texture_rg
      - GL_EXT_texture_sRGB_decode
      - GL_EXT_texture_type_2_10_10_10_REV
      - GL_EXT_unpack_subimage
      - GL_KHR_context_flush_control
      - GL_KHR_debug
      - GL_KHR_no_error
      - GL_MESA_shader_integer_functions
      - GL_NV_draw_buffers
      - GL_NV_fbo_color_attachments
      - GL_NV_read_buffer
      - GL_NV_read_depth
      - GL_NV_read_depth_stencil
      - GL_NV_read_stencil
      - GL_OES_EGL_image
      - GL_OES_EGL_image_external
      - GL_OES_EGL_sync
      - GL_OES_compressed_ETC1_RGB8_texture
      - GL_OES_copy_image
      - GL_OES_depth24
      - GL_OES_depth_texture
      - GL_OES_depth_texture_cube_map
      - GL_OES_draw_buffers_indexed
      - GL_OES_draw_elements_base_vertex
      - GL_OES_element_index_uint
      - GL_OES_fbo_render_mipmap
      - GL_OES_get_program_binary
      - GL_OES_mapbuffer
      - GL_OES_packed_depth_stencil
      - GL_OES_required_internalformat
      - GL_OES_rgb8_rgba8
      - GL_OES_standard_derivatives
      - GL_OES_stencil8
      - GL_OES_surfaceless_context
      - GL_OES_texture_3D
      - GL_OES_texture_border_clamp
      - GL_OES_texture_float
      - GL_OES_texture_float_linear
      - GL_OES_texture_half_float
      - GL_OES_texture_half_float_linear
      - GL_OES_texture_npot
      - GL_OES_texture_stencil8
      - GL_OES_vertex_array_object
      - GL_OES_vertex_half_float

@Fuseteam
Copy link

can confirm this is still an issue on edge can confirm running snap set anbox rootfs-overlay.enable=true and placing media_codecs.xml.txt in /var/snap/anbox/common/rootfs-overlay/system/etc/media_codecs.xml fixes media playback

@ShubhamKJha
Copy link
Contributor

Hi, this method fixes the problem with audio (mostly) but not the video.

@Fuseteam
Copy link

Fuseteam commented Mar 3, 2020

@ShubhamKJha it actually fixed video for me but i'm not sure what the differences are between your machine and mine

@raheemuddin786
Copy link

Might be usefull for someone
Able to play both video & audio in debian builds with below steps:
copied all codecs files from https://github.com/anbox/anbox/tree/master/android/media/ in below path: /var/snap/anbox/common/rootfs-overlay/system/etc

and then restarted with below commands:
sudo snap stop anbox
sudo snap start anbox

@albone3000
Copy link

albone3000 commented Apr 10, 2020

Im running anbox 4-56c25f1 rev 186 on Ubuntu 18.04.4 LTS with 4.15.0-96-generic.

I dont have the dir rootfs-overlay in my /var/snap/anbox/common directory after running snap set anbox rootfs-overlay.enable=true. I tried creating the directories and putting all codec files from https://github.com/anbox/anbox/tree/master/android/media/ into it, then restarting anbox, but it didnt work, I still nave no audio or video.

@JamesSwift
Copy link

Might be usefull for someone
Able to play both video & audio in debian builds with below steps:
copied all codecs files from https://github.com/anbox/anbox/tree/master/android/media/ in below path: /var/snap/anbox/common/rootfs-overlay/system/etc

and then restarted with below commands:
sudo snap stop anbox
sudo snap start anbox

When I do this, anbox fails to start. Is it a permission issue, or am I missing something?

@om-arino
Copy link

Might be usefull for someone
Able to play both video & audio in debian builds with below steps:
copied all codecs files from https://github.com/anbox/anbox/tree/master/android/media/ in below path: /var/snap/anbox/common/rootfs-overlay/system/etc
and then restarted with below commands:
sudo snap stop anbox
sudo snap start anbox

When I do this, anbox fails to start. Is it a permission issue, or am I missing something?

Same problem here - if I copy files to /var/snap/anbox/common/rootfs-overlay/system/etc anbox refuses to start --- Anyone found a workaround ?
Thanks. O.

@duracell80
Copy link

duracell80 commented Jun 28, 2020

Im running anbox 4-56c25f1 rev 186 on Ubuntu 18.04.4 LTS with 4.15.0-96-generic.

I dont have the dir rootfs-overlay in my /var/snap/anbox/common directory after running snap set anbox rootfs-overlay.enable=true. I tried creating the directories and putting all codec files from https://github.com/anbox/anbox/tree/master/android/media/ into it, then restarting anbox, but it didnt work, I still nave no audio or video.

Same. Copied files and rebooted, anbox starts but still no sound for my system.

@s-praveen-kumar
Copy link

@ShapeShifter499 a new anbox release is not enough, you would also need a new system image. The most recent on https://build.anbox.io/android-images/2018/07/19/ is too old to contain that fix. (@morphis how about rolling a new one? ; )
If you are using the debian package (for snap, locations will differ of both anbox dir and systemd service file) you can also add these xml files (media_codecs_google_audio.xml, media_codecs_google_telephony.xml, media_codecs_google_video.xml) to a dir /var/lib/anbox/rootfs-overlay/system/etc/ and put

[Service]
ExecStart=
ExecStart=/usr/bin/anbox container-manager --daemon --privileged --data-path=/var/lib/anbox --use-rootfs-overlay

into a /etc/systemd/system/anbox-container-manager.service.d/override.conf file (create the parent directories as needed by mkdir -pv /etc/systemd/system/anbox-container-manager.service.d /var/lib/anbox/rootfs-overlay/system/etc/)

This worked for me. Thank you

@muiz6
Copy link

muiz6 commented Aug 28, 2020

#904

Ha ­— it was the missing decoder entries! Putting this
media_codecs.xml.txt
to /var/lib/anbox/rootfs-overlay/system/etc/media_codecs.xml fixed youtube and musicolet player : )
Edit: wow even concurrent sound (i.e. soft mixing) works..

For those using the snap package need to enable rootfs overlay with these commands

$ snap set anbox rootfs-overlay.enable=true
$ snap restart anbox.container-manager

then copy the xml file to /var/snap/anbox/common/rootfs-overlay
and restart anbox with

$ snap restart anbox.container-manager

as guided in the documentation.

@umeshg17
Copy link

umeshg17 commented Oct 28, 2020

Simple to execute

This solution worked for me.

cd /var/snap/anbox/common/rootfs-overlay/system/etc
sudo wget https://raw.githubusercontent.com/anbox/anbox/master/android/media/media_codecs.xml
sudo wget https://raw.githubusercontent.com/anbox/anbox/master/android/media/media_codecs_google_audio.xml
sudo wget https://raw.githubusercontent.com/anbox/anbox/master/android/media/media_codecs_google_telephony.xml
sudo wget https://raw.githubusercontent.com/anbox/anbox/master/android/media/media_codecs_google_tv.xml
sudo wget https://raw.githubusercontent.com/anbox/anbox/master/android/media/media_codecs_google_video.xml
sudo wget https://raw.githubusercontent.com/anbox/anbox/master/android/media/media_profiles.xml
sudo snap set anbox rootfs-overlay.enable=true
sudo snap stop anbox
sudo snap start anbox

@greppp
Copy link

greppp commented Nov 10, 2020

@umeshg17 Thank you, your solution was the most concise and simple to execute and worked right away.

@ApacheScribe
Copy link

Might be usefull for someone
Able to play both video & audio in debian builds with below steps:
copied all codecs files from https://github.com/anbox/anbox/tree/master/android/media/ in below path: /var/snap/anbox/common/rootfs-overlay/system/etc

and then restarted with below commands:
sudo snap stop anbox
sudo snap start anbox

this works (: thank you so much!

@xxyangyoulin
Copy link

Enabling rootfs-overlay caused ANR for some applications. I don’t know what happened. Disable rootfs-overlay returned to normal.

@myklmar
Copy link

myklmar commented Mar 13, 2021

This solution worked for me.

cd /var/snap/anbox/common/rootfs-overlay/system/etc
sudo wget https://raw.githubusercontent.com/anbox/anbox/master/android/media/media_codecs.xml
sudo wget https://raw.githubusercontent.com/anbox/anbox/master/android/media/media_codecs_google_audio.xml
sudo wget https://raw.githubusercontent.com/anbox/anbox/master/android/media/media_codecs_google_telephony.xml
sudo wget https://raw.githubusercontent.com/anbox/anbox/master/android/media/media_codecs_google_tv.xml
sudo wget https://raw.githubusercontent.com/anbox/anbox/master/android/media/media_codecs_google_video.xml
sudo wget https://raw.githubusercontent.com/anbox/anbox/master/android/media/media_profiles.xml
sudo snap set anbox rootfs-overlay.enable=true
sudo snap stop anbox
sudo snap start anbox

Perfect......worked immediately.
Thank you so much!

@sirlancelot-blackler
Copy link

Thank you so much - this worked for me - allows playback of video and audio features in JW Library app running in Anbox.

@davidvedvick
Copy link

Simple to execute

This solution worked for me.

cd /var/snap/anbox/common/rootfs-overlay/system/etc
sudo wget https://raw.githubusercontent.com/anbox/anbox/master/android/media/media_codecs.xml
sudo wget https://raw.githubusercontent.com/anbox/anbox/master/android/media/media_codecs_google_audio.xml
sudo wget https://raw.githubusercontent.com/anbox/anbox/master/android/media/media_codecs_google_telephony.xml
sudo wget https://raw.githubusercontent.com/anbox/anbox/master/android/media/media_codecs_google_tv.xml
sudo wget https://raw.githubusercontent.com/anbox/anbox/master/android/media/media_codecs_google_video.xml
sudo wget https://raw.githubusercontent.com/anbox/anbox/master/android/media/media_profiles.xml
sudo snap set anbox rootfs-overlay.enable=true
sudo snap stop anbox
sudo snap start anbox

This solution worked for me with some slight modifications, I had to do

sudo snap set anbox rootfs-overlay.enable=true

First. Then I had to make the system and etc dirs...

sudo mkdir /var/snap/anbox/common/rootfs-overlay/system
sudo mkdir /var/snap/anbox/common/rootfs-overlay/system/etc

@Fuseteam Fuseteam mentioned this issue Dec 29, 2021
@duckdogers
Copy link

Simple to execute

This solution worked for me.

cd /var/snap/anbox/common/rootfs-overlay/system/etc
sudo wget https://raw.githubusercontent.com/anbox/anbox/master/android/media/media_codecs.xml
sudo wget https://raw.githubusercontent.com/anbox/anbox/master/android/media/media_codecs_google_audio.xml
sudo wget https://raw.githubusercontent.com/anbox/anbox/master/android/media/media_codecs_google_telephony.xml
sudo wget https://raw.githubusercontent.com/anbox/anbox/master/android/media/media_codecs_google_tv.xml
sudo wget https://raw.githubusercontent.com/anbox/anbox/master/android/media/media_codecs_google_video.xml
sudo wget https://raw.githubusercontent.com/anbox/anbox/master/android/media/media_profiles.xml
sudo snap set anbox rootfs-overlay.enable=true
sudo snap stop anbox
sudo snap start anbox

Worked first time for me, had to create some directories in the first path cause they didnt exist, but overall this is the solution right here.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.