-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
[video_player] Some videos play without audio on Android TV devices #89038
Comments
Hi @diyargulli Also please provide a sample video for this issue to be reproducible controller = VideoPlayerController.network(
"mpegts url here"); |
the issue exist on most of android boxes and android tv devices also on some older android phones: url: http://163.172.39.215:25461/line/C4@!a3a1@!w72A/61 controller = VideoPlayerController.network( emulator debug result
|
Hi @diyargulli Can you please provide more details of your emulator, can you hear the audio? |
Unconfirmed.259131.mp4
the link is online but may not work at your location i am dropping video but please note that we have problem with hls not with locals if you add Add factory for Extractors it will be well : |
Hi @diyargulli
I can confirm this message in a video with working on audio on Android TV emualtor logs[ +1 ms] Installing build\app\outputs\flutter-apk\app.apk...
[ ] executing: C:\Users\Taha\Code\android-sdk\platform-tools\adb.exe -s emulator-5554 install -t -r
C:\Users\Taha\StudioProjects\plugins-clone\packages\video_player\video_player\example\build\app\outputs\flutter-apk\app.
apk
[ +717 ms] Performing Streamed Install
Success
[ +1 ms] Installing build\app\outputs\flutter-apk\app.apk... (completed in 718ms)
[ +1 ms] executing: C:\Users\Taha\Code\android-sdk\platform-tools\adb.exe -s emulator-5554 shell echo -n
c55bc2d4857926b4a189854cebc1140dc34db5c6 > /data/local/tmp/sky.io.flutter.plugins.videoplayerexample.sha1
[ +33 ms] executing: C:\Users\Taha\Code\android-sdk\platform-tools\adb.exe -s emulator-5554 shell -x logcat -v time -t
1
[ +60 ms] --------- beginning of main
09-01 07:32:21.285 I/Finsky ( 4871): [2] rhs.n(8): Invalidating cached PackageState for
io.flutter.plugins.videoplayerexample
[ +6 ms] executing: C:\Users\Taha\Code\android-sdk\platform-tools\adb.exe -s emulator-5554 shell am start -a
android.intent.action.RUN -f 0x20000000 --ez enable-background-compilation true --ez enable-dart-profiling true --ez
enable-checked-mode true --ez verify-entry-points true
io.flutter.plugins.videoplayerexample/io.flutter.embedding.android.FlutterActivity
[ +90 ms] Starting: Intent { act=android.intent.action.RUN flg=0x20000000
cmp=io.flutter.plugins.videoplayerexample/io.flutter.embedding.android.FlutterActivity (has extras) }
[ ] Waiting for observatory port to be available...
[ +996 ms] Observatory URL on device: http://127.0.0.1:45223/5l-6UBAo_ug=/
[ +1 ms] executing: C:\Users\Taha\Code\android-sdk\platform-tools\adb.exe -s emulator-5554 forward tcp:0 tcp:45223
[ +25 ms] 65248
[ ] Forwarded host port 65248 to device port 45223 for Observatory
[ +6 ms] Caching compiled dill
[ +27 ms] Connecting to service protocol: http://127.0.0.1:65248/5l-6UBAo_ug=/
[ +261 ms] Launching a Dart Developer Service (DDS) instance at http://127.0.0.1:0, connecting to VM service at
http://127.0.0.1:65248/5l-6UBAo_ug=/.
[ +132 ms] DDS is listening at http://127.0.0.1:65251/IEAqTLtvT1Q=/.
[ +60 ms] Successfully connected to service protocol: http://127.0.0.1:65248/5l-6UBAo_ug=/
[ +47 ms] DevFS: Creating new filesystem on the device (null)
[ +22 ms] DevFS: Created new filesystem on the device
(file:///data/user/0/io.flutter.plugins.videoplayerexample/code_cache/exampleYKCLPE/example/)
[ +2 ms] Updating assets
[ +89 ms] Syncing files to device sdk google atv x86...
[ +2 ms] <- reset
[ ] Compiling dart to kernel with 0 updated files
[ +2 ms] <- recompile package:video_player_example/main.dart c71d7722-c595-4af6-a3bc-0aae91f25f87
[ ] <- c71d7722-c595-4af6-a3bc-0aae91f25f87
[ +73 ms] Updating files.
[ ] DevFS: Sync finished
[ ] Syncing files to device sdk google atv x86... (completed in 79ms)
[ ] Synced 0.0MB.
[ +1 ms] <- accept
[ +5 ms] Connected to _flutterView/0xd6a7c410.
[ +2 ms] Flutter run key commands.
[ +1 ms] r Hot reload. 🔥🔥🔥
[ +1 ms] R Hot restart.
[ ] h List all available interactive commands.
[ +1 ms] d Detach (terminate "flutter run" but leave application running).
[ ] c Clear the screen
[ ] q Quit (terminate the application on the device).
[ ] 💪 Running with sound null safety 💪
[ +1 ms] An Observatory debugger and profiler on sdk google atv x86 is available at:
http://127.0.0.1:65251/IEAqTLtvT1Q=/
[ +228 ms] D/EGL_emulation( 7581): eglMakeCurrent: 0xe1ed8d20: ver 2 0 (tinfo 0xd9db84d0)
[ +1 ms] E/libc ( 7581): Access denied finding property "vendor.display-size"
[ +2 ms] W/eoplayerexample( 7581): type=1400 audit(0.0:51): avc: denied { read } for
name="u:object_r:vendor_default_prop:s0" dev="tmpfs" ino=8398 scontext=u:r:untrusted_app:s0:c51,c256,c512,c768
tcontext=u:object_r:vendor_default_prop:s0 tclass=file permissive=0
[ +88 ms] W/eoplayerexampl( 7581): Accessing hidden method Landroid/media/AudioTrack;->getLatency()I (greylist,
reflection, allowed)
[ +12 ms] DevTools activation throttled until 2021-09-01 22:30:35.710110.
[ +5 ms] I/ExoPlayerImpl( 7581): Init 7ee25d0 [ExoPlayerLib/2.14.1] [generic_x86, sdk_google_atv_x86, Google, 29]
[ +83 ms] D/NetworkSecurityConfig( 7581): Using Network Security Config from resource network_security_config
debugBuild: true
[ +205 ms] D/EGL_emulation( 7581): eglMakeCurrent: 0xe1e3ff80: ver 2 0 (tinfo 0xd6a81740)
[ +270 ms] I/VideoCapabilities( 7581): Unsupported profile 4 for video/mp4v-es
[ +77 ms] I/OMXClient( 7581): IOmx service obtained
[ +7 ms] D/SurfaceUtils( 7581): connecting to surface 0xc295d008, reason connectToSurface
[ ] I/MediaCodec( 7581): [OMX.google.h264.decoder] setting surface generation to 7762945
[ ] D/SurfaceUtils( 7581): disconnecting from surface 0xc295d008, reason connectToSurface(reconnect)
[ ] D/SurfaceUtils( 7581): connecting to surface 0xc295d008, reason connectToSurface(reconnect)
[ ] E/ACodec ( 7581): [OMX.google.h264.decoder] setPortMode on output to DynamicANWBuffer failed w/ err -1010
[ +6 ms] I/ACodec ( 7581): codec does not support config priority (err -1010)
[ +22 ms] I/OMXClient( 7581): IOmx service obtained
[ +10 ms] I/ACodec ( 7581): codec does not support config priority (err -2147483648)
[ ] I/ACodec ( 7581): codec does not support config operating rate (err -2147483648)
[ +227 ms] D/MediaCodec( 7581): [OMX.google.h264.decoder] setting dataspace on output surface to #104
[ ] W/Gralloc3( 7581): allocator 3.x is not supported
[ ] D/eglCodecCommon( 7581): allocate: Ask for block of size 0x2f8000
[ ] D/eglCodecCommon( 7581): allocate: ioctl allocate returned offset 0x3ff50e000 size 0x2f9000
[ +94 ms] D/SoftwareRenderer( 7581): setting dataspace on output surface to #104
[ +151 ms] D/HostConnection( 7581): HostConnection::get() New Host Connection established 0xd9d578d0, tid 7633
[ +4 ms] D/HostConnection( 7581): HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_dma_v1
ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_vulkan
ANDROID_EMU_deferred_vulkan_commands ANDROID_EMU_vulkan_null_optional_strings
ANDROID_EMU_vulkan_create_resources_with_requirements ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer
ANDROID_EMU_vulkan_free_memory_sync ANDROID_EMU_vulkan_shader_float16_int8 ANDROID_EMU_vulkan_async_queue_submit
ANDROID_EMU_sync_buffer_data GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr
ANDROID_EMU_host_side_tracing ANDROID_EMU_async_frame_commands ANDROID_EMU_gles_max_version_2
[+2110 ms] The Flutter DevTools debugger and profiler on sdk google atv x86 is available at:
http://127.0.0.1:9101?uri=http://127.0.0.1:65251/IEAqTLtvT1Q=/
[+6082 ms] D/EGL_emulation( 7581): eglMakeCurrent: 0xe1e3ff80: ver 2 0 (tinfo 0xd6a81740) Since you cannot provide the source which has the actual audio issue, please confirm if the same has audio on a Android TV emulator? Also your video in #89038 (comment) fail to load |
yes after i uploaded it i noticed that don't work because it was live stream i tried to download endless video after downloaded part of video i paused so interrupted. it's been one year that my clients have this issue so how to fix :( |
this issue can be solved by using ffmpeg extension of exoplayer in android. |
Right you solved the for me thanks |
how can you add this to flutter project? |
I do not believe that this issue was solved that easily. The current Android code does not take any effort in enabling Exoplayer's extension renderer mode with EXTENSION_RENDERER_MODE_ON in the DefaultRenderersFactory constructor. As long as it doesn't do that, adding ffmpeg will not do anything (reference https://github.com/google/ExoPlayer/blob/release-v2/extensions/ffmpeg/README.md) - I'd love to be proven wrong here as I want to achieve the same as author. Adding ffmpeg itself could be done fairly easily, you'll have to build it yourself and then add it to your flutter Android project like you would with a non-Flutter Android project too. (in the build.gradle file). The ffmpeg extension will be resolved automatically by the renderers factory from wherever it is as long as it's included. |
flutter doctor -v
<
video metadatas
example
minimal code sample
The text was updated successfully, but these errors were encountered: